Replacing the LM2596 from the beginner's guide

Sinibotia

Active Member
View Badges
Joined
Oct 2, 2019
Messages
171
Reaction score
261
Location
Portland Maine
Rating - 0%
0   0   0
I'm getting started trying to build an all in one reef pi but also teaching myself a lot of this on the fly. I'm following the guide to build the power controller but the buck converter in the parts list (LM2596) leads to a 404 and all I can find are multipacks of that part. I found a buck converter of up to 21V to 5V on adafruit (MPM3610) and I'm wondering if I can use that as a simple substitution.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
1.2A output sounds a bit low, you might run into problems running a Raspberry Pi Zero from this.
In the beginning I tried two apple phone chargers with 1.0A and 2.5A, but only the latter was able to bring the Zero through the boot phase with an Ethernet Connector attached. To be fair, the Ethernet Connector draws something like 200-300 mA itself and phone chargers are not exactly made to supply a computer without a battery, but it indicates that you might need a beefier converter, especially if you want to run additional equipment from this and not just the PI itself.

You can try this converter if you want, but I would recommend using one dedicated Converter for the PI and another for everything else.
You can also try more beefy converters like this one:
https://www.adafruit.com/product/1385

Personally I’m using these:
https://www.dfrobot.com/product-1552.html
(ordered them from digikey though) since it’s the tried and tested LM2596 IC and I can report: works for me as well, even though it‘s a bit spacey as you can see in my build thread:
a9d4a306-09ce-44f4-a4bd-23f02d944acf-jpeg.2771856
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
I'm getting started trying to build an all in one reef pi but also teaching myself a lot of this on the fly. I'm following the guide to build the power controller but the buck converter in the parts list (LM2596) leads to a 404 and all I can find are multipacks of that part. I found a buck converter of up to 21V to 5V on adafruit (MPM3610) and I'm wondering if I can use that as a simple substitution.
Hmm, just thought about it again and I think if you are careful with the load, it might work.
If one compares:
LM2596: 150kHz, 220 micro Farad output buffer
MPM3610: 2 MHz, 22 micro Farad output buffer
So the output buffer is 10x smaller, but the frequency of topping up is also 10x higher, so the voltage stability with a fluctuating load might actually be comparable, e.g. both might be similarly suited to power a PI zero.

That’s the main problem as far as I understand e.g. the current that the PI draws on boot fluctuates a lot, but the CPU also needs a certain voltage stability to function correctly. So if the power source can’t keep up and the voltage drops below the CPUs requirement during load spikes, the PI crashes.
 
OP
OP
Sinibotia

Sinibotia

Active Member
View Badges
Joined
Oct 2, 2019
Messages
171
Reaction score
261
Location
Portland Maine
Rating - 0%
0   0   0
Hmm, just thought about it again and I think if you are careful with the load, it might work.
If one compares:
LM2596: 150kHz, 220 micro Farad output buffer
MPM3610: 2 MHz, 22 micro Farad output buffer
So the output buffer is 10x smaller, but the frequency of topping up is also 10x higher, so the voltage stability with a fluctuating load might actually be comparable, e.g. both might be similarly suited to power a PI zero.

That’s the main problem as far as I understand e.g. the current that the PI draws on boot fluctuates a lot, but the CPU also needs a certain voltage stability to function correctly. So if the power source can’t keep up and the voltage drops below the CPUs requirement during load spikes, the PI crashes.
considering this project is using a pi 4 (just what I happened to have lying around), looks like I may need to pick up that other converter.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
considering this project is using a pi 4 (just what I happened to have lying around), looks like I may need to pick up that other converter.
Yeah, for a Pi 4 I would definitely recommend a converter with more power, at least judging from my limited experince with the Zero ^^
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Go for a beefier, high current driver because pi4 consumes more. Also make sure you feed the current through the usb c port, gpio pins max at 1A current draw.
 
OP
OP
Sinibotia

Sinibotia

Active Member
View Badges
Joined
Oct 2, 2019
Messages
171
Reaction score
261
Location
Portland Maine
Rating - 0%
0   0   0
Go for a beefier, high current driver because pi4 consumes more. Also make sure you feed the current through the usb c port, gpio pins max at 1A current draw.
So if I power the pi 4 directly with a supplied usbc then do I even need the 12V power supply and a converter or will the power come from the 5v and 3v gpio pins?
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
So if I power the pi 4 directly with a supplied usbc then do I even need the 12V power supply and a converter or will the power come from the 5v and 3v gpio pins?
No, unless you need power for some other circuit. Ato, temp, ph all should be fine
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
So if I power the pi 4 directly with a supplied usbc then do I even need the 12V power supply and a converter or will the power come from the 5v and 3v gpio pins?
Depends on what you want as @Ranjib mentioned the 5V pin is recommended for up to 1A.

In my current build I do have to say that I don't actually need the 12V. You can easily run 12V peristaltic pumps on 5V, as they only slow down to about 30%, but still run.

I have a comprehensive power draw list of my current build in my build thread you can consider as a reference. The most limiting factors will be "high power devices" like an AC relay board (up to 850mA when all 8 relays are active) and 4 peristaltic 12V dosers (up to 1240 @ 12V and up to 960mA @ 5V). Although if you do it right, the relays will be off most of the time and the pumps will only run seldomly. You could also "just" use two separate 5V supplys, one for the sensors and the PI side of things and one for the power hungry relais and dosers.

12V is in my mind only useful for running 12V peristaltic pumps at higher speed and powering LED strips directly. You'll have to decide if you want that. If not, there is probably little downside to going 5V directly. Keep in mind though what I mentioned above: USB chargers are for example not necessarily made to supply a stable 5V for fluctuating loads, so if you go that route, take a very beefy USB supply with a lot of headroom. I'm thinking of something like 3A.
 
OP
OP
Sinibotia

Sinibotia

Active Member
View Badges
Joined
Oct 2, 2019
Messages
171
Reaction score
261
Location
Portland Maine
Rating - 0%
0   0   0
Depends on what you want as @Ranjib mentioned the 5V pin is recommended for up to 1A.

In my current build I do have to say that I don't actually need the 12V. You can easily run 12V peristaltic pumps on 5V, as they only slow down to about 30%, but still run.

I have a comprehensive power draw list of my current build in my build thread you can consider as a reference. The most limiting factors will be "high power devices" like an AC relay board (up to 850mA when all 8 relays are active) and 4 peristaltic 12V dosers (up to 1240 @ 12V and up to 960mA @ 5V). Although if you do it right, the relays will be off most of the time and the pumps will only run seldomly. You could also "just" use two separate 5V supplys, one for the sensors and the PI side of things and one for the power hungry relais and dosers.

12V is in my mind only useful for running 12V peristaltic pumps at higher speed and powering LED strips directly. You'll have to decide if you want that. If not, there is probably little downside to going 5V directly. Keep in mind though what I mentioned above: USB chargers are for example not necessarily made to supply a stable 5V for fluctuating loads, so if you go that route, take a very beefy USB supply with a lot of headroom. I'm thinking of something like 3A.
I definitely won't be powering an LED directly. I may end up adding a power source for the lighting circuit if I decide to continue to add on but I am currently just doing the relay, temp and pH, auto top off, etc, so I think I'll be ok.

Would I need to connect the 5V rail to the opposite side of the ULN2803- in the tutorial schematic it's connected on the same side as a direct connection from the 12V power supply, between the ULN2803 and the DB9 connection. As I'm understanding it the ULN2803 would increase the voltage to 12V which is necessary for the DB9. I want to make sure I'm understanding this correctly before I solder.

Edit: I think I was misunderstanding the function of the ULN2803 but I'm not sure I fully understand it now. How would you suggest I change the circuitry to run with the pi 5V rail through the GPIO?
 
Last edited:

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
I definitely won't be powering an LED directly. I may end up adding a power source for the lighting circuit if I decide to continue to add on but I am currently just doing the relay, temp and pH, auto top off, etc, so I think I'll be ok.

Would I need to connect the 5V rail to the opposite side of the ULN2803- in the tutorial schematic it's connected on the same side as a direct connection from the 12V power supply, between the ULN2803 and the DB9 connection. As I'm understanding it the ULN2803 would increase the voltage to 12V which is necessary for the DB9. I want to make sure I'm understanding this correctly before I solder.

Edit: I think I was misunderstanding the function of the ULN2803 but I'm not sure I fully understand it now. How would you suggest I change the circuitry to run with the pi 5V rail through the GPIO?

I believe you did indeed misunderstand the ULN2803. It’s comprised of 8 bipolar transistors that act as a GND-side switch. If you apply a high signal (3.3 V) to one of the inputs, the corresponding output becomes conductive to GND.
What exactly are you building, the AC relay circuit ? I don’t quite remember that needing 12V, I believe that runs all on 5V. The 12V was only there to be stepped down to 5V, if I remember correctly.
[Edit:] I was writing too fast again, sry. In the Adafruit guide an RJ power strip was used, which internally operates with 12V. That’s why the COM port on the ULN2803 was connected to 12V. The COM limits any voltage on the OUT pins to the voltage on COM to protect your circuit, mostly from inductive loads that can cause voltage spikes.
If you are building the AC relay this safety is most likely not necessary, but if you want it, it needs to be connected to the voltage that the relay uses. If you have a 5V relay board like I do, you need to connect this to +5V.
 
Last edited:
OP
OP
Sinibotia

Sinibotia

Active Member
View Badges
Joined
Oct 2, 2019
Messages
171
Reaction score
261
Location
Portland Maine
Rating - 0%
0   0   0
I believe you did indeed misunderstand the ULN2803. It’s comprised of 8 bipolar transistors that act as a GND-side switch. If you apply a high signal (3.3 V) to one of the inputs, the corresponding output becomes conductive to GND.
What exactly are you building, the AC relay circuit ? I don’t quite remember that needing 12V, I believe that runs all on 5V. The 12V was only there to be stepped down to 5V, if I remember correctly.
[Edit:] I was writing too fast again, sry. In the Adafruit guide an RJ power strip was used, which internally operates with 12V. That’s why the COM port on the ULN2803 was connected to 12V. The COM limits any voltage on the OUT pins to the voltage on COM to protect your circuit, mostly from inductive loads that can cause voltage spikes.
so if I am using the RJ power strip, I would need the 12V? or would I not need to connect the COM to a power source at all? thank you so much for your help and patience btw. I am still learning electronics as I go!
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
so if I am using the RJ power strip, I would need the 12V? or would I not need to connect the COM to a power source at all? thank you so much for your help and patience btw. I am still learning electronics as I go!
You could leave the COM completely unconnected, that would work as well, even though with less safety.
However, I believe the powerstrip might not have its own 12V power source, in that case you would need 12V anyway and would not gain anything from leaving the COM unconnected.
@Ranjib might be able to assist with his knowledge about the power strip.
 

Being sticky and staying connected: Have you used any reef-safe glue?

  • I have used reef safe glue.

    Votes: 128 88.3%
  • I haven’t used reef safe glue, but plan to in the future.

    Votes: 8 5.5%
  • I have no interest in using reef safe glue.

    Votes: 6 4.1%
  • Other.

    Votes: 3 2.1%
Back
Top