Hi, I’m new to spark and didn’t order anything yet.
I want to build two lamps (2.5 V 0.75 W 300 mA). They are supposed to be both connected to the internet and you can switch lamp 1 on with a (hardware) switch on lamp 2 and vice versa.
The idea is very similar to the Good Night Lamp (see http://goodnightlamp.com/ ).
I would like to power the lamps with 4xAA rechargeable battery packs.
Can I somehow use these to power the Photon as well as power the lamp itself? If I see it right, I can connect the package to the photon via the VIN Pin and the lamps via the 3V3 pin. I couldn’t find any maximum for the current of the 3V3, however (Digital pins are 20mA). Can somebody confirm this or push me in the right direction?
Also, how long would you estimate this setting to last on one battery charge?
@ezebra, the Photon’s onboard 3.3v regulator, much like the Core’s, can’t provide much more than 100-200ma “extra” current on the 3.3v pin. Based on your lamp specs, your batteries will be arranged so as to provide 2.5v at maximum current. That means 2 parallel sets of 2 series batteries (to get 2.5v).
First, you will not be able to control the lamps directly with a Photon pin. Instead, you will need to use a MOSTFET transistor. Second, you will not be able to power the Photon at 2.5V so you will need to use a dc-to-dc converter to get 3.3v or 5v from the 2.5v battery pack.
Another approach is to use a 3.7v LiPo battery which can power the Photon directly. You can then regulate it down to 2.5V to power your lamps. This could be done with a zener or a dc-to-dc converter as well. I’m sure other members may have some ideas here.
As far as battery life, that would depend on the battery pack’s ma/hr rating and how long the lamp is left on as it would be the main power consumer. The Photon would need to be “on” all the time to listen for events from other lamps. We don’t yet know everything about the Photon power modes so it is too early to speculate.
Actually the lamp specs are not set yet, it was just one idea of what they could be (and what I could buy easily). Let’s presume [2.5 V 0.75 W 300 mA] (like above) for now, though.
For the first attempt: Would I not be able to to do 1 x 4 series of batteries to get 5v and use it to power the photon through the VIN pin? I understand I can’t control the lamps directly, so in this case I should be able to use a MOSFET transistor for controlling and a dc-to-dc converter to get 2.5v instead of 5v for the lamps(?)
For the second attempt – using a 3.7v LiPo battery: It should be the same batteries they use for model airplanes, right? Correct me if I’m wrong, but I would be able to charge it via the USB port as well?
I will still have to use a MOSFET transistor to control the lamp, right?
The MOSFET transistor would be connected to one of the digital pins then.
yes, using a Logic Level (low Rds) N-channel MOSFET like this you can power some ultra-bright LEDS and are fast so you can dim the LEDs with PWM on the output pin. Three MOSFETs could drive 2each (or more) of RED, GREEN and BLUE so you could create a lot of color options.
more light means more power, so with the WiFi and the light I'm hopeful that you can get what you want out of a battery!
@ezebra, yes you can put all 4 cells in series to be 6v for the Vin pin but you would be stepping down the higher power element with less efficiency than stepping up IMO. The LiPo approach is better though you could not charge it directly from the USB power without a charger controller. You could also use a super capacitor which would not require the controller but usually takes longer to charge. As @BulldogLowell pointed out, an N-channel MOSFET is perfect for the job.
Regardless of the battery, you will need to monitor its voltage to make sure the voltage does not drop below the Photon’s minimum for its regulator.