Advice on Input circuitry for 0-10v or Pot


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    I would follow mister-e's suggestion and use a divider (2 x 10k resistors) to halve the voltage to give you the 5 volts and then feed this into the PIC.

    You could use the POT command to give you a value which is then used as the delay for the pulse train on the output, something like (I've not tried this but it should give you the idea)

    Code:
    scale = 10
    Pot GPIO*,scale,D
    pwm GPIO.**,D,1

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Nah, sorry, not POT for me to measure an external voltage source. ADCIN (or home made ADC conversion routine) would be my suggestion.

    Maybe POT/RCTIME would be a last resort when your PIC don't have any spare ADCs and you need to measure a POT, maybe some LDRs... MAYBE.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Feb 2003
    Location
    Sydney, Australia
    Posts
    126


    Did you find this post helpful? Yes | No

    Default

    0-10v with a resistive 2:1 dividor would work for the 0-10v input to the ADC input. How about the pot input?

    The commercial units use a 10K between the ground and the input terminal (which can be either 10K pot or 0-10v), but i cannot figure out how they do it.

    Could it be a current rather than a voltage thing ??

    See - this is why I like digital stuff -its on or off.

    bill.
    Attached Images Attached Images  
    Last edited by bcd; - 11th April 2008 at 03:05. Reason: Add picture

  4. #4
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    Nah, sorry, not POT for me to measure an external voltage source. ADCIN (or home made ADC conversion routine) would be my suggestion.
    True, but I have very limited experience of ADCIN

    With regards to the voltage divider the attached image might work - maybe better with a 10K lin pot ?
    Attached Images Attached Images  

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Nope... range of 0-2.5 volts only... because this extra 10K in parallel with your POT.

    2x1% 10K in serie, your ADC in the middle... a 0.1uF cap and that's it.

    If the source handle this load, and is not that far of the PIC (i doubt because of this ol' 0-10v naming), this shouldn't cause any problem... as usual, software filtering/averaging are your friend.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Looks Darrel had written something (LOL ) on that subject ... nooooooo ????

    http://www.pbpgroup.com/modules/wfse...p?articleid=25

    ....

    Boooooooooooooooooooooooooooo

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    Nope... range of 0-2.5 volts only... because this extra 10K in parallel with your POT.

    2x1% 10K in serie, your ADC in the middle... a 0.1uF cap and that's it.
    So how would he adjust the voltage, would placing the 10K pot across the 10v supply, and then placing the 2 x 10K resistors between the wiper and gnd, and then tapping off in the middle work. My thoughts would be that the tap in the middle of the resistors would therefore be half of what ever voltage is coming out of the wiper ?
    Attached Images Attached Images  

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Oh well, there's some voltage divider and ohm law that i'm not going to explain on a friday

    But to me, when at all possible, i try to avoid any kind of trim pot, software calibration is interesting... but there's alway extra work to be done... and the PIC Vdd, and voltage source have their own error margin as well. So i stick to the simple 2 resistor voltage divider

    If you really want to stick with a Trim Pot, i would suggest something like...
    <img SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2493&stc=1&d=120795014 3">
    Attached Images Attached Images  
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post

    If you really want to stick with a Trim Pot, i would suggest something like...
    I thought that was what the original poster wanted...
    Quote Originally Posted by bcd View Post

    What I can't work out is how to get a 10K pot and a 0-10v input (obviously only one is used at a time) I was thinking a pot between Gnd and the input
    bill.
    Steve, I'm still confused over this, using your circuit effectivly gives 10K and 11.1K (2k + 9.1K) when the pot is at min (ie wiper diectly touching the 10K resistor) which would give 5.26 v, but at the opposite throw, it would be 12K and 9.1K which would give 4.31v to the PIC. I assume that you would therefore use the 0.95v difference as the range to measure for the ADC ?

Similar Threads

  1. A/D, Pot, Input, A,B So lost now....
    By Helmutt in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 9th March 2008, 22:23
  2. 0 - 10V input on PIC 16F876
    By slayerizer in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 14th February 2008, 07:25
  3. Digital Pot Advice
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd October 2007, 20:38
  4. Timing input pulses and re-outputting them
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2007, 01:50
  5. Replies: 4
    Last Post: - 24th January 2007, 22:20

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts