CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC voltage control.....

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
JAM2014



Joined: 24 Apr 2014
Posts: 138

View user's profile Send private message

PIC voltage control.....
PostPosted: Fri Jun 09, 2017 9:37 pm     Reply with quote

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: 9102
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jun 10, 2017 6:24 am     Reply with quote

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: 19219

View user's profile Send private message

PostPosted: Sat Jun 10, 2017 12:48 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group