# Powering with 5v?

Hi!
I have build a sensor that notify me when my garage door is closed.
This was easily done with attiny, hall effect sensor and an led.

When the door is closed a magnet is near the hall effect sensor and this makes attiny blink my led a couple of times.
What I want to do is making it portable, the sensor is using 5v so I need a 5v battery?
And I want my led lamp to be inside, this requires 5m cable, does that makes any difference? And what cable (cheap one) should I use?

And as my topics say, what battery/power shall I use when I want to make 5v projects portable?
Best regards!

So seen many 5V batteries in the shops then?

No, well you have three choices:-

1. Use a higher voltage battery and put it through a regulator.
2. Use a voltage that does not exceed 6V and see how much it can discharge before it stops working.
3. Use a step up regulator like the minty booster.

Grumpy_Mike:
So seen many 5V batteries in the shops then?

No, well you have three choices:-

1. Use a higher voltage battery and put it through a regulator.
2. Use a voltage that does not exceed 6V and see how much it can discharge before it stops working.
3. Use a step up regulator like the minty booster.

Yeah a 6v battery is a possible option, but isn't there a risk that the unit (attiny) will damage because of the high voltage (+1v) ? Or doesn't that matter when it's just one volt abow the requirement?
About the minty booster, 2 AA batteries (1,5 + 1,5 = 3v) but how could it output 5v?

best regards!

but how could it output 5v?

Because it is a switching regulator. It converts the energy from the battery into a magnetic field. Then that field is converted back into a voltage. The voltage can be higher than the input at the expense of higher current on the input side that the output side. These sort of things operate between 80 to 95% efficiency. So while you get more voltage you get less current.

Or doesn't that matter when it's just one volt above the requirement?

No the reason why it is 6V maximum is because it say it in the data sheet. 5V recommended with 6V maximum.

And keep in mind that 6 fresh batteries won't give you 6V either, but a little bit above that. So you should use a regulator.

Can i power Arduino Uno thru 5V pin ?
I have a regulated power supply (BEC from my RC model)
What other Arduinos can be powered thru 5V pin ?

Try 3 AA batteries into the 5V pin, the Arduino(s) will run just fine on that, perhaps the sensor as well.
Longer endurance? 3 Cs, 3 Ds.

I powered my mega and nano through the 5V pin. No issue, even when switching to/from USB. Of course, establishing USB communication will reset the board.
And if you "hijack" 5V from an existing power supply (like I do), you need to check you don't overload it.

yep. i had a problem with overloading few days ago (during powering thru USB and taking power from 5V pin)
I was testing 2 micro servos (9g) and when they were moving (without load), my PC was loosing connection thru USB.

An ATtiny will run on 3V. Check your datasheet.