Hello, I've been trying to sort this out, but haven't yet found the reason for this behavior. Here's the setup: MCU with Arduino UNO bootloader on a breadboard with an 8mhz oscillator (which according to the datasheet requires the same fuse settings than a 16mhz) and the necessary 22pF caps. I connect it to a variable voltage source and it stops working if I go below 3.6v.
I thought it might be some issue with the brown-out detector settings (weird because I haven't touched anything), so I've read them and they are as follows:
Nothing strange in them. I will, however get another board to ICSP the extended to 110, or even disable the brown-out detector, in case I'm dealing with a faulty chip.
Do you have any insights on what other thing should I check?
When you circuit stops at 3.6V, it might be because you circuit is noisy. Do you have enough decoupling capacitors ? Are the crystal and two 22pF close to the ATmega chip ?
Hello, thanks for your answer. I am using an 8mhz crystal. The caps are close the the chip. What do you mean by 'enough'? I have a 10uF electrolytic cap in the power supply. I have seen tutorials and my configuration is not different than theirs.
asCii:
Hello, thanks for your answer. I am using an 8mhz crystal. The caps are close the the chip. What do you mean by 'enough'? I have a 10uF electrolytic cap in the power supply. I have seen tutorials and my configuration is not different than theirs.
What about the 0.1uf decoupling cap between the Vcc and GND pins, right next to the chip?
10uF isn't much, but that depends upon how much current your power supply needs to provide. I assume this 10uF is between the rectifiers and the voltage regulator or is this running off batteries?
DrAzzy:
What about the 0.1uf decoupling cap between the Vcc and GND pins, right next to the chip?
I didn't have that one. I just put it. Nothing changed. Same behavior.
pegwatcher:
10uF isn't much, but that depends upon how much current your power supply needs to provide. I assume this 10uF is between the rectifiers and the voltage regulator or is this running off batteries?
I'm using a bench power supply, so it is acuatlly on the power trail of the breadboard. The current doesn't exceed 20mA or so. Do you suggest I add any more caps?
asCii, I noticed my fault with 16/8MHz in my Reply #1 and removed that, but you already answered with Reply #2.
Could you make a photo of it ? I would like to see the crystal with 22pF and the 100nF decoupling.
Some breadboards have bad contacts. They are the cause of many problems on this forum.
Peter_n:
Could you make a photo of it ? I would like to see the crystal with 22pF and the 100nF decoupling.
Some breadboards have bad contacts. They are the cause of many problems on this forum.
Here's the picture:
What 100nF cap? I don't think you've mentioned that. I want to point out this setup works properly for voltages above 3.6v
I see a black coil near the crystal, just kidding, it's a black wire (it's a coil).
The 22pF leads go to the ground of the breadboard, but they should go to the GND pin of the ATmega chip. Now there is a black wire (the ground wire) between the 22pF and the GND pin of the ATmega.
Could you rewire that ?
The ATmega chip needs the 5V and the GND on both sides. It really does.
The 100nF at GND and 5V is okay. Could you add one at the other side of the chip as well ?
You have 4 things to do: check brown-out detector; rewire 22pF; 5V and GND on both sides; extra 100nF.
After that it should work. Wanna bet ?
Back to the power supply. I'm still uneasy until I am absolutely sure of the power. I learned long ago that troubleshooting must start with the power, just as your medical Doctor always starts with your blood pressure. An oscilloscope would be nice just to make sure your power is clean (bench supplies can develop problems too) and also where are you getting your voltage reading from, the power supply itself or a reliable meter on your Arduino power rails?