Controlling relays using ESP32

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I am working on a predictive vibration alert monitoring system, for this, I am using a vibration sensor, Ubidots, Esp32, and relay. I am able to create an alert by controlling the relays and sending an email alert. Also able to control 4 channel relay using Esp32 but can you suggest me how to control 50  relays using esp32, by a basic example.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who makes that chip? Not many here would know much about it.

 

One way of controlling that many relays would be 8 bit port latches (8 bit data port) with another 8 bit to control which chip get addressed.

 

Another way may be to use serial latches.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use. A 100 pin XMEGA and relay drivers. Connect the USART of XMEGA to esp32. Or two mega2560s. Connect the Megan's together via usart1, then connect one of them to esp32 via its usart0

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

you ask about esp32 on a avr site?
Anyways, for 50 relays off 1 esp32, use a chain of tpic6b595 chips. You’ll need 7 of them. Then you’ll need a 74hct367 for the logic level translation. There should be heaps of examples for Arduino on the web.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Serial drivers would be the best way, IMO. Allegro used to make some dedicated serial lamp/relay drivers, but I'm not sure if they're still available. You might have to use logic level shift registers with additional driving circuitry, e.g. FETs/transistors or ULN200x  driver chips.

I see MAX4820 comes up when I search for serial relay driver, but I have no personal experience of those, whereas I have used the Allegro parts in the distant past.

 

 

Four legs good, two legs bad, three legs stable.