Is posible?
I would like turn on/off my flashlight with a sensor motion PIR, but I have not any relay.
The flashlight has two batteries type AA, can I connect/controler it at my arduino by an "alternative mode" ?
Regards
Is posible?
I would like turn on/off my flashlight with a sensor motion PIR, but I have not any relay.
The flashlight has two batteries type AA, can I connect/controler it at my arduino by an "alternative mode" ?
Regards
You need a relay, transistor, or MOSFET. The Arduino cannot "power" much more than a standard LED, nor can it directly control or switch power.
2 aa batteries? Must be small, use a multimeter measure it's current .
Would it be fair to ask if you KNOW how to use transistors or mosfets ? (the obvious conclusion is NO because you immediately thought of a relay and to most of us, the thought of using a relay to turn on and off a little tiny AA battery flashlight is ludicrous, if not ridiculous when you can use a $ 0.60 2n2222
transistor.)
Using a 2N2222 is pretty silly as well since it will result in a whopping 23% loss in battery voltage at the light source due to its voltage drop.
Get yourself a nice n-channel mosfet for only thirty cents more right here. Then you can learn all about how to connect it up here.
avr_fred:
Using a 2N2222 is pretty silly as well since it will result in a whopping 23% loss in battery voltage at the light source due to its voltage drop.Get yourself a nice n-channel mosfet for only thirty cents more right here. Then you can learn all about how to connect it up here.
The voltage drop across a mosfet is lower? I really do have little experience with fets, except replacing them when they die...
Take a 12v supply, 2v across the led, the rest is split between resistor and transistor, if I place a 1ohm sense resistor, most of the voltage drop comes from the transistor, fet or otherwise ..
The voltage drop would be similar, since low 1
watt leds run on a couple of volts.. you'd need to also drive the fet at a higher voltage than say the 2n2222 causing more wasted heat from the fet..
Maybe I completely miss understand how a fet can be less of a voltage drop. When your circuit runs only 2aa batteries
A transistor has a saturation voltage, that is an emitter / collector voltage, it is largley indipendant of current. A FET has a saturation resistance so to speak, that is the resistance between drain and source. This produces a voltage that is proportional to the current, as in ohms law.
Using a FET on a 3V3 system is tricky because not many FETs can actually fully switch on at such a low voltage.
Grumpy_Mike:
Using a FET on a 3V3 system is tricky because not many FETs can actually fully switch on at such a low voltage.
Let's assume he is not using a 3V3 system.
Using a 2N2222 is pretty silly as well
not as silly as using a relay. 2n2222's are dirt cheap and much more available anywhere than mosfets , but
I agree a mosfet has some advantages but the 2n2222 is plug and play as a current sink. It's maybe $1 if
you don't know where to get them cheap and basically available everywhere. That's all I will say on that subject.