USBtiny not talking to Arduino Uno

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
markmoran
 
Posts: 24
Joined: Fri Mar 02, 2012 6:47 am

USBtiny not talking to Arduino Uno

Post by markmoran »

I assembled the USBtinyISP yesterday but cannot get it to see my Arduino Uno. I've looked at all the solder joins and they all look fine. I plug it into my MacBook Pro (OS 10.7) and the green light comes on and when I try to use it, the red light flashes for a second as well, but avrdude always reports initialization failure.

I've read every post I can find about this (here and elsewhere), so I know this is a common problem, but I don't know what to try next to fix it. I've tried powering the Uno from the USBtiny (with the jumper on) and I've also tried powering the Uno from a 9volt battery as well as from a separate USB cable connected to the computer. I've tried all four possible orientations of the 6-pin cable (flipping it around both on the Arduino and on the USBtiny's board, even though I know I had the pin #1s lined up correctly. I even tried using -F with avrdude to force it to try anyway and just get the message Yikes! Invalid device signature 0.

I've tried this from both from within the Arduino IDE (trying to either Burn Bootloader as well as just upload a sketch using the USBtiny rather than serial port). I've also tried uploading a sketch from the CrossTalk installation of avrdude, which works fine for uploading sketches over serial using the arduino as "programmer" but gives me the same results as the Arduino IDE does when I try to actually use the USBtiny.
Any suggestions would be greatly appreciated. I'm happy to upload pictures of the USBtiny or whatever else might help diagnose the problem.

Thanks!

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: USBtiny not talking to Arduino Uno

Post by adafruit_support_bill »

Let's start with photos of the front & back of the board.

jag911
 
Posts: 18
Joined: Tue Mar 06, 2012 11:59 am

Re: USBtiny not talking to Arduino Uno

Post by jag911 »

