A bunch of analog signals (32) waiting to get digital

Discussion in 'Embedded Systems and Microcontrollers' started by kampianakis, Jul 10, 2010.

  1. kampianakis

    Thread Starter Member

    Jul 10, 2010
    Hi forum

    I have been working on an embedded system project lately that has to do with a low power sensing system on an electric car. The needs of this project are the following :

    32 analog signals to be digitally measured (voltage,current,temperature,speed , acceleration and more)
    5-7 actuators
    1 UART
    (and 6 misc signals)

    With a quick look you can see the problem here. How on earth can i interface all the above with a single chip . So my question is :
    Does anyone have in mind of an (8051 preferably) mCU that has so many I/Os (especially for adc purpose)? If not , how could i do it with a smaller chip. I have recently came across th MCP3208 adc-8in-mux chip which seems to be fit for this . Has anybody used this one ? I could use more than one chip but i'll try to avoid it.

    Thank you in advance
    Last edited: Jul 10, 2010
  2. BMorse

    AAC Fanatic!

    Sep 26, 2009
    You can use just about any microcontroller that has atleast 1 ADC input, then use 4 analog mux's (such as the 4051 with 8 analog channels) to read your 32 analog signals.... possibly a PIC16F887 (has 14 ADC channels and also a UART/SPI/I2C) should work for you....... depending on how many I/O's those actuators use...

    B. Morse
  3. kampianakis

    Thread Starter Member

    Jul 10, 2010
    I have actually decided to use 3 C8051F320 from silabs on SPI (17 adc channels and an amazingly good written manual)
    2 slaves to do ADC work and a master to read with polling and do other stuff
    Maybe i will use just 2 of them on spi and both will do adc work
    Thank you for the reply
  4. tom66

    Senior Member

    May 9, 2009
  5. kampianakis

    Thread Starter Member

    Jul 10, 2010
    Simple and wise
    Although i will try to find a mux from another vendor because i do not have the best experience with analog devices products and especially support. Anyways great , simple advice
    Stupid me who didnt think of a simple mux the first time
    Thank you
  6. nickelflipper

    Active Member

    Jun 2, 2010
    See that Microchip supplies 16 bit micro's with 32 analog channels. Have neither seen, nor used such an animal.
  7. kampianakis

    Thread Starter Member

    Jul 10, 2010
    I have found some DIP 16-1 muxs. I will use 2 of them. I could build a tree with smaller ones but i dont want to use too many components. Therefore , on the software (or middleware preferably) i will have something like this
    for(i = 0 ; i< 32 ; i++){
    En1 = 0;
    En2 = 1;
    a1 = i / 2;
    a2 = i / 4;
    a3 = i / 8;
    a4 = i / 1;
    ADC_Channel_select_register -> Select_output_from_1st_16x1mux;;

    k = i/2;
    En1 = 1;
    En2 = 0;
    a1 = k / 2;
    a2 = k / 4;
    a3 = k / 8;
    a4 = k / 16;
    ADC_Channel_select_register -> Select_output_from_1st_16x1mux;


    converted_data = DataFromOneAdc();
    printf("Data from channel : %d = %.2f mV", i , converted_data);
    Where a0..a3 are the address inputs of the muxs , En0,En1 the enable signals of each.
    I would be happy to see something better proposed
    Thank you all
  8. tom66

    Senior Member

    May 9, 2009
    The best solution is to use a mux with all the channels you need, but your solution will work adequately well.