How to drive high power components and control using raspberry pi 5

good day!

I would like to power (with external power supply, e.g.,
12V DC 2A Fixed 2.1mm Tip Appliance Plugpack) and control on/off (perhaps using a relay) five 3W High power LEDs with raspberry pi 5. I would like to know what I need to build this circuit.

Also I would like to power and control on/off (perhaps using a relay) a 50~75 W (24V) heating pad with raspberry pi 5. I would like to know what I need to build this circuit.

I have attached two schematic designs for these two. Thanks!


It seems that you have the components sorted, but there is a question about how to connect it all together.

This is going to depend a lot on the physical layout.

For instance, the LEDs will probably be mounted to a surface of some sort, and in that case you would solder the connections between them. Is there any need for the 12v adapter to use a plug and socket? The simplest solution would be to cut off the barrel plug, crimp on a ferrule and screw it straight into the converter. If it has to be pluggable then you could use a line socket for the barrel plug and wire straight into the converter, avoiding the adapter. You will need to decide whether the heater relay is on the high power or low power side. If it’s on the low power side then you will have to size the wires to the relay with consideration of the distance you need to run. If it’s on the high power side you will need to consider the risk of interference with the signal from the Pi. And so on.

More detail on the physical arrangement and what resources you have available for soldering, making up connectors etc would be useful.

3 Likes

Hey @Yuxuan272349,

This looks like an awesome project that you have already made some solid progress on.

As Jeff has mentioned above the choice of components seems okay but your physical setup for this project will be different depending on a few factors.

The exact method of connecting these components will vary depending on how comfortable you are with soldering and other wire connection methods. I would suggest doing a trial run of these designs with temporary connections first and then looking into a cleaner and more permanent solution.

Do you have a space or enclosure in mind for this project that it all needs to fit within?

Thanks!
Sam

1 Like

In the diagram, you did not mark the connections between the Raspberry Pi and the other 3 pins (VCC, GND, OUTPUT) of the relay. You have to complete that. Also, use an official Raspberry Pi power supply to power the PI.
You can check the following links for more details about the relay module and its connection with the Raspberry pi.

Hi Ila
I like he bit at the bottom of that top link “No electronics experience needed”. Possibly a bit of truth in that but it would certainly help.
Cheers Bob

Thanks Jeff! My collaborators will help solder the wires, with soldering ions. Can I please ask why the position of the relay will interfere with the signal from pi if it is on the high power side?

Thanks Sam! The enclosure will be 80cm L * 80 cm W * 70 cm H, and the LEDs will be placed and powered outside this enclosure and light into this enclosure through light diffusers.

Thanks Lia! Yes the raspberry is powered by a 27W official power supply, I didn’t put this into the diagram, sorry for the confusion!

If you have access to soldering then that will definitely simply things like the connections to the LEDs. The other bits I would recommend would be a supply of ferrules and a ferrule crimping tool. This makes the termination of the wires for the screw connectors on the relays and step-down converter simple and secure.

If it’s OK to clip the barrel plug off the PS adapters, then this takes care of everything except the wiring from the PIs to the relays.

The signal from the Pi to the relay is low current low voltage. If the length of wire is more than a metre or so then there is a risk of adjacent electromagnetic fields interfering with the signal. For instance, if you are running the cabling underneath an iron roof or close by an electric motor then you should consider using shielded cable, or relocating the relay closer to the Pi. This cable will also carry the power for the relay, so twin-shielded would be a good choice. If the relay is relocated closer to the Pi then that connection is less critical, but you need to consider that the cable from the relay to the heater is heavy enough so that there is not an unacceptable voltage drop along the length.

1 Like

Hi Yusuan
Please heed Jeff’s advice above. There are LOTS of things to consider with a thing like this. Please note the use of ferrules. Could save you a lot of heartache when fixing wires underneath screws in terminals without wire protectors.

One thing I did notice. You indicate some 8 LEDs in series. Also a step down converter FROM 12V, down I presume. Your 8 LEDs will be something more than 12V. I don’t know what the forward voltage is across these particular devices but it could be in excess of 2V. That means that at a minimum a string of 8 would drop more than 16V. Time to rethink that bit.
Cheers Bob

Add on: Also your 12V 2A (24W) power source would be a bit border line. No head room. You indicated a converter, now every time you do this there are losses. A conversion efficiency of 85% is common. That means that if you are converting from some arbitrary voltage with a capacity of 24W you will not have 24W available after conversion. At 85% you will only have 20.4W actually (approx).

1 Like

Hi Yuxuan,

If you have a rough idea of your layout within your enclosure that would be very helpful. We can optimise how things are laid out to help prevent any issues occurring.

If you also have a link/datasheet for the LEDs that you are using we can have a deeper probe into this.