ESP32 to ULN2004A
Posted: Sat Nov 01, 2025 7:03 pm
Ok so I have this project I'm working on to add a little bit of smarts to a RV HVAC unit. The dumb thermostat simply provides -12V to each output for heat/cool and a 3 speed fan. The relay board in the air handler is as simple as it gets, just some relays with fuses driven by the thermostat through a ULN2004A. No other components at all. I have two concerns (and this my first real go at designing a circuit, so go easy on me! XD)..
First, will I be able to drive this chip directly from the ESP32 GPIO? The datasheet suggests I should, even though it says it's designed for 6-15V the VI test voltage was 5V.. Can I get away with feeding it 3.3V or do I need to level shift?
Second, while pinning out which wires do what, I was reading +12V (backfeed) from the inactive outputs. It's definitely coming from the chip as it went away whem I disconnected the relay boatd and just probed the thermostat. Does that mean I need to isolate the ULN inputs from the ESP with optocouplers or will pulldown resistors on the GPIO be sufficient to sink that and prevent damage (and if so, is 10k good enough or do I need to go higher?).
Third, as I said the datasheet suggests the ULN2004 needs a high input, but the current thermostat is using low triggers. What am I missing here?
Thanks for any help!
First, will I be able to drive this chip directly from the ESP32 GPIO? The datasheet suggests I should, even though it says it's designed for 6-15V the VI test voltage was 5V.. Can I get away with feeding it 3.3V or do I need to level shift?
Second, while pinning out which wires do what, I was reading +12V (backfeed) from the inactive outputs. It's definitely coming from the chip as it went away whem I disconnected the relay boatd and just probed the thermostat. Does that mean I need to isolate the ULN inputs from the ESP with optocouplers or will pulldown resistors on the GPIO be sufficient to sink that and prevent damage (and if so, is 10k good enough or do I need to go higher?).
Third, as I said the datasheet suggests the ULN2004 needs a high input, but the current thermostat is using low triggers. What am I missing here?
Thanks for any help!