I am having a hard time understanding what is happening here, I don’t know much about electronics, been learning by myself and playing with the wiring/coding as many others here
Here is what I have :
Esp32 + USB 5V power supply
Relay 4 Channel 12V
12V PC Fan’s
12V power Supply
The examples I have sawed in many websites are with a 5V and no external power needed, In my case using computer fans I think I will need the extra 12V power supply because the ESP32 can’t power the 12V fans (correct me if I’m wrong pls)
I have been trying to wire this with 2 different power supply (I have 2 to test with) and also different wiring positions and I think I have burned some fans trying because they smell like fried and if I connect them directly to the power adaptor won’t work now, so now I have tested the ones I have, and I have others that still work
The first power adaptor in the labbel puts :
AC ADAPTOR
Model no : AA-121A2
Input: 120VAC 60hz 20W
Output: 12VAC 1.2A
class: 2
note: In this one I can find easy the positive(red) and gnd(black) using a tester
The second power adaptor:
Switching Adapter
model: DSA-12CA-12
Input: 100-240V~ 50/60hz 0.3A
Output: +12V 1A
note: both cables show positive when testing , I think it is related with the AC DC type (?)
I think the first one will work better and have more power , one doubt I have is that the power adaptor says AC and the computer Fan say DC , will this be a problem ?
This is the diagram that I think should work since that’s how the examples I saw on most websites
I feel it is something related with power because I don’t hear the click on the relay when I click on home assistant switches to enable relay channels , I see the light/led under the relay board turning on and logs under ESPHOME are fine too(sending ON and OFF states), so the code and the integration is working fine.
Thanks! I had that question but didn’t know if that will burn the board , we’ll now with you answer I have 2 questions
there are 3 VCC pins on the relay board ( 2 pins under the jumper VCC and JD-VCC, the last VCC is on the relay header) on which pin do I have to add the power 12v cable from the power adapter?
Should I move the gnd from the relay to esp32 - to the Gnd from the power adapter or I can leave it as it is?
I really got a bit lost researching these relays! But I think I am right in saying that they should be powered by 12v, and the IN should be triggered off 5v (and should work with the esp32).
I would play around with some bits of wire and try triggering them rather than risking the esp32 GPIOs.
If the information posted is correct, then the first adapter listed (used) is AC, not DC. Could explain the burned smell of the fans.
I don’t see how polarity of the leads could be identified with a tester. If a voltmeter was used, I would expect the meter to behave like the note listed with the second adapter, not this one.
@gaz99
So you are saying The +12v line from the power adaptor goes to the JD-VCC pin on the replay board lile the next image , the next one I leave it empy and the one VCC from the relay header to the esp32 ?
@rcblackwell
About that yeah like I said ( dont know much about electronics ) I have used this tool (image) to test on both cables from the 2 power adaptors , on the first one the tool show me the +12V line and the other cable dont show any value just a litle ray (so for me that was the gnd/negative) but with the secound power adaptor both cables show +12V that what I mean on the first post
Could it be something about the code ? I been testing and still not able to work this out
The only thing I notice is that if I change the red cable from fan on Normally Close(NC) to Normally Open (NO) the fan will turn on at power on but I wont be able to turn it off it will just spin , from home assistant I turn on/off and see the logs and led (from relay) turning on/off but nothign on fan
Any ideas ? thanks
Update:
I am now trying with a 1 channel 5V relay and I having the same result so im doing something wrong here…
this is how im connecting the new 5V relay :
Red led (power) turns on , and also the red led turns on when switching on from home assistant , but no fan spinning or relay click sounds, have tested the fan and it is working
Are you sure that it is 5v could it possibly be 12v? 5v will light the led but not switch the relay. Do you have a multi meter? What is the voltage coming from the signal pin of the esp? An under sized power supply probably would have similar results.
Hey! thanks for the reply! , I made it work! finally ( the new 5V ) not the 12V , on this 5V it was the wiring ( I mess the fan cable position) , Yes I have a multimeter (also trying to use it more since I dont have the basic electronic theory I have to play with the little knowlage I have , thanks ) I will try to mirror the same wiring on the 12V relay but I suspect it wont work because the ESP32 not able to send a PWR signal (12V) from the esp32 to the relay I think I will need a convertor o something else here to make that work
Good day … wanted to confirm if you found a solution and what type of connection did you use … I’m currently trying to use the same 12v 4channel relay and I’m going through the exact same problem … I’ll be happy if you can help