I have a similar issue using OSX 10.6.8 (late '11 MBP 13")... though my green light won't fire up until avrdude attempts to connect to it manually... and even then OSX never reports it as a known USB device (as seen by the lack of a /dev/cu.* device). Like you I've been playing with various methods of trying to get it to program and have yet to succeed.

I just attempted to use the device from my wife's same model MBP but running 10.7.3 and got the same results as I see on mine, where the green LED won't initialize until you've manually done something with avrdude.

User avatar
markmoran
 
Posts: 24
Joined: Fri Mar 02, 2012 6:47 am

Re: USBtiny not talking to Arduino Uno

Post by markmoran »

My green light doesn't come to life until avrdude attempts to connect either. The red LED then flashes and then I get the message: After that, the green light stays on.
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

After that, the green LED stays on, but I never get it to connect.

Attached are photos of the back and front of the board as well as it with it connected to the Uno. I'm hoping there is an easy fix and I've made an obvious mistake, although I've tried a number of different options.
photo 1.JPG
photo 1.JPG (603.22 KiB) Viewed 2856 times
photo 2.JPG
photo 2.JPG (550.96 KiB) Viewed 2856 times
photo 3.JPG
photo 3.JPG (576.58 KiB) Viewed 2856 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: USBtiny not talking to Arduino Uno

Post by adafruit_support_bill »

The build looks pretty good overall. It may be the lighting, but some of those joints look like they could use just a little more solder.
Attachments
Solder Joint.gif
Solder Joint.gif (7.78 KiB) Viewed 2853 times

User avatar
markmoran
 
Posts: 24
Joined: Fri Mar 02, 2012 6:47 am

Re: USBtiny not talking to Arduino Uno

Post by markmoran »

Interesting! I was so worried about not putting in too much solder and creating cold joints or accidental jumpers that I must've erred too far the other way? I thought the solder was mainly holding the components into the board and as long as the pins were in the correct holes that a connection would be made.

I also assumed this must be a software or configuration problem on my computer, and that if there was an actual wiring problem that the green or red LEDs would never come on, etc.

Here's another picture of the back of the board in better lighting. I do see a few pins that might not have enough solder to connect to the board? I'm guessing I can just re-apply the iron and add in a little more? Or should I heat it up and first use a solder sucker to get rid of the old solder?

Thanks.
photo.JPG
photo.JPG (823.17 KiB) Viewed 2843 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: USBtiny not talking to Arduino Uno

Post by adafruit_support_bill »

The pins in the holes are not sufficient for a reliable electrical connection. It might work for a while if you are lucky, but over time, the connection will degrade with vibration and oxidation.

No need to remove what you have. Just re-heat them and add more solder. Add just enough to fill the hole, cover the pad and wick partway up the pin as in the diagram.

User avatar
markmoran
 
Posts: 24
Joined: Fri Mar 02, 2012 6:47 am

Re: USBtiny not talking to Arduino Uno

Post by markmoran »

It works! Thank you!

I added solder to almost every pin and now the board works, both to upload programs and burn the bootloader. Very exciting!

When I connect the jumper, it can power the Arduino, although not upload to it at the same time? I think I had read this, so wasn't surprised, but was curious when the jumper is used. e.g. Can some ATtinys be both powered and programmed at the same time from the USBtiny?

Thank you again!

Also, for anyone else with this problem, the 6-pin cable needs to be oriented in the same direction as the USB cable. That is, the red cable goes towards the words Arduino and UNO and closest to digital pin 0 (rather than pin A5). Since I wasn't sure how the cable was supposed to go over the 6-pin header, I had to try both combinations for each change I tried.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: USBtiny not talking to Arduino Uno

Post by adafruit_support_bill »

Great! :D
You can use the jumper to power 5v devices up to about 100mA. If it is a 3.3v device, or needs more than 100mA, you need to remove the jumper and power the device separately.

jag911
 
Posts: 18
Joined: Tue Mar 06, 2012 11:59 am

Re: USBtiny not talking to Arduino Uno

Post by jag911 »

So i can now issue a burn bootloader, which enables the pretty green light and then does the upload... but OSX still fails to see the device as a serial port down /dev/cu.* so the Arduino IDE doesn't know what port to use to burn the sketches. Are you uploading your sketches manually with avrdude?

I'm not entirely certain what seems to have changed between mine not working and working. unlike the example in this thread, i did not need to resolder any joints. Though i did go download CrossPack... maybe the new avrdude with native support is the difference?

Anyway, does your usbtinyisp show up in /dev as a serial device that the arduino ide can upload sketches with?

jag911
 
Posts: 18
Joined: Tue Mar 06, 2012 11:59 am

Re: USBtiny not talking to Arduino Uno

Post by jag911 »

Success... sort of! ;)

So it appears that the download and installation of CrossPack-AVR has included a new version of avrdude and accessories. The basic Arduino application will now use it to compile and upload. By selecting the USBTinyISP from the menu structure and doing a bootloader burn, this now works within the application. The Upload of compile code however, does not.

This is because the Arduino application is requiring a serial port (something down /dev/cu.*) to pass to avrdude when uploading. Yet the USBTinyISP never enumerates on OSX as such a device. What the Arduino app doesn't know, however, is that avrdude (a recent build, that is) does know how to communicate with it without having to pass a hard coded serial port. A quick update to the Arduino app to ignore this setting when the programmer is set to USBTinyISP would fix this issue.

So all that is really missing is manual call to avrdude with the correct parameters. Now on OSX, the Arduino application uses the darwin system temp path for building the sketch. This path is quite long, dynamic, and generally a pain to deal with. So i modified the preferences.txt file to have "build.path=/tmp/arduino" in it, and created the arduino directory under /tmp.

Now so long as the arduino application is open, the build files will remain down a much easier path to deal with. From here you can open a terminal and go to the directory, and manually issue the program command (for my example it was "avrdude -c usbtiny -p m328p -U flash:w:Fade.cpp.hex" to upload the included example Fade program).

It's a bit of a hack, but it does in fact work. Though I wish the native Arduino GUI interface would work nicer (for the good of all n00b's like myself). That would require either a) the USBTinyISP being recognized as a serial device by OSX or b) the Arduino.app being updated to ignore the serial port when using the USBTinyISP programmer.

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”