ADC to 3 digit 7 segment highest value needed is 360

Discussion in 'The Projects Forum' started by Kringjat, Jan 15, 2008.

  1. Kringjat

    Thread Starter New Member

    Jan 15, 2008
    4
    0
    hey guys i am new here so if I am doing something wrong tell me

    i have and ADC 8 bit and i need to display it on a three 7 segment but my problem is that the highest value must me 360 How can i do it? a pic is needed? if if yes how i can do it THKS
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    We do not have enough details to give an intelligent answer.

    An 8 bit A to D converter has only 256 states - 0 to 255 - so a value of 360 cannot be output by the device. If, however, you are using the conversion as what amounts to a voltmeter, then an inexpensive digital panel meter will work.
     
  3. Kringjat

    Thread Starter New Member

    Jan 15, 2008
    4
    0
    so if a bigger ADC is used how can for example 9 bit having 512 how it can be done to display values of 0 to 360
     
  4. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    You could use a microcontroller, and have the software convert all numbers greater than 360 to 360, or you could use an EEPROM which you can program to do the same thing.
     
  5. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    You could scale 0-255 to read 0-360, but some numbers would be missing.
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Here's an article that explains connecting 7-segment displays to a PIC microcontroller:
    http://www.picbasic.com/resources/articles/ledart.htm

    A number of PICs have built-in ADC's. You'll need to do some research to figure the rest of it out.

    A microcontroller such as a PIC will very likely be your lowest-cost solution with a minimal parts count.
     
  7. scubasteve_911

    Senior Member

    Dec 27, 2007
    1,202
    1
    The standard methods to display the data would be either scale the analog voltage appropriately, or to scrap the resolution from the ADC.

    So, if you're ADC accepts 0-5V, then make sure the signal doesn't go past ~3.5V. Otherwise, create a lookup table. Use excel to make a 0-360 range over 0-511 rows. Copy and paste it into your PIC compiler, then reference the table.

    Steve
     
  8. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Not to be too persistent, but I would be curious to know what is being measured? I am not sure any answer is correct without knowing what is going on.
     
  9. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    Hi.... A PIC is the best solution... It will do the A/D conversion and multiplexing of the LED displays... What sort of sample rate are you looking for, and what input voltage range...I may be able to help you...Daniel.
     
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Just a guess - but there are 360 degrees in a circle, or points in a compass... ;)
     
  11. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    Yes, but what voltage range into the A/D is required to read 0 to 360....Daniel.
     
  12. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    That sounds like a good guess. Then the question is the resolution required. If he needs to indicated all 360 deg., then the A to D resolution will have to be at least 10 bits.
     
  13. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    Yep !...The PIC will do that as they have 10 bit A to D's on board...Daniel.
     
  14. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Wouldn't that be 9 bits minimum? I don't think you can but a 9 bit A/D, so this is an academic question.
     
  15. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    Yeh....8 bit's = 255 + 0, 9 bits = 511 + 0 and 10 bit's = 1023 + 0....The A to D converter in th ePIC is software selectable for 8 or 10 bit's resolution...Daniel.
     
  16. Kringjat

    Thread Starter New Member

    Jan 15, 2008
    4
    0
    Hey guys thks for the feedback till now and sorry for missing some infor ans for your infor yes its is for a compass my problem is to having a voltage and needs it to be converted to 360 degrees but is it possible to not use a pic because that what i wish to do having an adc to 3 7 segment display displaying 360 degrees as the highest value any ideas thks
     
  17. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    A couple of questions:
    1) How do you plan to convert from binary to BCD?
    2) Don't you actually want to limit the highest number to 359?
     
  18. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    How are you planning to generate the analog voltage? Will you use a servo potentiometer?

    If you have some way to make a voltage that follows the compass rotation, you can scale it and use a panel meter. The meter uses A to D conversion to get the numbers to display.
     
  19. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    Hi again....I did this last night.... 0 to +5v, reading 0 to 360 with a PIC and a 4511 multiplexed onto 3 LED displays.... The voltage can be scaled to any value between 0 and whatever....Daniel.
     
Loading...