B4R Question How to read voltage using an irfz44 "N" fet

Cesar_Morisco

Active Member
Licensed User
Longtime User
Hello everyone
I need technical help on how I can measure the voltage using the ESP8266 ADC and using a FET N. In this way, the ADC is reading 12V directly. I think there is another solution, but I'm stuck on this. If anyone has a tip on how to read the voltage correctly, I'll be happy.
 

Attachments

  • CONTROLE PWM.png
    CONTROLE PWM.png
    14.9 KB · Views: 45

thetrueman

Active Member
Hello everyone
I had to make some changes to my project to use the TIP122 as a driver for the IRF5305 FET to work correctly and calculate the voltage divider from 0 to 20v
Now everything is working very well
Thank you for your time
I will post the video soon
In this post the diagram of Proteus ISIS has IRF5305 which is connected in wrong direction. Please note that P-Channel FET Source pin connects with +ve supply and Drain pin connects with Load and Load connects to GND. Simply your circuit is theoretically is good but FET's Source and Drain pins should be interchanged. First you do this and then I will fine tune this circuit.

IRF5305S Switch.jpg
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Another thing is that your connection diagram doesn't work, the lamp doesn't light up, it doesn't have GND.

Standard operating procedure with amateur circuit designers. I though ADC counted only voltage and thus the R4 was going to the GND through R5. Are you sure you calculated correctly the R1 and there is no minimum voltage in the lamp to light? Also have you connected the ground of the board to the ground of the circuit? Maybe an apropriate resistor between the voltage divider and the ADC pin in my design would do the trick. Through collaboration we advance though. Glad though I gave you the idea to turn on and off the power in the lamp in the PWM rate at the high side even though you used the NPN transistor. Since I am amateur though, I can make out that your design uses the invert of PWM pulse (when high the gate is low and when low the gate is high) so PWM+ would turn into PWM- and the opposite. Am I wrong? Neh, forget it. I just saw you used the P FET.
 
Last edited:
Upvote 0

Cesar_Morisco

Active Member
Licensed User
Longtime User
In this post the diagram of Proteus ISIS has IRF5305 which is connected in wrong direction. Please note that P-Channel FET Source pin connects with +ve supply and Drain pin connects with Load and Load connects to GND. Simply your circuit is theoretically is good but FET's Source and Drain pins should be interchanged. First you do this and then I will fine tune this circuit.

View attachment 163008
Gostei do seu diagrama, será possível?
O bom desse circuito é que ele usa um fotoacoplador, o que ajuda muito. Obrigado.
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Standard operating procedure with amateur circuit designers. I though ADC counted only voltage and thus the R4 was going to the GND through R5. Are you sure you calculated correctly the R1 and there is no minimum voltage in the lamp to light? Also have you connected the ground of the board to the ground of the circuit? Maybe an apropriate resistor between the voltage divider and the ADC pin in my design would do the trick. Through collaboration we advance though. Glad though I gave you the idea to turn on and off the power in the lamp in the PWM rate at the high side even though you used the NPN transistor. Since I am amateur though, I can make out that your design uses the invert of PWM pulse (when high the gate is low and when low the gate is high) so PWM+ would turn into PWM- and the opposite. Am I wrong? Neh, forget it. I just saw you used the P FET.

I was right. The amount of the current the ESP32 ADC pin draws from the circuit point it measures is in the range of a few nA (nano - Amperes)... Negligible at all...
 
Upvote 0
Top