Notifications
Clear all

Power Supply Question

7 Posts
3 Users
4 Reactions
997 Views
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 217
Topic starter  

I have a project that includes an ESP32S3 along with four relays.  Can I use a single 5Vdc PS to power both the ESP32S3 and relay coils, or should I keep the ESP32S3 source difference than what is used for the relay coils?  I am concerned (might be unfounded) that the relays switching could introduce noise on the 5VDC to the ESP32S3.


   
Quote
Topic Tags
(@davee)
Member
Joined: 3 years ago
Posts: 1852
 

Hi @huckohio,

  Relays could potentially cause power supply problems and upset the ESP32-S3 if the supply is inadequately rated or the wiring pattern causes problems, but it depends on a number of factors including the relay coil current demands, the specification of the power supply, care taken in minimising inductance and resistance of the wiring, etc.

I think you need to provide much fuller description of the circuit and components you intend to use.

It is probable that a solution using a single supply is feasible, providing the relay coils are compatible with 5V drive and the total current demand is comfortably less than the power supply capability.

Best wishes, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7596
 

@huckohio It is probably the best solution to have two 5V PS's but try it with one and see what happens, if you see any interference add a couple caps to the esp32 5v feed and try again. Tie the grounds together as well.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 217
Topic starter  

@davee I am just starting the circuit design so I don't have a schematic yet.  In looking at the relay specs to provide some tech data for you, I saw that the coil voltage is 3.3V not 5V.  I will probable use a 5VDC 5A power supply and use a buck converter to get down to the 3.3V the relay coil requires.  The buck converter should provide good isolation between the 5V into the ESP32S3 and relays.  Thanks for the reply.


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 217
Topic starter  

@zander Thank you for the reply.  I was mistaken on the coil voltage for the relays.  They require 3.3V, not 5V.  I plan on using a single 5V 5A PS into the project box and then split the 5V to the ESP32S3 and a buck converter to get the required 3.3V.  


   
Ron reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1852
 

Hi @huckohio,

  Relays obviously come in wide variety of sizes and correspondingly the coil voltage and current demands also vary widely ... hence my somewhat cautious reply to the open question you posed.

I am guessing you are intending to use a small relay module, such as shown in:

https://learn.adafruit.com/adafruit-power-relay-featherwing/downloads

The module is typically the mechanical relay, plus a small electronic circuit, such as a transistor amplifier. The amplifier is intended to provide an interface between the logic output of a microcontroller (or similar) device operating at 3.3V at low current, and the higher current required to drive the relay coil. In this case, the module will have a power input pin for the coil., which in the case of Adafruit module I just referred to also expects 3.3V. 

----------

I have seen other 'similar' modules in the usual bazaars in which the relay coil voltage is higher than 3.3V;  say 5V or 12V, whilst the input control pin is still compatible with the 3.3V logic level of the ESP32-S3 output. If you haven't actually procured the parts, one of 5V volt versions of these would be slightly easier to use, removing the need for the buck regulator, and increasing the coil voltage will (typically) reduce the current demand, for the same 'size' relay.

----------

However, the overall scheme you mention in your later message sounds feasible. The trick is to arrange the wires so that the relay module power has its own pair of wires forming a 'current loop' from the positive output of the power supply, through the relay module, and returning to the negative 'ground' output of the supply.

The buck converter should similarly have its own pair of power wires, which meet the relay ones at the power supply output.

Thus, the only 'ground' connection between the ESP32 and the relay module, should be the one at the power supply output just described.

In addition, I would recommend two capacitors in parallel across the power input connections to the relay module to try to absorb any transients .. possibly a 100uF electrolytic capacitor and 0.1uF, being careful to get the polarity of the electrolytic correct.

A similar pair of capacitors at the output point of the power supply could also be helpful, especially if the power supply output wire is more than a couple of centimetres from the internal regulator components.

Hope these suggestions are useful ... apologies if they are already well-known to you.

Good luck with your project, Dave


   
Inst-Tech and huckOhio reacted
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 217
Topic starter  

@davee Thank you for your recommendations/guidance.  I will add the capacitors when I build the circuit.  I will post my schematic for review before I create the PCB master.  Thanks Again!


   
DaveE reacted
ReplyQuote