Stuck beginner! Relay does not switch but led dims

Hi folks,

So I just built my first circuit which is a light dimmer with on and off switch - the dimming works fine and the on /off used to work fine but has suddenly just stopped working. I can not figure out why though. I am using an ESP32 microcontroller and when I send on/off signals the LED dims or brightens but the relay does not switch ("click"). I measured the voltages across the pins on the relay and they are as follows for the 2 different switch positions:

gnd and input 0.135 volts
input and vcc OL
gnd and vcc OL
led bright

gnd and input 3.3 volts
input and vcc 4.3 volts
gnd and vcc OL
led dim

Can someone tell me what the issue could be here? The circuit used to work but suddenly just stopped. I replaced the relay and the new relay does exactly the same so it appears not to be the relay unless I have 2 broken ones which seems unlikely. I disconnected the dimming part of the circuit to limit the chance of shorts etc but that made no difference.

If anyone can help I would be really grateful - this is really confusing me!!

Many thanks in advance!!

Tony

Did you solder all the connections or are you using a breadboard with wires pushed into the little holes?

Paul

Hi Paul,

Thanks for the response. I soldered the connections on a project board.
To test further I removed the ESP32 from the board and connected the relay straight to the pins and hooked up USB for power and it works perfectly. I see that there is 5V across the GND / Vcc pin on the relay. Previously there was OL across these pins when connected to the project board. It looks like the project board or a solder connection on the board has broken somewhere. I think I will get some simple PCBs made up. Project board is just not reliable enough it seems! :slight_smile:

topcattc:
Hi Paul,

Thanks for the response. I soldered the connections on a project board.
To test further I removed the ESP32 from the board and connected the relay straight to the pins and hooked up USB for power and it works perfectly. I see that there is 5V across the GND / Vcc pin on the relay. Previously there was OL across these pins when connected to the project board. It looks like the project board or a solder connection on the board has broken somewhere. I think I will get some simple PCBs made up. Project board is just not reliable enough it seems! :slight_smile:

Good that you got is working.
What is OL you refer to? Does you DVM not have other scales you can switch to?
Paul

Are you able to draw a schematic on a blank sheet of printer paper , take a photo and upload it ?
Can you provide a vendor link for the relay ?
Do you have experience using relays ?

Paul_KD7HB:
Good that you got is working.
What is OL you refer to? Does you DVM not have other scales you can switch to?
Paul

Yeah i it was a bit of a relief! OL is open loop or open circuit.

raschemmel:
Are you able to draw a schematic on a blank sheet of printer paper , take a photo and upload it ?
Can you provide a vendor link for the relay ?
Do you have experience using relays ?

Hi raschemmel,
Thanks for replying but I isolated the issue to by project board, some solder joint must have broken/shorted at some point. I had always planned on getting some simple PCBs made so I will just pull the trigger on that a little earlier than planned.
I don't have much experience with relays but I understand the basic concept of how they work. I wasn't sure what voltages I should have expected to see across the pins but I was very sceptical when I saw an open circuit between the Gnd and Vcc when the relay was switched on, and indeed, when I connected the ESP32 directly and tested it successfully I saw 5V which is what I would have expected (it's a 5V relay). My understanding is that when the input pin goes high (at 3.3V from the ESP32) it allows a circuit to complete across the coil of the relay which has the full 5V from the supply and that is enough to magnetise it and break/complete the main circuit.
Thanks again!
Tony

Relays 101 is :
Measure the coil resistance
If a 'known good' relay is available use that as reference
If it's a relay board, google it for the schematic to use for troubleshooting.