PWM control of DC supply

hi,
I am a mechanical engineering student…new to electronics…I have DC supply with both manual and auto mode…I want to generate PWM through arduino. The supply has a cable (written: FROM COMPUTER) with positive and negative terminals. I am connecting positive terminal to arduino pin 9(PWM pin) and negative terminal to GND of arduino. I have write a program digitalwrite(pin9,High) with delay and then again low with some delay…the code giving maximum of 5 V…(I guess may be arduino can provides max this voltage thats why) but what should I do if i want more than 5v. I have TIP122 transistor with me … is it possible to use this for getting higher voltage…
Specifications of Dc : Max 10 V max 2 A

  1. read up on the analogWrite() function. It'll make your PWM life a lot easier.
  2. your pin's high signal is the supply voltage - so 5V on a 5V Arduino. If you want to increase that voltage you need an external circuit of sorts and power supply for that voltage.

ok that means I can only use at max 5V of this power supply with arduino...I can never control 10 V of this supply with arduino ?

nisha9:
ok that means I can only use at max 5V of this power supply with arduino...I can never control 10 V of this supply with arduino ?

Maybe your power supply is happy with a 5V PWM signal. Maybe it requires you to increase the voltage to of the signal 10V (which is pretty easy to do, 10V power supply and some external components). Maybe it actually prefers an analog 0-10V signal, can be done as well.

This is the point where reading your power supply's manual may prove useful.

nisha9:
ok that means I can only use at max 5V of this power supply with arduino...I can never control 10 V of this supply with arduino ?

Using only the Arduino, the PWM output can't exceed the "VCC" voltage. For the Arduino UNO, that would be 5V -- and there other Arduino "flavors" that run at 3.3V [such as the ProMini 3.3V], in which case, 3.3V would be the max PWM voltage.
To generate a PWM signal with a higher voltage, than the Arduino VCC voltage, you need external circuitry, and your TIP122 has a good chance of making that happen [as long as the PWM frequency is below around 200kHz and that Power Supply input doesn't provide a substantial load [which it probably doesn't].

Something like 10k resistor between the Arduino [5V] output and the Base of your TIP122, and a 2.2k resistor between the Collector and the 10V supply. And, of course, the Emitter connects to:

  • The Arduino Gnd
  • The "From Computer Negative" input

Then, connect the Collector to "From Computer Positive" input.

This, of course, assumes 10V is truly the voltage required at the From Computer input. I would be sure of that, before making such a connection.

I've never heard of a commercial power supply that can be controlled with PWM like that...

I have TIP122 transistor with me ... is it possible to use this for getting higher voltage...

As wvmarle says, you need a 10V power supply. (A transistor by itself doesn't "boost" or "generate" voltage.) Then you can use a circuit [u]like this[/u] to boost the PWM.

You'll need to add a pull-up resistor between the collector and your 10V supply. Assuming you just need a low-current control-voltage, a 1K resistor should work.

Note that this is an inverting circuit, so you'll need to invert the PWM. PWM=zero out of the Arduino is PWM= maximum out of the transistor. (That's easy to do in software.) And, there is always some voltage drop across a (powered) transistor so you'll the 0-10V PWM won't go all they way down to zero... It will only go down to 0.2V or so.

You can also do this non-inverting: