Attiny13a doesn't work with LM317, but works with Arduino 5V.

Hello!

I have my Attiny13a turning on a single led. It works fine when I power it from Arduino 5V, but it doesn't work with my LM317 5V.

My LM317 has R1=240 Ohms and R2 =720 Ohms. It is connected to a 12V 120W power source. It gives measured 5V.

I've tried to add caps of different capacitance. It hasn't helped. I've tried to add some resistors (51 - 300 Ohms) in parallel with the Attiny and it hasn't helped.

I've measure it with my oscilloscope - the voltage is stable.

I've changed R2 to 620 Ohms to lower the voltage cause Arduino supplies about 4.5V. It hasn't helped.

What am I doing wrong?

Your LM317 power supply sounds fine.

I would look at the ATtiny power-on Reset having problems with the LM317 because the 5V rail comes up too fast.

I’m not sure what you have connected to the reset pin, I would try add a resistor and cap delay like 10k 0.1uF

If you are using the reset pin as weak I/O check your fuses, if it disabled in the Fuse bytes RSTDISBL.

Do you have the necessary supply bypass cap on the attiny13? Perhaps it’s time to post schematics and photos.

prairiemystic:
Your LM317 power supply sounds fine.

I would look at the ATtiny power-on Reset having problems with the LM317 because the 5V rail comes up too fast.

I'm not sure what you have connected to the reset pin, I would try add a resistor and cap delay like 10k 0.1uF

If you are using the reset pin as weak I/O check your fuses, if it disabled in the Fuse bytes RSTDISBL.

I'm not using a reset pin. So, let me try a cap to a reset pin.

WattsThat:
Do you have the necessary supply bypass cap on the attiny13? Perhaps it’s time to post schematics and photos.

Please can you tell me what a bypass cap means? I would do a scheme in meanwhile.

100nF cap between GND and Vcc placed right at the Vcc pin.

Oh, that's funny. I've soldered everything as you recommended and found an internal short in the chip between VCC and GND. I've disconnected VCC from the VCC pin and still my multimeter shows a short. It seems I may overheated the chip. But it's strange cause I work with my solder very fast. May be I have to try a 145C solder.

An internal short as in zero ohms or a resistance measuring more than a few ohms? A few thousand ohms? What is the resistance? What brand and type of meter? Details matter.

FWIW, a shorted attiny13 would draw lots of current, get really hot and probably start to smoke, depending upon the power supply.

If you did not use an output capacitor for the LM317 I think you killed the ATTiny this way, not by soldering. The LM317 is said to overshoot output voltage considerably when power is connected and no output cap is present.

WattsThat:
An internal short as in zero ohms or a resistance measuring more than a few ohms? A few thousand ohms? What is the resistance? What brand and type of meter? Details matter.

FWIW, a shorted attiny13 would draw lots of current, get really hot and probably start to smoke, depending upon the power supply.

First LM317 got hot didn't check the Attiny chip. I've just rung it out with a multimeter and it's rung, another chip I have doesn't do it.

May I repeat the request from #2? That's likely to be quite enlightening.

For input/output caps generally best to follow the recommendations in the data sheet. p.10 onwards suggests 0.1 uF on the input, 1 uF on the output.

Smajdalf:
If you did not use an output capacitor for the LM317 I think you killed the ATTiny this way, not by soldering. The LM317 is said to overshoot output voltage considerably when power is connected and no output cap is present.

Linear voltage regulators can become high power oscillators if you don't provide the correct output
capacitors close to the chip, so its vital to check the datasheet recommendations for the size and
type of output capacitor(s).

To quote the datasheet:

An 1 μF tantalum (or 25 μF Aluminium electrolytic) capacitor on the output to improve
transient response

Also the LM317 datasheet specifies a minimum load current (normally the feedback network provides this),
and instability could be a likely consequence of inadequate output loading. This minimum output
current is 10mA worst case.

I think there could be 2 causes. 1. It may be overheated during soldering. I soldered 270 degrees, what is not that good for Attiny. 2. For few seconds I've blocked my fan, what raised the current significantly and LM317 was very hot.

Anyway, I've put all the caps you recommended me here, changed the chip and now it all works fine. Thanks!