Author Topic: Power supply advice?  (Read 7162 times)

dougal

  • Sr. Member
  • ****
  • Posts: 289
Power supply advice?
« on: March 25, 2013, 08:53:39 am »
I recently picked up a barometric pressure/temperature sensor (Sparkfun BMP085: https://www.sparkfun.com/tutorials/253), to make a little weather station. Reading the specs, I see it takes a max 3.6V, so I became concerned about how I'll power it. I had originally planned to power the Digispark with a 9V battery, and figured I'd then just use the spark's 5V regulator power to handle peripherals. Obviously, I can't do that.


The next most obvious thing is to power the spark itself at 3.3V (or thereabouts), and just power this board in parallel.


Or, I could introduce some extra power regulation with a circuit that provides multiple voltage outputs. I've looked at some DIY circuits, and pre-built boards.


I'm just not sure which way I should go. The power handling part of electronics is not my forte. I always leaned towards the TTL circuit side of things.


What advice can my fellow hobbyists offer?


(BTW, for anyone else wanting a similar sensor -- I later found similar boards for about half the price I paid for mine. I got it as an impulse buy at Microcenter for about $20. But DX.com has similar boards for about $10, or even less if you get a model with less accuracy).

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Power supply advice?
« Reply #1 on: March 25, 2013, 09:59:43 am »
I'd just use a 3.3v regulator running from the 5v line to power this sensor - then give the Digispark VIN line whatever you'd like - like 9v. Yes it gets regulated twice at some loss, you could also run the 3.3v regulator form the 9v if it can handle it. 

microtherion

  • Newbie
  • *
  • Posts: 15
Re: Power supply advice?
« Reply #2 on: March 25, 2013, 10:39:34 am »
I recently picked up a barometric pressure/temperature sensor (Sparkfun BMP085: https://www.sparkfun.com/tutorials/253), to make a little weather station. Reading the specs, I see it takes a max 3.6V, so I became concerned about how I'll power it. I had originally planned to power the Digispark with a 9V battery, and figured I'd then just use the spark's 5V regulator power to handle peripherals. Obviously, I can't do that.

[/size]
[/size][size=78%]Maybe I’m being naïve here, but why can’t you simply put a 2:1 voltage divider on the 5V output? 2.5V should be neatly in spec.[/size]
[/size]
[/size][size=78%]Another consideration here is that 9V batteries have, as I recently learned, an absolutely terrible capacity (about HALF the capacity of a AAA battery) and the linear regulator to regulate that down to 5V is quite inefficient. See [/size][/size][size=78%]http://cybergibbons.wordpress.com/2013/03/16/arduino-misconceptions-6-a-9v-battery-is-a-good-power-source/[/size] for some detailed math.

semicolo

  • Full Member
  • ***
  • Posts: 137
Re: Power supply advice?
« Reply #3 on: March 25, 2013, 11:26:06 am »
You mean with resistors?
Resistor dividers work well if the output current is low, else the output voltage decreases with the current increase and it's hard to get a stable output voltage if the current changes.

If you're thinking about a 50% duty cycle dc-dc converter, then it's ok.
« Last Edit: March 25, 2013, 11:28:39 am by semicolo »

Mark

  • Full Member
  • ***
  • Posts: 196
Re: Power supply advice?
« Reply #4 on: March 25, 2013, 12:43:40 pm »
dougal
The supply voltage is easy to solve with a regulator, either from Vin or from the 5v regulator.
You will need to have your I2C pullup resistors go to 3v3 to prevent damaging the sensor.
The link asks the question, but no-one answered it.

I2C works by the master and devices pulling the voltage down, and the 3v3 for no data is enough to register as a High on the 5v DS (or Arduino).

The resistor divider is not a good idea as the current the sensor draws will change.
Imagine your hose with a restriction part way, its fine when the flow is low, but as the flow increases the pressure falls off.
Regulators adjust to always supply the required output.

Often you find the small regulators in optical mice, if you are into scrounging/re-purposing.

Mark

microtherion

  • Newbie
  • *
  • Posts: 15
Re: Power supply advice?
« Reply #5 on: March 25, 2013, 07:54:20 pm »
The resistor divider is not a good idea as the current the sensor draws will change.


Good point; I had not really considered that. While average current the BMP085 will draw is only 5µA, peak current is up to 1mA.

Mark

  • Full Member
  • ***
  • Posts: 196
Re: Power supply advice?
« Reply #6 on: March 26, 2013, 12:06:48 am »
microtherion
If the current draw is a very short duration, you could get away with a BIG capacitor.
However its not a good idea.
 
You should have two capacitors on any supply line ie the new 3v3 supply.
A 0.1uF for bypassing high frequency noise (usually related to the data) and a 47uF (preferably larger) for absorbing the minor fluctuations that occur while the regulator plays catchup with the load change.
 
Sure you can get away without these, but its good design practice, so one should get in the habit.
 
Mark

Jay

  • Newbie
  • *
  • Posts: 2
Re: Power supply advice?
« Reply #7 on: July 17, 2014, 07:54:05 pm »
Erik said this might be a good place to let everyone know there's a new 3.3v / 5v power supply that runs on 2 AA batteries.  If you're looking at this in July 2014, they are still taking pre-orders on  Kickstarter. http://kck.st/1pICfaX