Using mosfets to switch low current from a high current gate voltate

I had an idea as far as how to interface a 12v led dimmer with an arduino's analog write input, while using a (relatively) high current source, such as a 12v w/w at 1.25a.

Could you wire up a mosfet that takes a 12v pwm signal at 1.25a (well decreasing as the load also connected to it for a 10w led turns on/off and more current flows into that circuit), and switches a low voltage current 5v 40ma signal on /off?

This could either be wired into an arduino, or directly to a buckpuck to dim led's, using those cheap 12v rf dimmers, which unfortunately don't dim @ 5v. I just feel like putting a voltage divider at the output of the pwm dimmer to trim it from 9-12v, down to 0-5v is going to put too much current into the driver, or arduino depending on how you have it wired up. I mean it only needs 40ma, and the pwm is pulsing 1a plus @ 5v.

Is this something i should worry about, or just use a voltage divider to get the 0-5v range i need from a 12v input to the dimmer which would put out 9-12v undivided voltage?

Something tells me putting that much amperage into an anduino or buckpuck's 0-5v control is just a bad idea. Thus the idea to use mosfets at the end of the pwm to switch the low current 5v voltage sources already provided by arduio's and buckpucks, the way it was meant to be done.

Can't follow that.

Explain exactly which devices you are talking about (links to datasheets always a good idea), and draw your proposed circuit - might
then be able to understand your description.

Using mosfets to switch low current from a high current gate voltate

You have understood a subject matter if you can articulate it in a jargon-free way.

That would have been a sign of sophistication.

alright forget all the above. i want to use a pwm device operating at 12v, 3a max current, to switch a 5v logic out voltage from an arduino to an analog pin. Using the pwm to turn on/off mosfets as a electronic switch for the 5v + to analog input in.

inessence, how mosfets are currently used, switching high currents via pwm on/off signals, with low voltage/amp signals to trigger the gate acivation, can that be done inversely?

