AVRISP mkII - Home made Moteino not detected [SOLVED]

Started by Lukapple, March 27, 2014, 04:51:12 PM

kobuki

Quote from: Lukapple on March 31, 2014, 01:38:31 PM
Switched to moteino 3.3V pin and it works !!! Device is now detected. Thanks a lot :)

Cool, glad I could help. Just a note for later: reading up a little on the subject, I concluded that you _must_ connect the Vcc of the programmed part to the (original, unmodified Atmel) MK2, otherwise it won't detect the chip.

Lukapple

Thanks for info. It detects target voltage 2,9v.
Now it stopped working again. When I hit the "read" button for several times, sometimes I get message:

But most of time I get Reading device ID...Failed!

But first time I connected it to moteino VCC it worked.

I'll try to solder another Moteino. This one has probably some bad solder joints or something.

Felix

Quote from: Lukapple on March 31, 2014, 01:46:39 PM
Felix, or anyone, could you please post what exactly do I have to set to burn Optiboot bootloader. Just Fuses: ext:FD, hi:DC, lo:DE. ?
Yes first set the fuses you mentioned, then burn the bootloader. Optionally you can set the lock fuses to prevent any accidental bootloader overwrite with very large sketches but that's not generally necessary as long as you know what you're doing, so I'll say forget that part.

Lukapple

#18
I've soldered another Moteino, this time in reflow oven, joints looks good.

This time I've built Moteino programming jig (like the one on your video Felix):


But I get same error. I'm not sure that wiring is ok. On your image MOSI and MISO looks inverted:


And on your video, where you demonstate jig usage, there is some other version of jig, with another pogo on "3.3V OUT". I should probably connect VCC there ?

Felix could you please post some schematic of your programming jig ? or some closeup pics ?

Thanks!

Felix

I think you're looking at the connector the wrong way. It's a TOP view in that diagram, that's why you probably have everything mirrored hence thinking that I have MISO/MOSI inverted.

Lukapple

Pins are ok, pin#1(marked red cable + arrow on connector) is MISO. But if you look at your picture(previous post), MISO is yellow cable, which is connected to Moteino D11(MOSI).

However I've tried to connect Moteino that I bought from you to programmer and device is detected without any problems.
Before that I made some modifications to my programming jig - VCC is now connected to Moteino 3.3V.

Looks like there is some kind of problem with my homemade Moteino. Maybe voltage ? When I click on read voltage, I get 2,9V, but with your Moteino I get 3.3 V or something like that. If I hit read like 20x, if I'm lucky, chip is recognized 1x, but most of the time I get error.

Maybe some of smd components are not compatibile, I've used following components:
- MURATA Resonator 16MHz ±0,5% SMD -20°C~+80°C 1,3x3,2mm H=0,4mm
- YAGEO (PHYCOMP) SMD MLC Capac. 0805 10uF +80%, -20% 10V Y5V -55°C~+125°C CC0805ZKY5V6BB106
- YAGEO SMD Resistor 0603 1% 10K Taped 100ppm (it has marking "OIC" or "DIC" or "310" or something like that)
- 4x KERKO CHIP 0603 X7R 0,1uF 10% 50V
- Microchip Voltage Regulator LDO 3V 250mA SOT-23-3 -40°C~+125°C MCP1702T-3002E/CB
- OSRAM SMD-LED Yellow 7mcd 160° 0603 587nm LY-L29K-H1K2-26-Z
- YAGEO SMD Resistor 0603 1% 1,5K 1/10W Taped 100ppm -55°C~+155°C (this one is for LED, it has marking "188" or "100" or something like that)

Do you have any idea what else should I check ?

Felix

Hm... if my Moteino works fine and yours doens't, perhaps just something wrong on your assembled one. I connect 5V to VIN, and let the Moteino regulate down.
Try giving it a thorough cleaning with IPA to wash away some of the flux residues... not sure what else to suggest.
Hand assembly with soldering iron is probably not a very good idea as you get a lot of residue in there. I use brand no-clean unleaded paste which leaves very clean joints.

Lukapple

Thanks for suggestions. I'll try to solder few more in reflow oven.

kobuki

Quote from: Lukapple on April 17, 2014, 08:16:16 AM
- Microchip Voltage Regulator LDO 3V 250mA SOT-23-3 -40°C~+125°C MCP1702T-3002E/CB

Did you deliberately choose the 3V part? If you didn't, it might be your source of problems. 3.3V is already on the edge OC'ing the 328p a bit, but 3V definitely won't cut it on 16 MHz.

Felix

Heh, yeah 3V might be OK, but I would recommend 3.3V.
Also IMPORTANT: did you solder the radio on the back of your DIY Moteino before programming?

Lukapple

Quote from: kobuki on April 17, 2014, 08:31:24 AM
Quote from: Lukapple on April 17, 2014, 08:16:16 AM
- Microchip Voltage Regulator LDO 3V 250mA SOT-23-3 -40°C~+125°C MCP1702T-3002E/CB

Did you deliberately choose the 3V part? If you didn't, it might be your source of problems. 3.3V is already on the edge OC'ing the 328p a bit, but 3V definitely won't cut it on 16 MHz.

I've two components on stock:
1. Microchip Voltage Regulator LDO 3,3V 250mA SOT23-3 -40°C~+125°C MCP1700T-3302E/TT
2. Microchip Voltage Regulator LDO 3V 250mA SOT-23-3 -40°C~+125°C MCP1702T-3002E/CB <-- used this one

Ah, now I see that it's actually 3V. I chosen this one, because I wanted to support input voltage up to 13V.
In Moteino BOM there is option to use:
- MCP1702 3v3 (up to 13V in)

but now I see that I have 3V instead of 3.3V.
I'll try to replace it with first option. Thanks for the hint !

p.s.
In Atmega 328p datasheet I found that operating voltage is:
– 1.8 - 5.5V for ATmega48PA/88PA/168PA/328P

Shouldn't it also work with 3V regulator then ?


Felix: Yes, radio is soldered.

Lukapple

And here are some closeup pics of my DIY Moteino:
front
back

kobuki

Quote from: Lukapple on April 17, 2014, 08:40:31 AM
p.s.
In Atmega 328p datasheet I found that operating voltage is:
– 1.8 - 5.5V for ATmega48PA/88PA/168PA/328P

Shouldn't it also work with 3V regulator then ?

These are recommended min and max values, under various circumstances and configurations. They do not apply to every working condition. The image is from the actual datasheet of the chip. I'd recommend giving it a thorough read. Image: http://i.stack.imgur.com/98hvi.jpg

Felix

Quote from: Lukapple on April 17, 2014, 08:47:23 AM
And here are some closeup pics of my DIY Moteino:
front
back

Ok your problem is that CS (d10) is floating around when the radio is installed.
You will need to add a pull-up resistor on that pin. Use a 10K from D10 to 3.3V. That should fix it as long as your assembly is solid.

Lukapple

Thanks a lot for help guys. I'll try with pull up resistor. If that won't work then i'll try to replace regulator with 3.3V.

P.s. Why it worked with your Moteino that also has radio on?
Because you're using 3.3V regulator?