# My controller outputs square waveforms in 5 volts PWM SIGNAL. I want to change the waveforms into current waveforms with some circuits.

#### nazmul0087

Mar 29, 2024
5
My controller outputs square waveforms in 5 volts PWM SIGNAL.
I want to change the waveforms into current waveforms with some circuits.
The final output could be 10 milliampere square current waveforms, and the amplitudes will not be changed with different loads. Can any one suggest me a circuit for this?

#### Alec_t

Jul 7, 2015
3,590
Welcome to maker.pro!
Constant-current circuits are well-known.
What is the PWM frequency?
Is your "10 milliampere square current waveform" one which goes from 10mA to 0mA, or from +10mA to -10mA?

#### nazmul0087

Mar 29, 2024
5
Welcome to maker.pro!
Constant-current circuits are well-known.
What is the PWM frequency?
Is your "10 milliampere square current waveform" one which goes from 10mA to 0mA, or from +10mA to -10mA?
PWM Frequency: 0.487KHz, Current goes from 10mA to 0 mA, Would be grateful if you can suggest some solution.

#### bertus

Moderator
Nov 8, 2019
3,321
Hello,

A constant current source will give different voltages with different loads.

Bertus

#### nazmul0087

Mar 29, 2024
5
Hello,

A constant current source will give different voltages with different loads.

Bertus
Thanks. Any references for me for this circuit? any link is highly appreciated.

#### Delta Prime

Jul 29, 2020
1,966
My controller outputs square waveforms in 5 volts PWM SIGNAL
Curious.... What would be the application for changing the controller?

Feb 19, 2021
767
A simple method is to use a low pass filter on PWM output producing a V proportional
to PWM duty cycle, and feed that to a V to I converter. There is a latency associated
with this approach, how much time from a step change from 0 to 10 mA can you live
with ?

Output of filter then goes to V to I converter :

Note the above circuit needs a well regulated accurate Vcc so only variation in current is due to
sense R and Vref (Vinoput). Use a better opamp than a 741, a rail to rail type would work fine.\

There are other architectures, sinks, transistor-less versions (Howland).....search the web.

Regards, Dana.

#### nazmul0087

Mar 29, 2024
5
For load 500 the current I am getting is 10mA. If i change the load, the output should be 10mA as well. Any solution for that please?

#### Attachments

• 2222.JPG
115.6 KB · Views: 4

#### Alec_t

Jul 7, 2015
3,590
If i change the load, the output should be 10mA as well. Any solution for that please?
Any load resistance higher than 500 Ohms will need a higher supply voltage.

#### nazmul0087

Mar 29, 2024
5
Any load resistance higher than 500 Ohms will need a higher supply voltage.
Thanks. For 1 to 500 Load if want the output current to be same then what could be the probable resolution?

Feb 19, 2021
767
What is the OpAmp supply V value ? Desired range of input V to OpAmp ?

Keep in mind Iload = Vinopamp / RS, so 10 mA thru .25 Ohms says Vin to
opamp has to be 2.5 mV which the OpAmp has 2 mV typical of offset.

If you want 0 - 5V in = 0 - 10 mA load then RS must be ~500 ohms.

The above sims (Vin 5V ) 10 mA for R1 1 to 500 ohms. Note supply has to be >= 12 V
to insure Q1 does not go into saturation and out of current regulation.

Regards, Dana.

Last edited:

Feb 19, 2021
767
Here is the load R swept from 1 ohm to 500, with Vin @ 5V :

Current only changed by 35 uA.

Regards, Dana.

Replies
3
Views
2K
Replies
6
Views
5K
S
Replies
8
Views
1K
steve
S
Replies
9
Views
131
Replies
1
Views
115