to switch a high voltage/amp input 12v (0-3a amp pwm dimming) (to a mosfet) to get low current 0-5v pwm for an arduino analog input by pwm switching the mosfet gates turning the 5v (40ma gate on/off to get 5v at a low current.

The parts to be used, would be a 12v sla agm bank, ran theough a sepic limiting input current @3a tuned to 12v. 12v to pwm rf dimmer, to switch mosfets closing/opening gates for a 5v 40ma analog logic voltage/gnd. Since its pwm, you get 0-5v 40ma at 0-100 dimming.

wire that to your arduino and dim multiple bukpucks via analog write to digital pins. instead of using a pot voltage trimmer, putting a high current 0-5v analog input to the arduino board. I dont feel comfortable pushing that kind of current in.

all i want to do basically, is is a rf pwm dimmer to switch mosfets on/of that open close the 5v/analog inpt pins on an arduino for 0-5v dimming.

Is ths easier to decipher?

Is ths easier to decipher

Sorry no, it sounds all mixed up.

Do you have a 12V 3A capable PWM signal? Is it driving anything else? Why do you want to put it into an analogue input because all you will measure is 5V or 0V.

If you have a 12V signal you can drive a single transistor to switch a logic input with the collector to the input, emitter to ground, base though a 10K resistor to your signal and enable the pull up resistors.

Is ths easier to decipher?

Not a bit better, just longer. I get you want to obtain some kind of feedback measurement value to an arduino to (possibly) control additional pwm devices based on what a master one is running at? Perhaps a block diagram drawing would help us, and possibly instead of how you want to perform a given task, first explain what the final results are. There may be a much simpler way to have the same outcome then what you are imagining.


What i’m thinking, after giving this some thought, is as follows-

Use the 9v input supply for the arduino to power a sepic converter to give me 12v dc cv to power the pwm dimmer. Take the up to 12v pwm out from the dimmer, and use this circuit to allow it to take the pwm 12v, and give a linear 0-5v out for the analog in-

The second optoisolator one.

The question i have, is regarding resistor values, or potiohmeter values for a (lets say 9v 1a ac/dc wallwart, or a current limited dc/dc sepic), to power the pwm dimmer and arduino with minimal power loss to heat in the resistors to limit the current draw from the ardiunos dc supply (9v 1a) that powers the 12v dimmer, and where to put them (IE before the sepic, inbetween the sepic/pwm dimmer, etc).

Since it needs very little current at the input of the pwm dimmer, but 12v regulated (where the sepic comes in handy, but i’d rather use resistors than a more expensive current limited sepic), whats the most effecient resistor values to use, and where in the circuit to put them to cause the sepic drawing from the arduino 9v input, to only pull 100ma max, but allow 12v cv to the dimmer? 100ma, derived from some effeciency loss at the converters, power for the rf pwm dimmer and 40ma as the usual current when using the 5v+ arduino pin for analog input applications.

IE, i want the dimmer circut to be current limited to ~100ma (give or take, i’d like to use a pot if thats too high/low after testing) when drawing from the 9v 1a dc source that powers the arduino. My thinking is without current limiting, i would be sinking all the supplys amps into the dimmer/optoisolator 5-12v → 0-5v circuit, when only 100ma max is necessary, to power the rf pwm dimmer, effeciency loss at the sepic, and the 40ma for the 0-5v to the arduino. Since this is something that may be drawing from backup lead acids at some time, i’d rather it use as little wattage as possible for the pwm/optoisolator 12v to 5v conversion, and theres no point wasting power anyway, regardless of a ac/dc source, or dc battery source. I just want it to be as effecient as possible.

Basically, what resistor values/pot values and where to put them in the described circuit is what i need help with. I can draw up a complete circuit diagram including the sepic and pwm dimmer if that makes my question easier to understand, just let me know.

After looking at my mega 2560's input voltage specs, it looks like i can just use 12v to power the board, and eliminate the sepic for the dimmer. So all i need to figure out, is how to limit the current that flows through the 12v pwm dimmer, and its ~5-12v output that gets converted to linear 0-5v using the optoisolator circuit. Thats simpler and more effecient than adding a dc/dc converter to bump 9v up to 12v for the dimmer, when drawing the power input for the dimmer from the arduino input supply.

Sorry but it is not clear what you want to do. You keep using the word sepic, I have no idea what this means, it is not English.
Please post a link to the PWM dimmer you have and say in simple words what you are trying to do not how you think you want to acheave something.

What i'm thinking, after giving this some thought, is as follows-

Sounds like you want to read the 12v pwm's ouput (either in analog or digital format). If that's the case, your solution is way too complicated. You can read the duty cycle fairly easily, using the capture feature. Or you can run the 12v pwm through a low-pass filter and read its analog output.

If English is not your first language then very well done. If English is your first language -- bl**dy poorly done.

Why not draw a little picture of what you think you want to do. A picture is worth a thousand words

I think sepic is supposed to be SEPIC, an acronym for Single-Ended Primary-Inductor Converter. However, other than that, I'm also lost. Please provide schematic or block drawing.

Do you realize that a "High Current" source means it is only capable of supplying high current?

A 12V 20A power supply will not "push" 20 Amps through anything it is connected to (unless the resistance is low enough to allow it). Instead, the 20A is the max current draw available for something like an amplifier or light.

If your 12V input supply is a Constant Current Switching Power supply built for driving LEDs at a constant current (you stated Buck Puck above, unsure if that's what you have, or want to make?).

What is your load (LED, Motor, Powering another circuit, etc)? Required voltage and required current of the load? What is your power source? Available voltage and Available current?

What function would you like the Arduino to perform in between the source and the load?

the function the arduino would provide is using its pwm digital out to dim a buckpuck via ttl.

The issue is converting a ~6-12v 8a rated rf pwm led dimmer, into something that the arduino can read from an analog input and dim the buckpuck accordingly. Linear translation of that 6-12v into 0-5v is the issue.

SEPIC, a google search could have provided you with an explanation of said acronym.

The reason i worry about the dimmer sinking all the current from the 12v dc source it would be sharing with the arduino is because its designed for led’s. I could be wrong and that it follows conventional logic that it only consumes as much current as necessary to provide power for the pwm/rf circuitry, and the optoisolator circuit to get a 0-5v linear signal for the arduino input.

Ill draw up a sketch, and edit this post tonight as far as the circuit.

The basic explanation of what i want to to, is power a mega 2560 and 6-12v pwm dimmer from the same 12v supply, and use the dimmer along with the optioisolator linear voltage converter to take tht up to 12v (really 12v all the time since its pwm), and along with the optioisolator circuit, get a 0-5v analog signal to use as an arduino input to pwm ttl dim the buckpuck, per the diagram on how to do so in its datasheet.

Since the logic of said buckpuck is 5v 0% power, and 0v 100% power the arduino could also switch that so the up/down buttons on the rf remote aren’t reversed. Alternatively just don’t use the arduino at all. Just the dimmer/optioisolator and the buckpuck to dim the led, albeit with reversed logic on the remote (down is up up is down) due to the way the buckbuck reads the 5v ref it supplys, and its control pin (short them, and no power flows to the led, put a potiometer in between and no resistance is 0% dimming, 5v flowing, full resistance, or not shorting the buckpucks 5v ref/control and you get 100% power to the led’s). Basically just backwards from how most other ttl dimming works.

Edit- Circuit Diagram attached. The only thing i might need to add is a low pass filter to change the digital pwm coming from the dimmer out, to an analog signal. No idea if the optioisolator will work with a pwm digital input.

Do you have a particular dimmer in mind? It would be real helpful if we knew what specific dimmer it was and why you need it here.

The Arduino can implement any dimming you need and can be programmed to take the dimming control from a variety of sources, such as a simple potentiometer. Perhaps the dimmer is not needed at all.

It looks to me that you want to use the Arduino to convert between some PWM signal and a 0V-5V variable voltage and possibly do some distribution (send output to multiple LED power supplies). Is this more or less correct?

Sorry if this sounds patronizing, but it would be great if we could get an explanation without all the jargon. It is clear that you may not understand a lot of this yourself, so if you told us what input/action you want and what output/response you need in plain terms it might help a lot. For example, "I want to be able to turn a knob and have the LEDs get brighter or dimmer depending on which direction I turn the knob" or something that more aptly describes what you are after.

Also, the Arduino cannot give you analog out. The best it can do is PWM, which would have to be filtered and buffered to give you a real analog signal.

I understand what your saying. The application is a rf remote that can dim the buckpucks, possibly with another rf switch to switch between multiple drivers on different pwm pins.

This is the pwm dimmer i have-

Low pass filters may be necessary, like you are saying, but i think the buckpuck can dim via pwm and not just analog, as at one time i had a voltage trimmer pot hooked up to its output, and it worked to dim the buckpuck without an arduino in between to invert the logic. I'd like to either just use this dimmer, and another rf remote switch to choose what pwm digital output pin, and driver/led to dim, or one remote that has can do both. The latter option, i've looked for but havent found anything that fits said application.

If theres an easier/better way to be able to dim these drivers via a rf remote with/without an arduino then i'm all ears. I'm just working with what i have.

Is there a better rf device compatible with the arduino's analog in to fit this application that doesn't require low pass filters and optioisolators to change the voltage range?

I'd power the dimmer from a 5v source and just use a low pass filter to make it analog 0-5v, but it diddn't work when i tried, and i think it needs a higher input voltage to operate.

Like i said, i'm working with what i have, if theres a better rf remote compatible with the arduino's analog inputs, then i'm all ears, so long as its not too expensive and greatly simplifys the application. I haven't been able to find such a device.

Alright, i take back what i said about it not working with a 5v input (the pwm dimmer that is). Using a 800ma 5v ac/dc adapter, i can get a 0-5v output using a 3k trimpot. Without the trimpot the voltage range is 4.6-6-2v. I tuned it down to 5v max when there is no dimming taking place, and can dim down to a few ma using this method. It did not work with a similar dimmer (5v input), but they have very different pcb's, and are different models.

So, knowing the buckpuck can read that pwm signal (from the arduino digital out pin), all in need is a low pass to make that 0-5v i get from the dimmer analog and input that to the arduino, correct?

Or can it read a pwm input signal (2560 mega) and no filter is necessary?

But that leaves the problem of current draw for the dimmer, i'd like to power the dimmer/arduino from one dc source. Since the 5v+ on the arduino can only provide 40ma (came across specs that current consumption of the dimmer is less than 500ma), powering the dimmer from the arduino's 5v+ is not a good idea. Assuming i can use digital read, to take that pwm input, and use it as a linear dimmer for a pwm output, something akin to-

But with digital read instead of analog in, since its pwm, is it possible, using the right resistance, to power the dimmer from the 9v1a the arduino is powered from, use a pot voltage divider (might be more/less than 3k, will have to expirement), and get a 40ma max pwm input from the dimmer?

In any case, after reading about rf filters, i assume since the dimmer can't be powered from the 5v+ on the arduino, i'd have to dig out the old heathkit scope to find the frequency of the pwm, and then devise some way to power the dimmer and limit the current it provides, along with building a rf filter circuit to make it analog.

Or am i overthinking this?

TLDR- Assuming i can use digital read to do something like analoginoutserial, to provide dimming without dac conversion from the pwm dimmer, IE pwm input, is it necesssary to limit the current provided to the input pin of the arduino when the power source for the dimmer is the 9v1a the arduino uses? If so, can this be accomplished by using resistors/trimpots alone?

Or do i need to figure out the frequency of the dimmer with my scope, and build a rf filter that will limit said current to 40 ma using the appropriate uf and ohm value cap/resistor to get an analog signal, 0-5v, 40ma max, from the dimmer when the dimmer's input is 9v1a, using a trimpot to voltage divide its output to 0-5v?

I think you are over thinking this a lot.

First, let me ask you what do you find really difficult about a low-pass filter? Just a resistor and a capacitor will do.

From reading the Buckpuck's data sheet, it requires an analog voltage on the adjust input to work correctly. That voltage can be between 0 and 5V, but the effective range is between 1.5V and 4.5V. I do not think it will work using a PWM input.

However, there is absolutely no information worth anything about the RF dimmer at the link you posted. You say it that it uses PWM. Do you have a scope? I'd like to know what the output waveform looks like when it is supplied with 12V and run without a load. Can you supply an accurate picture/drawing of that? I'd need to know the frequency (or period), the P-P voltage swing, wave shape, duty cycle range and the DC offset, if any. If you have access to a DSO, then a picture of the waveform showing 2 or 3 cycles at each extreme (minimum and maximum) would be perfect. It would also be a good idea to look at the output with a small load, maybe 1K ohm.

If it really does rely on PWM, then it might just be a simple matter of filtering and scaling its output and supplying that directly to the adjust input of the Buckpucks.

One more question, why do you need to use the Buckpucks? This remote can supply 8 amps, and at 12V that is one huge number of LEDs (96 watts!). Is it because you need more than that?