Author Topic: Need 5v->12v conversion  (Read 437 times)

0 Members and 1 Guest are viewing this topic.

Offline bitmanTopic starter

  • Supporter
  • ****
  • Posts: 299
  • Country: us
  • Open Source Guy jabbing with Electronics
Need 5v->12v conversion
« on: September 27, 2020, 10:08:24 pm »
I have a small halloween display I need to control the lightning frequency (PWM). I have something that works but it really looks over-engineered and I wondered if there are simpler designs?

I have two power LEDs that I can run at 12V and just about 1.5A to be really bright. They're mounted on heat sinks etc. I would like to regulate the power (mosfet) from the Wemo D1 (ESP8266) which in this setup spits out 5v PWM signals.  I tried to just use a BJT on the 5V but it won't drive enough amps - my BJTs all max up before 1Amp so looking at what I had, I grabed an IRF540N (mosfet).  Just using this mosfet and a trimmer (voltage divider) I can easily adjust the brightness of the light.  I need this feature so I can adjust the maximum brightness.

So to do this I power from 12V and regulate the power for the Wemo using an old fashion 7805.  I then use a BJT/NPN on the PWM output from the Wemo to control the signal from the pot to the mosfet. I'm well aware of the voltage drop but enough is coming through that I think the maximum brightness will be just fine.

This seems over-engineered. Of course I cannot just use a voltage divider as the voltage is going up. I also need to be able to pul this as close to 0 as possible.

I'm wondering if going with a single opamp would do better here?  But it would only save me one component so it doesn't seem like that big of a difference.

What are my options given I need to drive about 1.5A/12V (peak)?
 

Offline nachus001

  • Contributor
  • Posts: 14
  • Country: ar
Re: Need 5v->12v conversion
« Reply #1 on: September 28, 2020, 03:21:30 am »
The correct way to do pwm for LED intensity is
Connect the npn transistor via two 4k7 resistors
From a pwm pin of the controller. Emitter to ground
collector to 1k resistor yo 12v. Collector also to MOSFET gate. Mosfet's source to ground, and LED cathode to drain.
LED anode to 12v. For this apps, maybe it's better an irfz44 mosfet.
Ignacio
The potentiometer may be tied between 5v and ground, and the cursor yo an ADC input.
You'll need the software to convert from analog input to pwm output


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf