power requirements raspberry pi zero and boost/buck converte

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
garberw
 
Posts: 130
Joined: Thu Feb 17, 2022 2:25 pm

power requirements raspberry pi zero and boost/buck converte

Post by garberw »

Adafruit Universal USB / DC / Solar Lithium Ion/Polymer charger - bq24074 PID: 4755
output from solar charger has to be boosted to 12V. I use
ACEIRMC XL6019 5A High Power Current DC to DC Step-up 5V 6V 12V 24V 3-35V to 5-40V XL6019 Converter Adjustable Voltage Regulator Power Modules Boost Module Booster
https://www.amazon.com/gp/product/B0924 ... =UTF8&th=1

This is reduced by a buck converter
Adafruit UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output Product ID: 1385
Is the 5% output from this steady enough to use as a regulated power source for all of these:
(1) raspberry pi zero 2W on micro usb input (connect output of UBEC to micro usb cable plugged in to raspberry pi).
(2) MAX485 RS485 breakout (supposedly "very low power")
(3) Adafruit PCF8591 Quad 8-bit ADC + 8-bit DAC - STEMMA QT / Qwiic PID: 4648

or is it better to use an adafruit MPM 3610 which might be more regulated but is only 1.2Amps.

Anyway how many mA does the raspberry pi zero 2W really use? I read that under max load it draws 370 mA but it requires a 2.5A power supply.
I have already bought all this stuff from adafruit except the boost converter.

User avatar
garberw
 
Posts: 130
Joined: Thu Feb 17, 2022 2:25 pm

Re: power requirements raspberry pi zero and boost/buck conv

Post by garberw »

It has to be boosted for the device connected to the RS485.

User avatar
garberw
 
Posts: 130
Joined: Thu Feb 17, 2022 2:25 pm

Re: power requirements raspberry pi zero and boost/buck conv

Post by garberw »

Weather Station  with modbus  and wifi and solar copyright William Garber.  can be freely reproduced as long as my name remains on it.
Weather Station with modbus and wifi and solar copyright William Garber. can be freely reproduced as long as my name remains on it.
new_picture01b.jpg (950.71 KiB) Viewed 225 times

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: power requirements raspberry pi zero and boost/buck conv

Post by adafruit_support_mike »

garberw wrote:Is the 5% output from this steady enough to use as a regulated power source for all of these:
(1) raspberry pi zero 2W on micro usb input (connect output of UBEC to micro usb cable plugged in to raspberry pi).
(2) MAX485 RS485 breakout (supposedly "very low power")
(3) Adafruit PCF8591 Quad 8-bit ADC + 8-bit DAC - STEMMA QT / Qwiic PID: 4648
The only thing I'd double-check would be the ADC/DAC.

Digital circuits are generally robust against noise, especially long-distance protoocls like RS485. Analog circuits are more sensitive to noise because they have more critical values between 0V and VCC.

An 8-bit device will have 19mV resolution when running from 5V, and ~13mV resolution when running from 3.3V. In general, you want disturbances to be less than 1/4 the smallest value you want to measure, so in this case that means less than 5mV for a 5V supply, and less than 3mV for a 3.3V supply. Check your supply to make sure it's stable to that level, and you should be okay.

User avatar
garberw
 
Posts: 130
Joined: Thu Feb 17, 2022 2:25 pm

Re: power requirements raspberry pi zero and boost/buck conv

Post by garberw »

thanks. i'm just using the adc to tell how charged the solar battery is. it really doesn't need the full 8 bits of accuracy.

User avatar
garberw
 
Posts: 130
Joined: Thu Feb 17, 2022 2:25 pm

Re: power requirements raspberry pi zero and boost/buck conv

Post by garberw »

regarding the bq24074 solar charger:
Can I hook PGOOD and CHG up to gpio pins of the raspberry pi? What logic level are they 3.3V or 5V? If they are active low, what level are they inactive? Floating? What does "high impedance" mean (I know it means high resistance but what voltage?) Also, from the schematic it looks like the Vlipo pin is at the same voltage as the stemma JST plug, so can I read the voltage off the Vlipo pin with an adc when the battery is plugged in to the JST?

User avatar
garberw
 
Posts: 130
Joined: Thu Feb 17, 2022 2:25 pm

Re: power requirements raspberry pi zero and boost/buck conv

Post by garberw »

