Jump to content

Raspberry Pi controlling an electronic latch - Electronics help


Recommended Posts

I made a project involving voice recognition on a raspberry pi so you can speak a password to open a box. Long story short, my DC-DC step up converter to power the latch seems to be super unreliable. I am wondering if some of my trouble is related to how I have it wired up and if someone could suggest a better approach.

I have 2 battery packs (https://www.adafruit.com/product/354) wired in parallel.

Those are powered off a charger (https://www.adafruit.com/product/390) So output of this board, and the two batteries, are connected to the main positive and negative lines at the edge of my PCB.

Attached to those lines I have a boost converter (https://www.adafruit.com/product/2030) which powers my raspberry pi.

Also attached to the main lines, I have an adjustable boost converter (https://www.amazon.com/gp/product/B01MS3IAVL/ref=ppx_yo_dt_b_asin_title_o08_s00?ie=UTF8&psc=1) the positive on the positive line, the negative comes back to the collector of a TIP 120 (https://cdn-shop.adafruit.com/datasheets/TIP120.pdf) the emitter goes to the negative line on the PCB. The base is connected via a resistor to GPIO on my raspberry pi.

I had it all sorted out and working about 2 weeks ago, and then it just stopped. I have had problems numerous times when I came back to the project and the output voltage of my converter had drifted from the desired 12V. So when it stopped working I opened the box up and checked on it, it was putting out 5 volts and wouldn't respond to adjustments on the potentiometer.  I have been troubleshooting all weekend, but just now I tried wiring it directly to the battery lines and it works as expected. Is something about my setup throwing it off? Do I just have a cheap, unreliable boost converter? Interestingly, on my original order it says the input range is 3-32v, but now the link I provided says 5-32v. Could my problem be related to low input voltage?

 

Link to post
Share on other sites

There are many small form factor, computer switching ( digital ) power supplies available on eBay, powered from your mains, which will supply both the 5V, as well as 12V, in several Amps.
Most are available for about $25.

Why complicate things ?

Link to post
Share on other sites
6 hours ago, Callipygous said:

I had it all sorted out and working about 2 weeks ago, and then it just stopped. I have had problems numerous times when I came back to the project and the output voltage of my converter had drifted from the desired 12V. So when it stopped working I opened the box up and checked on it, it was putting out 5 volts and wouldn't respond to adjustments on the potentiometer.  I have been troubleshooting all weekend, but just now I tried wiring it directly to the battery lines and it works as expected. Is something about my setup throwing it off? Do I just have a cheap, unreliable boost converter? Interestingly, on my original order it says the input range is 3-32v, but now the link I provided says 5-32v. Could my problem be related to low input voltage?

check whether the output power of the dc-dc converter matches the power consumption

whether it is very hot

Edited by SergUpstart
Link to post
Share on other sites
On 12/20/2020 at 2:55 PM, MigL said:

There are many small form factor, computer switching ( digital ) power supplies available on eBay, powered from your mains, which will supply both the 5V, as well as 12V, in several Amps.
Most are available for about $25.

Why complicate things ?

I have been trying to figure this out. It looks like there are some options that are basically what I'm using, which is variable input,  adjustable output in the ~3-30v range. Then there are some other ones that seem like they might be easier to use and more reliable, because they aren't adjustable, they just put out 12v. So far I haven't figured out how to consistently find and filter those. This is the closest I have found so far. The downside is they talk about current more like 50mA, not the 1-2 amps I think my latch probably needs.

 

You have any hints for how to specify the non-adjustable types? Does the one I linked even seem like what you were referring to?

Link to post
Share on other sites

You know that Pinput = Poutput , right? So Uin * Iin = Uout * Iout .. (unrealistic idealistic assumption that we have no loses.. so actually it is Pinput > Poutput )

On the page that you gave about batteries we can read: "Each cell can provide 1A of current for about 4 hours so all together the peak current you can draw is a little over 1.5 Amps. Note that these batteries are not designed to sustain such high loads, we suggest keeping any constant current draw under 1A."

Uin = 3.7 V Iin = 1 A so Pin = 3.7 W (with peak 1.5A * 3.7V = 5.55 W)

Then you say:

Quote

I have had problems numerous times when I came back to the project and the output voltage of my converter had drifted from the desired 12V.

Which means:

3.7 W / 12 V = 0.3 A = 300 mA ...

Realistically, including loses on conversions, it will be less.

Do you think so your entire electronics is able to work with so low current?

 

Plug some current meter which will be able to record current (e.g. Arduino current meters which can store on SDHC cards)

https://www.google.com/search?q=Arduino+current+meters+which+can+store+on+SDHC+cards

https://create.arduino.cc/projecthub/Varun_Chandrashekhar/arduino-voltage-current-meter-with-sd-card-support-2a5df6

..and you will get graph of voltage/current on timeline.. when the next time there will be problem, data will recorded, and you will be able to analyze..

 

When you adjust potentiometer on the booster, to give you more voltage, from batteries with fixed maximum power, booster must give less current..

It is simple energy conservation law.

Link to post
Share on other sites

A regular PC power supply is approx. 6 x 6 x 4 inches and will put out 300-400 watts.
At least  5v@12a and 12v@12a with trivial amounts on the -5v and -12v rails.
You can easily find smaller power supplies made for small form factor PCs that are about3 x 3 x 6 in., and will do about 180 watts; that should be able to supply you with plenty of well regulated 5v and 12v for your needs, without trying to step-up a 5v supply to 12v.

Link to post
Share on other sites
10 hours ago, Sensei said:

You know that Pinput = Poutput , right? So Uin * Iin = Uout * Iout .. (unrealistic idealistic assumption that we have no loses.. so actually it is Pinput > Poutput )

On the page that you gave about batteries we can read: "Each cell can provide 1A of current for about 4 hours so all together the peak current you can draw is a little over 1.5 Amps. Note that these batteries are not designed to sustain such high loads, we suggest keeping any constant current draw under 1A."

Uin = 3.7 V Iin = 1 A so Pin = 3.7 W (with peak 1.5A * 3.7V = 5.55 W)

Then you say:

Which means:

3.7 W / 12 V = 0.3 A = 300 mA ...

Realistically, including loses on conversions, it will be less.

Do you think so your entire electronics is able to work with so low current?

I mostly agree with your math. The part I wonder about is whether the batteries have a fixed output, or a recommended maximum output. What I do know is that the project has worked successfully for reasonable periods of time. The latch is activated for 2 seconds at a time. I don't know if that qualifies as a sustained load, or if they really mean "don't draw that much for 2 hours" The link from my original order no longer works, but the latch is basically identical to this. That claims a draw of .43 amps, which is more than your calculation says my batteries should be okay with. So again, I don't know if it's really a fixed output or a maximum recommended, but I do know that it worked, repeatedly, and for a period of at least a few weeks. The latch at least appears to be ok with the available current. The issue seems to be with consistently providing that current. maybe some part of this set up damaged the converter?

Actually, I have two of those battery packs wired up in parallel, so really the peak output is doubled. So the latch is probably fine, though I'm not sure how much the Pi is adding onto that. Still not sure if a 2 second use should be counted against peak or sustained.

 

3 hours ago, MigL said:

A regular PC power supply is approx. 6 x 6 x 4 inches and will put out 300-400 watts.
At least  5v@12a and 12v@12a with trivial amounts on the -5v and -12v rails.
You can easily find smaller power supplies made for small form factor PCs that are about3 x 3 x 6 in., and will do about 180 watts; that should be able to supply you with plenty of well regulated 5v and 12v for your needs, without trying to step-up a 5v supply to 12v.

Ah, now I see the miscommunication. Those are both too large to meet my requirements. This entire project lives in a space that is about 4 wide x 3 deep x 4 high. And the front is slanted, so at the top its only about 2 inches deep. after the batteries, pi, and other components I really need the dc converter for the latch to fit into about 1x2x2. It also runs off batteries, so a PC power supply designed to plug into the wall doesn't fit the bill. I need something to step 3 volts up to 12 volts.

Edited by Callipygous
Link to post
Share on other sites
6 hours ago, MigL said:

A regular PC power supply is approx. 6 x 6 x 4 inches and will put out 300-400 watts.
At least  5v@12a and 12v@12a with trivial amounts on the -5v and -12v rails.
You can easily find smaller power supplies made for small form factor PCs that are about3 x 3 x 6 in., and will do about 180 watts; that should be able to supply you with plenty of well regulated 5v and 12v for your needs, without trying to step-up a 5v supply to 12v.

...but where is the fun of creating electronic projects.. ? ;)

 

 

Edited by Sensei
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.