View previous topic :: View next topic |
Author |
Message |
JAM2014
Joined: 24 Apr 2014 Posts: 138
|
PIC voltage control..... |
Posted: Fri Jun 09, 2017 9:37 pm |
|
|
Hi,
I'd like to generate a PIC controlled voltage that is now implemented with an adjustable voltage regulator circuit based on the LM317, some discrete resistors and a potentiometer. Output voltage range is about 2.8V up to 4.3V.
This voltage is a reference for a comparator circuit, so it needs to be somewhat 'clean'. My inclination is to simply replace the current potentiometer with a digital pot, but I'm open to other suggestions.
Thoughts?
Jack |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Sat Jun 10, 2017 6:24 am |
|
|
A 'digipot' could be the simplest, cleanest solution. Some default to 1/2 V on powerup...some can be preset to another 'position'.An 8 bit digipot hopefully will give you the resolution you require.
I'd bench test it...seems OK to me ! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Sat Jun 10, 2017 12:48 pm |
|
|
Remember, you can develop a voltage from a PWM.
Simply feed the output of a PWM signal into a resistor feeding to a capacitor. Say a 1KR resistor feeding into a 0.1uF capacitor.
Then try feeding this from the PIC PWM pin. set the PWM to perhaps 10Khz, and 50% duty, and your voltage on the top of the capacitor will be close to 50% of your supply.
Now, how useful this is, will depend on the load you are feeding this into. Use a rail to rail buffer op-amp, and the output from this can be very useful indeed. |
|
|
|