Electronic – ATtiny13a capacitive power supply

ac-dcattinycapacitivepower supplytransformerless

I would like to power my Attiny13a MCU with a transformerless capacitive power supply. The MCU itself needs only a few milli amps and it will drive 2 LEDs at 15mA each through it's digital pins. So I guess total power consumption might be less than 50mA at 5V.

I have come up with this circuit but I have a few concerns.

enter image description here

  • Would this circuit work fine with my MCU?
  • Sometimes there is a power outage and my home inverter starts supplying square wave ac – will this damage this circuit?
  • Should I use a 65V smoothing capacitor instead of the 25V one?
  • Would those 1/4w resistors do their job or should I get 1/2w ones?
  • Do I really need the resistor before the zener diode? if so is 100R correct?
  • I saw another circuit which has an additional resistor. Is that really needed?

enter image description here

As for safety concern the project will be enclosed in a plastic box placed in the ceiling where no one can reach and I will also add a warning label.

Thanks in advance.

Best Answer

You're trying to make a "capacitive dropper circuit".

The circuit topology looks fine to me but not the component values.

That 1.2uF cap is far too large, make it 470 nF.

Re-calculate that value by following the procedure described here.

You do not want only 470 ohm across that capacitor, it will BURN. The reason to have a resistor there is to discharge the capacitor when the circuit is disconnected from mains voltage. A 1 M ohm resistor is what you want to be using.

The extra 100 ohm resisor is not really needed but can help protection against voltage spikes so I would place it anyway. 100 ohms is OK Ideally you would be using a "fusable resistor" (a resistor which also acts as a fuse).

Would this circuit work fine with my MCU?

Sure, an MCU does not care where the DC voltage comes from as long as it is DC of the correct value.

... supplying square wave ac - will this damage this circuit?

No that should not matter.

Should I use a 65V smoothing capacitor instead of the 25V one?

No, that is not needed as the voltage is not going to exceed 25 V anyway.

Would those 1/4w resistors do their job or should I get 1/2w ones?

Do the calculations and you will know.

Do I really need the resistor before the zener diode? if so is 100R correct?

Since there is already a series impedance (the capacitor) before the bridge rectifier, no you do not need the resistor. However with the resistor you might get a more smooth supply voltage. 100 ohms is a good starting point but it also depends on the current you need.

That 470 uF capacitor is also much to large, a 100 uF would be more than enough.