Berndiboy - Homemade Arduboy

It is a DSO Nano:

longshot: Try copying the AVRdude command line from the IDE log and paste it into a command windows (CMD) and then append a space and -B 100

Not sure if it’s been said already but check if there is a short between the clock pins or GND at the atmega.
(missed one ofg your messages where you mentioned you check for shorts)

That scope only has a 200KHz bandwidth, so it couldn’t check the crystal, but is would be useful for checking the programming signals with the programmer set for a slow speed. It could confirm that all the output signals are getting where they should and also that the power supply is clean.

Brings me back to the fact that i would not know how to use and how to read it… So i assume this is out as an option.
Normally i am not givin up fast but when you can’t explain why it does not work you are just lost. And beside that this good feeling when something works out is just not there… Feeling kind of sad at the moment :frowning: Working on it now since weeks without a single success experience can bring one down.

1 Like

For the simple testing that you would need it for, it shouldn’t be hard to set up and learn how to use. It would be good for you to learn how to use it anyway, rather than having it go to waste.

Since you’re using a UNO as your programmer, you could write a sketch for it that just toggled each output (Reset, SCK and MOSI) individually and then use the oscilloscope to see if the signals are getting to the 32U4 pins properly, without affecting the others. Once that was working, you could use the scope with the programmer code running to see if the actual programming signals look OK. You could also use the scope to look at the power supply to the 32U4 for noise or dips that could cause problems.

If after all this, everything looks OK, but the 32U4 isn’t responding to programming, the most likely cause would be that the crystal generated clock isn’t working (or the chip is bad).

I can imagine your dissapointment (and frustration) for not being able to find out what’s wrong. Give it a break for a day or few so you can look at it again with a fresh state of mind. The positive of your situation is that you’re learning a lot.

You’ve said you’ve used the Uno as an ISP programmer before successfully. But you should confirm your Uno as ISP is functioning properly in the current setup. Try hooking it to a Pro Micro or one of your modded Arduboys expansion connector and see if ISP-ing with it works. Open a command line promt and copy and paste the following line (using the path from your log above):

C:\Clean\arduino-1.8.12\hardware\tools\avr/bin/avrdude -CC:\Clean\arduino-1.8.12\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cstk500v1 -PCOM3 -b19200 -Ulfuse:r:-:h -B 100

When successful the above line reads out theID and fuse settings and you can rule out a programmer issue (unless you wire up your Berndiboy incorrectly for ISP)

To test a clock issue, you could use one of the Unos timers and configure it so it toggles an GPIO pin and feed that into the atmega32u4 as a clock at pin 17 XTAL1

To test the Unos gpio pin toggling. You could set the timer to a low frequency first and test it’s output using a piezo speaker.

When you’re able to read the fuses with this setup and the above command . try writing the low fuse to 0xFF using:

C:\Clean\arduino-1.8.12\hardware\tools\avr/bin/avrdude -CC:\Clean\arduino-1.8.12\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -cstk500v1 -PCOM3 -b19200 -Ulfuse:w:0xFF:m  -B 100

This will not only unprogram the CLKDIV8 fuse but also set a different clock configuration with a 65ms startup delay which will help stabelize your ceramic resonator


Don’t give up!
But I would say you’ve taken a very difficult approach… :grimacing:
Even experienced electronic engineers like to build up circuits bit by bit, using prototyping (like breadboards, etc.). This debugs the hardware and perhaps more importantly, checks our own understanding.

PS- The Arduboy started life with @bateske grabbing ‘blocks’ of existing circuits and sticking them together. It’s a great approach to starting a project.


Hi together,

thanks for the kind words. Gives back some energy. I also took one day off to get the head free.

I will try to do the extended testing with test sketch on the pins and also try your approach @Mr.Blinky

@acedent: Thanks. But i can make you some pictures of things i have already built in the past and you will realize that in theorie i should be able to “hit the next step”. My only problem is that i also just use existing examples and put them together but without the complete knowledge around electronics… So when it works - perfect. When it does not work and it is not a short or anything else simple then i am lost… But i was lost with creating PCBs 2 months ago and never made an own schematic, so to learn some basics in signal testing etc seems to be the next necessary step in the journey :exploding_head:

I will continue today and share the results.

Thanks again to all for the help and nice words!!

1 Like

@mameise, What is the make and model of the multimeter you have? If it is capable of measuring frequency (and you don’t want to try to use your oscilloscope), it could be useful. @Mr.Blinky’s idea of using a piezo speaker is good, but measuring frequency using a meter may be more convenient for this.

Did you select the leonardo as your board before trying to burn the bootloader. The ide has to know that, trying to burn another bootloader could cause this message!

Sorry, was busy last days and could not really continue. I highly doubt that i have such a super multimeter :slight_smile: But i will look up the model (it is from Voltkraft, that i know)and provide you the model. Thanks

1 Like

Have you had any luck yet? I think the below may be of some help.

last weekend I burned the factory default fuse settings to an atmega32u4 of a Pro Micro for test purposes and after the fuses were changed. I was unable to use any of my ISP programmers.

The reason why is that with the default fuse settings the 32u4 requires an external clock supplied to the XTAL1 pin.

To supply an external clock I took another Pro Micro (got a bunch of these :grin: ) and programmed it with the below sketch to output an 8MHz clock on pin 9.

I soldered a wire to the capacitor connected to XTAL1 on the non programmable Pro Micro and connected it to Pin 9 of the Pro micro that generates the 8MHz (also connected GND and Vcc ofcourse)

With this setup I was able to program the Pro Micro again. After flashing the correct fuse settings. It can be programmed normally without the 8MHz clock connected to XTAL1.

8MHz clock generator sketch
constexpr uint8_t OCR1A_PIN = 9;   // Leonardo / (Pro)Micro clock output pin
constexpr uint8_t OCR1A_8MHZ  = 0; // asuming board uses 16MHz clock
constexpr uint8_t OCR1A_4MHZ  = 1; 
constexpr uint8_t OCR1A_2MHZ  = 3; 
constexpr uint8_t OCR1A_1MHZ  = 7; 

void setup()
  pinMode(OCR1A_PIN, OUTPUT); // configure clock output pin
  TCCR1A = ( (1 << COM1A0));
  TCCR1B = ((1 << WGM12) | (1 << CS10));
  TIMSK1 = 0;               

void loop() 
XTAL1 access point on Pro Micro (for general reference)


1 Like