Powering Attiny

Referring to the attached picture, I faced a problem of powering Attiny.

I think it's caused by noise?
Do you have any suggestion to solve this?

Thank you.

No cap at the output of the voltage regulator?

Done shrinking the pic

Thank you.

If you have access to an oscilloscope, take a look at the voltage coming off the regulator to see if it is steady and is at the voltage you are expecting.

You say that you have 5V coming off your regulator, right? How do you know this? Measurement with a multimeter, oscilloscope, or just faith that the regulator is doing what you think it is doing? What kind of regulator is it anyway? 7805?

You say it keeps restarting, which propably meens that it is resetting.

Put a 10 KOhm resistor from reset to 5V, and a 0.1 uF capacitor from 5V to ground as close to the tiny as possible.

JoeN:
If you have access to an oscilloscope, take a look at the voltage coming off the regulator to see if it is steady and is at the voltage you are expecting.

You say that you have 5V coming off your regulator, right? How do you know this? Measurement with a multimeter, oscilloscope, or just faith that the regulator is doing what you think it is doing? What kind of regulator is it anyway? 7805?

I don't have an oscilloscope at the moment.

The ouput of VR 7805 is about 5V measured using a DMM

Erni:
You say it keeps restarting, which propably meens that it is resetting.

Put a 10 KOhm resistor from reset to 5V, and a 0.1 uF capacitor from 5V to ground as close to the tiny as possible.

Doesn't this method reset attiny? I don't want it to keep resetting.

I don't have a 0.1uF C, may I use a 100uF instead? Does the value of C matters?

Thanks.

From attiny datasheet, so pulling the pin high will not reset it.

1.1.4 RESET
Reset input. A low level on this pin for longer than the minimum pulse length will generate a reset, even if the clock
is not running and provided the reset pin has not been disabled. The minimum pulse length is given in Table 21-4
on page 165. Shorter pulses are not guaranteed to generate a reset.
The reset pin can also be used as a (weak) I/O pin.

Thank you very much! I will try this!

hanyc93:
Thank you very much! I will try this!

The capacitor that the other poster mentioned is used to smooth out any noise on the line. A smaller cap reacts faster to AC. 100uF is actually pretty big. You can find .1uF, 1uF, 10uF caps anywhere. Got any old electronic junk? You probably have a bunch of these and don't know it.

Thanks!!! Great help

Sad, 5V + 10k ohm to attiny reset pin doesn't solve the problem :frowning:

Your AC/DC adapter is 6V and you're using an LM7805 to drop it to 5V. That's only a 1V difference, and the LM7805 is spec'd at a minimum 2V dropout voltage (the input must be 7V, minimum). I understand you're seeing 5V out so it seems to be working, but my assumption would be that it would become unstable as soon as you start pulling real current through it (dropout voltage typically rises with current).

The input and output capacitors on the regulator shouldn't be neglected either. .33uF between Vin and GND and .1uF between Vout and GND. The output can be unstable without them and you won't be able to see that with a DMM; need an oscilloscope for that.

Chagrin:
Your AC/DC adapter is 6V and you're using an LM7805 to drop it to 5V. That's only a 1V difference, and the LM7805 is spec'd at a minimum 2V dropout voltage (the input must be 7V, minimum).

The picture says that with the 6V supply it works, but not with the 9V.

Shpaget:

Chagrin:
Your AC/DC adapter is 6V and you're using an LM7805 to drop it to 5V. That's only a 1V difference, and the LM7805 is spec'd at a minimum 2V dropout voltage (the input must be 7V, minimum).

The picture says that with the 6V supply it works, but not with the 9V.

I remember that and thought that was pretty weird too. The only thing that I can think of is if this circuit is MORE than just the tiny and has peripherals that pull a lot of current, and therefore the 9V->5V conversion is overheating the regulator where the 6V->5V conversion (probably more like 6V->4V) is not. Any possibility of that? Are you using this to power something else that causes electrical noise like inductive loads - motors, solenoids, etc.? Those can be tricky.

Is it possible the 9V AC to DC converter is just defective due to manufacturing issues (try a second one)? Alternatively and not sure if this is a legitimate concern but maybe the 9V AC to DC converter only functions within a certain frequency range of AC and your AC power source is outside that range.

Sorry for late reply.
Problem solved.
Problem is that the adapter's maximum output is 1A but the load needs more than 1A.