I recently received a set of Moteino R3s. I've soldered the included headers to the FTDI through holes, and connected the LowPowerLab FTDI board. The Moteino LED blinks, indicating (presumably) that power is being delivered and a program is executing on the 328. I can choose the FTDI serial port in the Arduino IDE, and have selected "Arduino Uno" as the board type. However, any time I try to upload a sketch (even the simplest "blink" sketch) I get the following console output after compile:
"avrdude: stk500_getsync(): not in sync: resp=0x0a"
A little web searching reveals that this is a very general error indicating that the microcontroller isn't responding to the programming request properly.
When I click "upload" in the Arduino IDE, the LEDs on both the FTDI board and the Moteino flash rapidly for a couple of seconds, which seems to indicate that _something_ is happening. But then it goes right back to blinking.
Opening the Serial Monitor in the Arduino app, I get a regularly updating string of garbage characters, e.g.
"›ð¸þü›ø¹ð›à¹à›ð¹ð™â¸à¹à›ð¹ð¹p»ðà¹Â¹À»¹p¹ð¹À¹ð¹ðð¸ÿ¹þ»¹ü¸øþ™à¹ýaÿ™þ¸ü¸ú¸ð›à°ý¸â›ð¸Â¸à¹Â¸ð›ð°p¹ð¸p¸à›ð°Â¹Àà¹p»"
Any idea what's going on here? I get identical behavior with both of the Moteino R3s I've tried. Neither is connected to any other hardware. I am running Arduino 1.0.5 on Mac OSX 10.8.4.
The Moteinos are all tested for functionality by loading them with send/receive sketches. So those are guaranteed to be functional, assuming USPS didn't damage them (that's a very remote possibility). In the serial port you should be seeing clear readable text indicating the sending and receiving. The baud speed of these test sketches is 115200, so if it's anything else you will surely see garbage.
Perhaps the FTDI adapter is faulty but those are also tested to make sure Windows will recognize them.
Do you happen to have another FTDI adapter?
I remotely recall another user reporting having similar issues on MAC, and it had to do something with setting some setting or checking some box in the serial monitor...
Thanks for the reply, Felix. Changing the baud rate in the serial monitor did indeed fix that problem- now I'm able to see the "sending" messages in plaintext.
Unfortunately I'm still not able to actually upload a sketch to either board through the FTDI adapter. I don't have another adapter that I can use to test. Any ideas?
Assuming the FTDI adapter is good, what I think might be happening is the serial port is not reset upon opening up by the Arduino IDE. I think that was the issue another user reported. Not really sure, but there might be a setting somewhere in the IDE for that, or perhaps in the OSX operating system. Is there any chance you can try the FTDI adapter on a Windows machine?
To verify the theory that the board is not being reset, you can actually reset it manually the instant you try to upload a new sketch: just short RST to GND for a split second. Then the board should enter the bootloader and should pick up the sketch upload from the computer.
I tried a bunch of times, but manually resetting the Moteino didn't have any affect on my ability to upload the sketch. I did notice that the LED pattern that happens when I manually reset the board (a short flash followed by the LED staying on for a second) also happens when I try to program it from the Arduino software, which leads me to believe that the reset is happening as it should.
Unfortunately I don't have access to a windows machine that I can test on right now.
I've tried most settings combinations in the Arduino software, but just to verify, I have the following selected:
Board: Arduino Uno
Serial Port: /dev/tty.usbserial-A601MEGT
Programmer: AVRISP mkII
The settings look right. Are there more serial ports available? Is it possible you are pointing at another serial port?
The LED pattern sounds right, the LED will blink then stay on for about 1 second while the board is reset, then continue to blink very rapidly while the sketch is being uploaded.
I guess it's still possible the FTDI is faulty.
Could you do a visual inspection of the soldering and the FTDI board, perhaps there's a bad solder joint from reflowing or something like that, or maybe the female header is not soldered right, you could try adding some flux and touch it with the soldering iron on those 6 pins.
Before taking further action I would like you to test on a windows machine if possible. I'm still 2-3 days away from having more FTDIs in stock unfortunately.
Sorry for all the inconvenience. :(
Just a quick update: I tried programming a Moteino from a Windows XP virtual machine on the same Apple laptop, and got the same error. I will try on a dedicated Windows PC next.
Another update: I tried again on a PC running Windows XP. Same result. I'll try reflowing the solders tonight, but they look pretty good to me... frustrating!
Sorry for the deluge... as I was putting the FTDI adapter away, I noticed that a couple of the pins on the SMD chip appear to be bridged by solder. Is this intentional? If not, that could be the problem. Upon closer inspection, a couple of the pins on the other side might be bridged too. I've attached a photo of the more obvious bridge.
That bridge is not intentional but it often happens because the pins are the same signal (GND) and I think when they reflow, because GND is such a large mass compared to the nearby signals that might cause them to bridge sometimes. It's clearly visible both pins lead to the large GND fill. But yeah, if there are any OTHER bridges that is a problem.
Gotcha, thanks. I've attached the best photo I was able to capture (with my phone) of the potential bridge on the other side of the chip. The bridge is between the two left-most pins. It's hard to see if it's actually bridged, but I think it might be. Would a bridge on those pins potentially cause the problems I'm seeing?
Yes that would be a problem, do you have a magnifier or loupe to look at it?
To me it does look like there's a bridge.
If so you can remove it with a clean tip soldering iron. I just rotate the tip while holding it tangent to the bridge, that should "pick up" the excess solder. Adding a little flux helps a lot. Basically the "solder will follow the heat".
Yeah ... sorry, I must have missed that bridge and while the dongle would still be recognized on my computer a bridge in some weird location might interfere with the upload functionality. Let me know how it goes.
I managed to remove the bridge using the technique you mentioned, and programming now works! Glad to have got that one sorted- thanks for your help.
Great!
Thanks for giving that a try, and sorry for missing that bridge ...
I just received a few moteinos and and the same FTDI adapter yesterday. I just wanted to chime in and say I experienced the same issue as the OP. When I googled "Moteino sketch not uploading" I found this post and upon inspection, my FTDI board had the same bridges along the exact same pins. Once removed everything began uploading just fine (ftdi isn't resetting moteino however??).
I'm not replying to this post in any way to complain or suggest anything negative about the moteino or FTDI adapters, I just though it was a bit to coincidental to see the exact same bridge on the all the same pins and wanted to give you a heads up in case there was a bad batch of boards. Might be able to catch the problem in time before shipping a bunch out.
Thanks for sharing the experience. I began testing each individual FTDI a few weeks back, by actually uploading a short sketch to a Moteino, making sure the unit does everything it's supposed to - be able to upload and reset the board.
Prior to that I used to inspect them visually (which proves to be an inexact science), and plug them in to make sure they are recognized and the serial port is installed.