Hello!
I built 3 R6 version Moteinos, using the files Felix kindly made available on Github.
I can successfully flash the bootloader and the sketches. The only problem is the board doesn't restart after programming (I tried Arduino IDE v 1.6.9 and 1.8.2).
Moteino boards don't have the flash memory or RFM69 module soldered.
I'm using the FTDI adapter bought from LowPowerLab, the old version based on FT232RL chip.
I also tried to remove the C6 capacitor (0.1uF) and switch the C1 from 1uF to 0.1uF (like Moteino R4 version) but it acts the same way.
I noted something else: if I want to power this DIY Moteino through the FTDI adapter, I first need to connect the USB cable, then attach the FTDI adapter and, at last, connect Moteino.
If I connect the cable to the FTDI adapter, Moteino to the FTDI adapter and then the USB cable to the PC, Moteino doesn't run.
Unfortunately, I don't have access to an oscilloscope.
Any hints?
The first indicator should be, when you power it up, does the LED flash? This is done in the bootloader and, if the bootloader isn't programmed properly, the LED won't flash and you won't be able to download any programs.
The USB startup sequence makes sense. The Moteino is drawing more power than the USB allows before driver load, another indication that the bootloader is not operating properly.
Tom
Thanks for answering Tom!
I used an Olimex AVR-ISP-MK2 for programming the bootloader with avrdudess.
The bootloader I used: DualOptiboot_V5.0_atmega328_BlinkD9_SPIdisable.hex, downloaded from https://github.com/LowPowerLab/DualOptiboot
Fuses: L 0xDE, H 0xDC, E 0x05, LB 0x3F
I got no error while flashing the bootloader.
The LED from Moteino doesn't flash when Moteino doesn't boot (the blink sketch is programmed into the Moteino). Powered up without using the FTDI (or powered up through the FTDI adapter but following this sequence: first connect the USB cable to the PC, then attach the FTDI adapter to the USB cable and, at last, connect Moteino to the FTDI adapter), the sketches work without any issue.
With the bootloader not burnt correctly it shouldn't work in any case. Am I wrong?
Possible things:
- caps are not the right rating or they drop capacitance based on VIN - use good caps - X7R etc
- I haven't checked but I would use the same fuses I put on there, check the Moteino Guide for that - https://moteino.com
- the bootloader is correct - use with 16mhz external oscillator
I already changed all the capacitors with these:
https://www.mouser.it/ProductDetail/Yageo/CC0805ZKY5V6BB106?qs=BKNoF%2F0xMNt2OCTI5NfpYw%3D%3D
https://www.mouser.it/ProductDetail/Yageo/CC0603KRX7R7BB104?qs=AgBp2OyFlx8KPmNTlFoWXA%3D%3D&gclid=EAIaIQobChMIn_KMp6O94AIVTud3Ch1laA_OEAAYASAAEgJ39_D_BwE
https://eu.mouser.com/ProductDetail/Yageo/CC0603ZRY5V8BB105?qs=QHrm%2fgeNk%252bhdiz8fCy6URw==
I found the fuses here: https://lowpowerlab.com/guide/diy-moteino/bootloader-and-basic-testing/ (I checked on https://moteino.com but there's no trace of which fuses to use when burning the bootloader)
I confirm I'm using a 16Mhz resonator
Kylix,
Not sure what else to suggest at this time. All things equal, it should work the same.
I was under the impression you already made other DIY Moteinos by hand, is that correct? Did those work fine?
It's the same batch (I have 3 of them manually assembled)...I only changed all the capacitors with new ones. Hope I'll find someone that owns an oscilloscope....
Quote from: TomWS on February 14, 2019, 09:37:12 AM
The first indicator should be, when you power it up, does the LED flash? This is done in the bootloader and, if the bootloader isn't programmed properly, the LED won't flash and you won't be able to download any programs.
The USB startup sequence makes sense. The Moteino is drawing more power than the USB allows before driver load, another indication that the bootloader is not operating properly.
Tom
Tom, you were right about the driver load. I connected the Moteino board through the FTDI adapter to another laptop which didn't have the FTDI drivers installed and it worked instantly until Windows found and installed the drivers.
After months of pulling my hair off .... I solved with your help (and Felix's). The bootloader was not correctly written. In the end I used an Arduino Uno (could have also used a Moteino though :D) as ISP Programmer and it all went smooth.
Now, the LED correctly blinks as soon as I connect the board to the PC.