Errors during compilation and random Lost Packets [SOLVED]

Started by luisr320, July 28, 2014, 09:04:09 AM

luisr320

Hello fellow Moteiners.

Since I first tried to compile my first moteino sketch on a USB Moteino, I always had errors at the end of the compilation process, and the verbose area of the compiler showed the following messages:
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x007c
         0x00 != 0x80
avrdude: verification error; content mismatch
avrdude: Send: Q [51]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 

avrdude done.  Thank you.


I reported about this problems here:
https://lowpowerlab.com/forum/index.php/topic,477.msg2723.html#msg2723

But since the uploaded code ended up working I didn't really care. However, once in a blue moon, I got some connection problems and the nodes stopped sending their data/intructions to the gateway and only the moteino's version of ctrl-alt-delete (plugging off and then on again) would solve this problem. The problem was that I wanted to fully implement my RFID gate access system that uses a moteino to relay the RFID Tags ID to the gateway and because of that it was not achieving the necessary reliability.

So a couple of days ago I decided to give the gateway a casing and when I was taking measures I spotted something. Check out what happened to the spilled solder from the upperside of the antenna pad:


Can you spot it, just under the ANT "T"? Since the antenna wire is soldered from the other side I didn't spot the spilling of a bit of solder into the FLASH pad.

Lets look at the W25X40CL - Winbond - Serial Flash datasheet and see what that pin is:


And now lets look at the moteino schematics to see where it goes to:


It connects to pin 15 of the moteino's on-board ATMEGA328 chip, a port dedicated to the SPI interface, the same interface used to connect to the radio.

So I was pushing some weird stuff out from the antenna into the SPI MOSI (Master out / Slave IN) port.
Now, I am no engineer but it doesn't require much engineering to figure out that this can not be done. So clearing the solder short was a quick fix and VOILÁ!!!! Now everything works perfectly. No more broken connections, clean compilation of the gateway code and 100% reliability for my wireless RFID system.

I'm in the aviation business where a guy called Murphy made a name for himself by cashing on other peoples errors. So it was inevitable that since those two pads were so close to each other that Mr. Murphy's Law would make someone like me connect them without even knowing it.

So Felix, perhaps in a future version you could make those pads a bit more apart?
Just a suggestion.

And here is my new gateway box:


There is a bright blue led in the front that blinks along in parallel with the onboard pin 9 led, and the code blinks it every time a ACK is received form the nodes, working as a visible  heartbeat for the wireless part of my home automation system.
The antenna is curled up inside. Not a very efficient way of using the antenna, but since the output power of these transmitters is so high, it doesn't really matter for my installation.

Felix

Wow, that's a first time I see/hear something like that happen. In fact I find it very hard to make such a solder bridge, requiring lots of solder and effort. But thanks for sharing, I will consider some changes in a future revision.
And BTW rather than curling the antenna just leave it straight but wrap it on the inside of the casing as widely as you can (ie around the inside bottom/top of your case, that should yield better signal). Curling is not such a good idea though it makes for nice pictures :)

luisr320

Hello Felix.
I've been around a soldering iron since my early teens and at 50 you think I should have learned something but this just shows you that you have here all kind of people. And people do all kind of mistakes. So preventing them is a step in the direction of avoiding them.
Anyway just wanted to share my mistake with all of those moteiners that, like me, still make lousy soldering after 40 years :).

Regarding the antenna, it is, in fact coiled around the walls of the box. I may still change this in the future and connect an external antenna to the box. It will look cool along with all the other stuff I have in the service closet, blinking its blue led away.  ;)