MCU PWM from 5V to 10V - Page 1
Forum section: electronics / beginners

author: Vindhyachal.takniki
author_rank: Frequent Contributor
timestamp: August 18, 2020, 04:14:03 pm
content: 1. I am generating MCU PWM from its pins, 3 channel. Its powered by 5V2. The end device to which I have to give PWM, needs 10V PWM.3. I have 10V dc available in my system.4. Can someone suggest some suitable device where I can boost the signal from 0-5V to 0-10V PWMPWM freq is 100Hz-3000HZ

author: atmfjstc
author_rank: Regular Contributor
timestamp: August 18, 2020, 04:42:33 pm
content: Ehh... a transistor?

author: Benta
author_rank: Super Contributor
timestamp: August 18, 2020, 05:08:07 pm
content: Transistor, yes.For full 0...10 V swing, an analog SPDT switch would be easier and better.

author: DL2XY
author_rank: Regular Contributor
timestamp: August 18, 2020, 06:03:41 pm
content: IXDN602 or any other low side gate driver IC.

author: Vindhyachal.takniki
author_rank: Frequent Contributor
timestamp: August 19, 2020, 08:51:40 am
content: 1. I have give PWM to meanwell driver here:https://www.digikey.in/product-detail/en/mean-well-usa-inc/HLG-320H-C1050B/1866-2498-ND/77040562 .MCU power is entirely different than meanwell driver. So MCU gnd is different than meanwell V-.3. need to level shift PWM of MCU 0-5V to required 0-10V for meanwell driver.4. I have added a IXDN602 as a driver/level shifter.5. Will the circuit work as intended?

author: perieanuo
author_rank: Frequent Contributor
timestamp: August 19, 2020, 09:34:17 am
content: put an optocoupler with series resistor from uC to opto diode and from OC output transistor 'atack' a npn transistorwhatever happens on output, uC is protectedwithout protection, just a suited npn/pnp with 1K series resistor on base and series resistor in collector/emiter.for signal polarity issues, change in software

author: Zero999
author_rank: Super Contributor
timestamp: August 19, 2020, 10:07:42 am
content: I'd use a MOSFET, such as the 2N7002 common gate mode. Gate to 5VDC, source to MCU output and drain to the Meanwell, which has a built-in pull-up resistor to 10V. This has the added advantage of not inverting the signal, but the MCU ground, needs to be connected to the Meanwell ground.

author: Vindhyachal.takniki
author_rank: Frequent Contributor
timestamp: August 19, 2020, 03:07:44 pm
content: In our system although they are not shorted but DIM- of all three drivers will be shorted together at microelectronic ground. Please comment if this can cause issue.Microcontroller ground and driver -V , are separate thoughIs it ok?

author: Vindhyachal.takniki
author_rank: Frequent Contributor
timestamp: August 21, 2020, 08:00:24 am
content: 1. attached is circuit to drive three meanwell drivers independently. (https://www.digikey.in/product-detail/en/mean-well-usa-inc/HLG-320H-C1050B/1866-2498-ND/7704056)2. MCU is 5V powered, but driver need 10V to control at DIM+ and DIm-, so I connected MIC4427, to do this.3. One channel of MIC4427 is not used, so its grounded permanent.4. Will the circuit work as intended or any other suggestion/improvement.5. I have asked meanwell team: they said you can only give 10V not more than that , I asked for 10.8V, since this SMPS was available. Now have to conect some regulator.For three independent driver operation from common ground of MCU, waiting for their reply.

author: Zero999
author_rank: Super Contributor
timestamp: August 21, 2020, 10:07:35 am
content: If you used an open collector/drain circuit, like the one I posted, then you don't need an external 10V power supply, as it gets its power from the internal pull-up inside the Meanwell module.The circuit you posted will work, but the MIC4427 is overkill. If you want to use an IC then go for the 40109B, or 4504B, which are much cheaper and only one IC is required.https://www.onsemi.com/pub/Collateral/MC14504B-D.PDFhttps://www.ti.com/lit/ds/symlink/cd4504b.pdfhttps://www.ti.com/lit/ds/symlink/cd40109b-q1.pdf

author: Jeroen3
author_rank: Super Contributor
timestamp: August 21, 2020, 10:58:02 am
content: Pick a level shifter. Just drop in and use.Either one of Zero999 recommendations or get the HEF4104B or something. Just look in Nexperia/TI's catalog, they breathe these parts.

author: Vindhyachal.takniki
author_rank: Frequent Contributor
timestamp: August 22, 2020, 06:05:41 am
content: 1. I was reading here:https://electronics.stackexchange.com/questions/461049/meanwell-3-in-1-dimming2. Although not sure if this is the case with my meanwell driver also(sent mail to meanwell for this), then yes can easily use this circuit:3. Will use PWM of fixed 1000hz frequency , with variable duty cycle(0 to 100%) to control the intensity. I think PC817 can work? Or any other better performing optocoupler?But datasheet of PC817 says tr=tf=18us(max value)a) When at duty cycle of 1% with PWM freq=1Khz , Thigh = 10us & Tlow=990us , so here it will be issue, I am looking for high speed optocouplers.b) with PWM freq=200Hz, with 1% duty cycle., Thigh=50us & Tlow=4950us , so this can work .c) Going to 100Hz would be very near lower limit to meanwell range :100Hz-3000Hzd) What should I do here, select high speed optocoupler or go to low free like 120Hz or so?

author: Zero999
author_rank: Super Contributor
timestamp: August 22, 2020, 02:15:41 pm
content: Yes, you can use an opto-coupler. That will invert the signal though. If you connect +V to the other side of the opto-coupler, you can get non-inverting.If you don't need isolation, between the Meanwell and MCU, then save yourself the expense of the opto-coupler and use the circuit I posted previously.I don't see the point in going down to 1% duty cycle, as I doubt your LED driver supports dimming down to below 10%.

author: Vindhyachal.takniki
author_rank: Frequent Contributor
timestamp: August 22, 2020, 03:25:13 pm
content: Hi,Thanks for replying and nice info.1. The report by meanwell here:https://www.meanwell.com/webapp/product/search.aspx?prod=HLG-320H-C&pdf=SExHLTMyMEgtQzEwNTAtcnB0LnBkZg==&a=2Shows this, it has two different/conflicting points, I have marked in red.1. Above point shows that minimum 6% duty cycle and maximum is 0% duty cycle where is not defined, so around 99%.2.below point shows results in both 0% and 100%What should be minimum duty cycle and maximum, I should use for reliable operation?Also can you suggest suitable high speed optocoupler for this? I am planning to use 1000HZ PWM with variable duty cycle

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 25, 2020, 12:16:17 am
content: Some time ago I needed to convert the output of a uC PWM signal into an isolated 0 to 10V DC signal, and I made the attached circuit for it.The uC PWM pin has label "Spindle_PWM". When this pin is in high impedance state, the voltage drop over the 2 LED's and the 2 IR diodes of the opto couplers is to high to turn anything on, so no current in the primary circuit.During PWM the Optocouplers are switched alternattively either through R503 or R506.On the other side a 10V voltage source is on Pin 1 of J501, and filtered a bit with R501 and C501.Then, depending on which optocoupler conducts, C502 is either charged through R507, or discharged through R504.The symmetric setup should give fairly good lineairity but I have not done much testing on that part.Using a Red and a Green LED also gives a nice visual indication of the duty cycle of the PWM signal.