How to Compare two or more Power sours

Discussion in 'Embedded Systems and Microcontrollers' started by mkbutan, Aug 5, 2014.

  1. mkbutan

    Thread Starter Senior Member

    Sep 30, 2008
    270
    16
    Hi,
    I would like to know how can I Compare two or More Power sours with LM-xxx Compactor and analyse it on Arduino 328 uno Board or TI MSP430 or C2000 Board
    the result should be on the LCD

    Please help me to Start this Project (Power sours can be 6/12v Battery or Solar Panel's (in a Grid) )
    Thanks in advance
     
  2. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,388
    497
    I don't think you understand how analog comparators work.

    I would simply get an ADC with multiple inputs. ADC takes voltage value in volts and converts it into digital value, then in software I convert the digital value into analog voltage value and store it as a string of characters, then I send the string of characters to the LCD.

    I think UNO has one or two build in ADC, I think they are 5 volt maximum. You can use them to learn how to do the job of the bigger project. Use battery and voltage divider to generate voltages between 0 and 5 volts, send them to UNO ADC. Do the conversions in software and output result to LCD. Once you get this working, you can go to your original project and scale it up to 6-12 volt reading that you originally wanted.
     
    mkbutan likes this.
  3. mkbutan

    Thread Starter Senior Member

    Sep 30, 2008
    270
    16
    Hi dear sir, thanks for your time .
    sir , only thats the problem I dont know how to do that .
    I have Arduino 328 UNO ; MSP430 Launchpad ; C2000 Launchpad Board's( I prefer Arduino)
    I have 16x4 LCD on which I would like to get the Reading as
    For Example:- if its 12v Cell or Solar Panel what's the Output each cell is giving
    Cell 1- 06v
    Cell 2- 08v
    Cell 3- 10v
    Cell 4- 126v
    Cell 5- 09v
    Cell 6- 07v
    ...
    ...
    Cell n- xxv
     
  4. mitko89

    Member

    Sep 20, 2012
    123
    19
    In a loop switch analog channels you sample, read the value, do the maths and display it on the LCD. Actually you can use comparator as an ADC, but this is a bit advanced for you for now and I wouldn't recommend it.
     
    mkbutan likes this.
  5. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,388
    497
    Arduino website has explanations, examples and forums. Go read.
     
    mkbutan likes this.
  6. mkbutan

    Thread Starter Senior Member

    Sep 30, 2008
    270
    16
    Hi dear sir,
    Actually I was thinking the same LM339 or LM393 for that but do I have to have individual Comparator for each Voltage Channel
    I am planing something like that I want to know which Component to be used in between Battery/Solar cell and Development Board

     
  7. mitko89

    Member

    Sep 20, 2012
    123
    19
    To use comparator as an ADC you need external capacitors and timers. It's much more complex to do than using an ADC and the controllers you mention both have ADC. Do it with ADC of the controller.
     
    mkbutan likes this.
  8. mkbutan

    Thread Starter Senior Member

    Sep 30, 2008
    270
    16
    But sir the Input Voltage is more , it's 06v and 12v Solar Panel's or Battery's
     
  9. mitko89

    Member

    Sep 20, 2012
    123
    19
    Use resistor dividers to get just a portion of the signal.
     
  10. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,388
    497
    First. Uno has 6 ADC. So you can connect 6 devices to it.

    Second. Like mitko and I said, you can use voltage divider to provide you with voltages that are acceptable for input to Uno 5 volt ADC. In this case you will need a voltage divider for each device. Don't forget your LCD. If you use 6 ADC already built into Uno, you have 14 digital lines to interface LCD to your Uno.
    Or.
    Get a separate ADC chip that natively works with 12 volts and interface it with Uno using parallel or serial communication setup. Parallel uses 1 line for each bit, so if you have 8 bit ADC chip, you will need 8 lines from ADC chip to Uno, Uno has 14 digital lines, so this is doable, if you have 10 bit ADC chip, you will need 10 lines from ADC chip to Uno. But don't forget that you also wanted LCD. The more lines you use for ADC, the fewer lines you have for LCD. Serial uses 2 or 3 lines. For most efficiency you could use serial ADC chip and serial LCD.
     
  11. Sal Ammoniac

    New Member

    Jun 30, 2010
    16
    1
    What is a "power sour"?
     
  12. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,388
    497
    So far batteries and solar panels.
     
  13. mkbutan

    Thread Starter Senior Member

    Sep 30, 2008
    270
    16
    Hi,
    I was searching on net , and got an idea if I can use

    01. ANALOG Switch which have 0-12v dv input and give 0-5v dc output...
    02. Voltage to Frequency Converter for 0-12v dc input and give its output Frequency to Arduino UNO Analog input...

    any other suggestions please...
    give your view
     
Loading...