the datasheet says:
Open-Drain Charging Status Indication Output. CHG pulls to VSS when the battery is charging. CHG is high
impedance when charging is complete and when charger is disabled. Connect CHG to the desired logic
voltage rail using a 1kΩ-100kΩ resistor, or use with an LED for visual indication.
and
Open-drain Power Good Status Indication Output. PGOOD pulls to VSS when a valid input source is
detected. PGOOD is high-impedance when the input power is not within specified limits. Connect PGOOD to
the desired logic voltage rail using a 1-kΩ to 100-kΩ resistor, or use with an LED for visual indication.
VSS is ground.
Pardon being annyoing but what difference does it make if it is closer to 1k or 100k the resistor. I understand the rest. I guess it determines what current the PGOOD/CHG pin sinks.
suppose I use 30K.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: power requirements raspberry pi zero and boost/buck conv

Post by adafruit_support_mike »

garberw wrote:Can I hook PGOOD and CHG up to gpio pins of the raspberry pi?
Yes.
garberw wrote:What logic level are they 3.3V or 5V?
Neither. They're open-drain outputs, which means they control a high/low impedance connection to GND rather than high/low voltages.

Connect them to the RasPi and set the pins to INPUT-PULLUP. When the CHG and PGOOD pins are active, they'll pull the pin voltage to 0V. When the pins are inactive, the RasPi's internal pull-up resistors will hold the pin voltage at 3.3V.

The fact that the CHG and PGOOD pins don't have any connection to a positive voltage means they can connect to 3.3V or 5V pull-up resistors without causing any problems.
garberw wrote:Pardon being annyoing but what difference does it make if it is closer to 1k or 100k the resistor
It's a tradeoff between power and noise sensitivity.

As a rule of thumb, we generally assume 'isolated' points on a PCB are connected by parasitic resistance of a few tens of megohms unless you take special measures to increase the resistance.. teflon standoffs, hermetic seals, etc. Parasitic currents flow along those paths, and can create unexpected voltages across resistors.

If we take parasitic current into account, replacing a 1k resistor with a 100k makes the voltage created by parasitic current 100x larger. OTOH, pulling a 1k resistor from 3.3V to GND requires 3.3mA while a 100k only needs 33uA. Designers typically use 10k pull-ups because that's roughly 1000x lower than any parasitic resistance, making the unexpected voltages negligible, while keeping the activation current low. For things like voltage dividers that will always be connected between some positive voltage and GND, stepping up to the 100k range reduces the current cost to a few microamps while keeping the expected voltage from parasitic current roughly 1% of the measured value.

User avatar
garberw
 
Posts: 130
Joined: Thu Feb 17, 2022 2:25 pm

Re: power requirements raspberry pi zero and boost/buck conv

Post by garberw »

I came to a similar conclusion but I added actual pull up resistors. It will simplify the circuit when I follow your advice. You can see that I am running out of space!!!!! :-)
thank you. updated fritzing diagram in case anyone is interested. Change by removing two resistors on bottom left of cobbler (ribbon cable connector). As mike pointed out I can get same effect from activating pull up resistor from software.
Attachments
weather station.  copyright WIlliam Garber.  can reproduce freely as long as it has my name on it.
weather station. copyright WIlliam Garber. can reproduce freely as long as it has my name on it.
new_picture06b.jpg (680.14 KiB) Viewed 181 times

User avatar
garberw
 
Posts: 130
Joined: Thu Feb 17, 2022 2:25 pm

Re: power requirements raspberry pi zero and boost/buck conv

Post by garberw »

This picture put the nail in the coffin for me figuring out pull-up and pull-down resistors. The actual circuit diagram is easier to figure out than a general description.
https://www.circuits.dk/everything-abou ... erry-gpio/ Figure 2 Simplified GPIO pin internal circuit. Although the Adafruit explanation of pull-up and pull-down resistors is great as-is I suggest you add (your own version of) that Figure 2 at least that's just my two cents. And by the way I love Adafruit :-).

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: power requirements raspberry pi zero and boost/buck conv

Post by adafruit_support_mike »

garberw wrote:I came to a similar conclusion but I added actual pull up resistors.
That's good too. Resistors are cheap, and it's nice to confirm you have pull-ups just by looking at the circuit.
garberw wrote:This picture put the nail in the coffin for me figuring out pull-up and pull-down resistors. The actual circuit diagram is easier to figure out than a general description.
Yeah, that's the thing about the applied sciences: 'applied' means 'hands-on'. You can read for a week without having the Aha! moment you get from an hour of work with actual hardware. OTOH, you can spend a week at the bench being confused by things that are explained by an hour of reading. It's a back-and-forth process.. you work with hardware to understand what you've read, and you read to find answers to questions you discover at the bench.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”