Hello everyone!
Im not sure if i can ask questions about the esp here but you guys know basically anything so i had to give it a try.
so my problem(s) is this:
I have the esp8266 nodemcu
first, i tried to get PWM by analogWrite(pin,value (0-1023) ) (unlike the arduino which is 0-255) and it doesn't work for me.
The other thing is that i want to control a 12 v output with TIP120 and i know that the tip signal is between 0-5 volt. how can i control it with the esp??
I already know that you guys like to know the background so:
Ive installed the esp board manager http://arduino.esp8266.com/stable/package_esp8266com_index.json
and use the examples from the repository and everything works great.
(update the software OTA is crazy simple!)
The PWM experiment was very simple, ive declared the pin as output and put the analogWrite(pin,value) in a for loop with delay.
I think this cover the background
Thanks a lot! i hope its ok to ask this questions here.
try googling logic level translator or converter. I'm currently using the 5v HC-sr04 with a NodeMCU board and have tried a few different logic level conversions (5v<->3.3V) with good success! (only exception was a voltage divider which added some skew to my sensor readings!)
I've not tried PWM on NodeMCU but i should point out that you need to use the ESP8266 pin numberrin not the NodeMCU pin numbering! have a google of the pinout there is a great image which show both
Hi , yes i know that the numbers in the board are not the real numbers..
Ive searched for the logic level translator and i cant understand what i need
And even if i find one.. the PWM will work with it?
Im counting on the PWM for this project..
I've just had a look at what the TIP120 was (NPN Epitaxial Darlington Transistor for anyone else who didn't know / couldn't be bothered to google). for this application does it have to be that specific transistor? you will probably find ones with a base rating of 3v that could still handle switching 12v and the current you require! this would remove any logic level switching required (apologies for sending you down the wrong rabbit hole there).
Thank you for the reply.
I'm having difficulty to find npn transistor that works with 3.3 v. Maybe someone can help me find it? And it's really important that it will be like the like the tip 120 so I can use pwm to control the output
A TIP120 has no problems with 3.3volt logic. Base threshold is ~1.4volt.
You need a base current limiting resistor between pin and base.
Value depends on the current you want to switch.
Note that a darlington has a high saturation voltage.
That could be a problem for some loads.
Post details about that 12volt load, so we can calculate the base resistor value.
Leo..
slzer:
you will probably find ones with a base rating of 3v
Down the wrong rabbit hole again. Please only post replies if you know what you are talking about. So far it looks like you are just a beginner and unlike some forums this is not a blind leading the blind sort of forum.
Hi again, so you telling me that i can use the tip120 with 3.3 volt at the base and it will work?
I need to operate a 0.5 meter led strip and pc fans.
Can you please explain to me what is base current limiting resistor?