Pages: [1]   Go Down
Author Topic: can PWM and Resistance be exchanged?  (Read 1437 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Edison Member
*
Karma: 29
Posts: 2443
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

take an LM317t an adjustable voltage regulator..

depending on the voltage divider on the reference pin determines the voltage out... how is that resistance produced digitally?
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 145
Posts: 5468
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

take an LM317t an adjustable voltage regulator..

depending on the voltage divider on the reference pin determines the voltage out... how is that resistance produced digitally?

MOSFETs can work as variable resistors - just change the voltage on the gate to vary their resistance.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Edison Member
*
Karma: 29
Posts: 2443
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could a TIP31 be used instead? I got like 20 of them but only two IRF's....
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 145
Posts: 5468
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Instead of what?
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
   
can PWM and Resistance be exchanged?

Yes, the same way you exchange birds and rocks.

Quote
how is that resistance produced digitally?

It is generally not produced digitally.

You can produce it digitally with a digital pot, or through feedback control by a mcu (via a dac for example).
Logged

UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A TIP31 is a BJT (epitaxial) NPN Bipolar Junction Transistor, not a Metal-Oxide Semiconductor Field Effect Transistor.

IRF is just a manufacturer.  There are hundreds of other makers around.

You want (precisely) an N-Channel Enhancement Mode MOSFET - they are 10 a penny from any electronics supplier.  (99% of all N-Channel MOSFETS are enhancement mode, but be sure to check).
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Offline Offline
Faraday Member
**
Karma: 65
Posts: 2500
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You want (precisely) an N-Channel Enhancement Mode MOSFET - they are 10 a penny from any electronics supplier.

Link, please.   (:
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33984
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
depending on the voltage divider on the reference pin determines the voltage out... how is that resistance produced digitally?

I am assuming the question is:-
I have a reference voltage on a LM317t an adjustable voltage regulator. Currently in my circuit it is produced by a potential divider, how can I make that reference voltage variable under the control of an arduino. Will PWM help?

In which case the answer is yes, remove the potential dividor and feed the PWM into an RC filter to smooth it, this will then produce a variable voltage you can then apply as a reference to your LM317t .

If this was not your question then please post again.
Logged

Offline Offline
Edison Member
*
Karma: 29
Posts: 2443
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes that was the question but i'll use a power transistor rather than put strain on the atmega
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33984
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What sort of strain? Useing PWM takes no CPU time and I would be surprised if a LM317 took more than say 20mA on the referance input.
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2883
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

An LM317 has a Max 100uA Iref or reference current and unless the OP needs need a really fast response could be filtered with a 10K resistor and a 220nF cap. It's a voltage source essentially. Do remember to filter the output of the '317, there's a lot of gain in that small package. I've enclosed a data sheet on that part.

Bob

Bob

* LM317X.pdf (995.91 KB - downloaded 10 times.)
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 619
Posts: 33984
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I would first use a transistor to generate a PWM signal based on the output of the regulator, before filtering it and applying to Vref. This is so that you get the feed back from the output to get a good voltage regulation.
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I would first use a transistor to generate a PWM signal based on the output of the regulator, before filtering it and applying to Vref. This is so that you get the feed back from the output to get a good voltage regulation.

I'm basically with G_M here. His ckt should give a voltage output in the range of Vref[LM317] = 1.2V
minimum to 5V+1.2V = 6.2V max.

Many ckts for reference are here,

http://www.google.com/search?num=10&hl=en&safe=off&site=imghp&tbm=isch&source=hp&biw=1153&bih=870&q=LM317+voltage+control

Several possibilities,

http://easy-electronic-circuits.blogspot.com/2012/04/lm317-dispaly-intensity-controller.html
http://www.circuitstoday.com/few-lm317-voltage-regulator-circuits

Somewhere should be a ckt where the PWM input drives an opAmp with some gain and whose output node
is connected to the LM317 reference pin to produce a larger Vout.
« Last Edit: November 17, 2012, 01:31:26 pm by oric_dan(333) » Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The answer will depend on if you wish to change the output voltage digitally and if you require low ripple. pwm + a filter will provide a variable voltage but it also provides ripple that gets passed onto the output un-attenuated.

This is where a digital pot / dac would be very helpful to achieve low ripple output.

That assumes no negative feedback on the part of the mcu.
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2883
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

for the current requirements, an Arduino will supply enough current for control with passives, 2 RC low pass filters should reduce the ripple to virtually 0. One low pass on the input to an op-amp for voltage scaling and one on the output of the scaling amplifier. The Arduino however can't supply enough voltage to get more than 3.8 V from a 5 V source using an LM317. I would have to repeat Mikes suggestion about digipots And a scaling amplifier as the digipots have a Vcc restriction @ 5 V... due to the input parasitic diodes inherent in the chip. Were it Me I'd use a switcher and control the voltage output with a digipot, No linear loss to contend with and really easy to clean up with a very simple Pi section filter... I'd use a 100 uHy Choke and 2 22 uF caps. The only real consideration would be the current requirements... The output filter might not be required... If you aren't doing any analog sensing then any noise from the switcher is a "don't care" thing because the typical "Noise" from a switcher is ~100 mV which is well below the switch threshold for CMOS logic. The 317 is a nice OLD device and when it was made there were no easy to use switcher IC's available... There are devices that are smaller than an LM317T (TO-220) device and require minimal heat-sinking unless you require full current capacity with high duty cycles, then a simple copper "Tab" soldered to the switcher PCB and bolted to a small heatsink. I used a similar method to control a UHF tranceiver's transmit power output power in the early 2000's by sensing the output power and controlling the switcher for required output power, in exactly the same manner as I described above.

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Pages: [1]   Go Up
Jump to: