Shop OBEX P1 Docs P2 Docs Learn Events
Location of A/D Convertors — Parallax Forums

Location of A/D Convertors

ZootZoot Posts: 2,227
edited 2006-04-12 17:13 in BASIC Stamp
Not sure if this is a question for the Robotics or the Basic Stamp topic so excuse me if it's in the wrong thread.

I'm wiring 4 ADCs (ADC0831) and some Sharp analog IR distance detectors to a Stamp and my wire-lengths from sensor to the Stamp PCB are pretty long (> 16"). Would I be better off mount my ADCs close to the sensors rather than near the Stamp? It's not my first choice, but it would be better than bad distance readings. It would seem that wire-length could really throw things off on any analog signal that's fed into the ADC.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST

Post Edited (Zoot) : 4/10/2006 5:32:42 PM GMT

Comments

  • Tracy AllenTracy Allen Posts: 6,658
    edited 2006-04-10 18:42
    Hi Zoot,

    One thing you have to be aware of with the Sharp analog IR sensors is that they draw quite substantial current, as pulses. You have to be careful with your wiring, so that those pulses don't get back into your system by glitching the power supply or by way of ground loops. I would opt for keeping the ADC near the system. But keep in mind possible voltage drops in the ground wire and connections. If the ADC0831s are located near the Stamp, take advantage of the differential inputs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • ZootZoot Posts: 2,227
    edited 2006-04-10 19:23
    I've got really clean power, with separate filtered supplies for each: Stamp, peripherals, sensors, motors. That said, it's still a pretty noisy environment. A lot of the tips-n-tricks I've seen suggest putting up to a .35mf cap across the +5v/GND pins the detector so the power draw surges don't pull from your supply and/or reset your Stamp.

    In any case, what do you mean by "take advantage of the differential inputs"? I mean, what else is there you could do besides tying GND to the - diff. input and the output of the detetor from the + diff. input? I'm a newbie to using ADCs and the Stamp.
    datasheet said...
    The most important feature of these converters is that they
    can be located right at the analog signal source and through
    just a few wires can communicate with a controlling processor
    with a highly noise immune serial bit stream. This in itself
    greatly minimizes circuitry to maintain analog signal accuracy
    which otherwise is most susceptible to noise pickup.

    If you did locate the A/Ds by the Stamp (like in the dev. breadboard, which is my preference from a physical and wiring standpoint), then what about using the ADC0838 with a Stamp? This is 8 channels single or 4 channel differential A/D. Looks like you would use SHIFTOUT to select what channel(s) to read, then use SHIFTIN (just like the ADC0831) to read your data.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2006-04-12 16:48
    Try it and see. If it is easiest to put the ADC beside the Stamp, then try that first and get the software working. Then see if there is error or noise.

    To use the differential inputs, run 4 wires out to the sensor:
    power Vdd
    power Vss
    signal (+) from sensor output pin
    signal (-) from sensor Vss pin
    The signal (+) and signal (-) go to the differential inputs of the ADC0831. The point of doing that is that the analog signal is produced by the sensor relative to its own Vss pin. The signal (-) wire carries no current, therfore it senses the voltage at the sensor Vss pin without the voltage drops and noise that may be present on the power Vss wire. This will be more important on the long wires. To take it a step further, run the signal (+) and (-) wires separately as a shielded twisted pair.

    It would be fine to put try the ADC0831 out at the end of the wire beside the sensor. That would indeed avoid a lot of the analog noise problem.

    Note that the ADC0838, however, does not have differential inputs. That could work okay if the sensors are together at one location, not off in opposite directions.

    At the sensor itself, put a fat electrolytic, like 100uf or more to absorb the pulses. If the IR devices interfere with one another (from overlapping IR field of view, or from electrical noise), it may help to provide means to power them up one at a time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • ZootZoot Posts: 2,227
    edited 2006-04-12 17:13
    Clever. If I understand correctly, since the IR detector has 3 pins (Vo, Vcc, GND), I'm running Vss out to the detector's GND pin, then running a wire from that pin of the detector back to my differential input (-) on the ADC.

    Again, I'm a newbie with the A/D chips and setup, so it sounds like this is better than tying the ADC (-) input directly to GND because the detector itself is sinking the ground current (and it's noise) and leaving a clean line back to the diff. input (-) on the ADC. Do I have that right?

    The tech sheet for the ADC0838 says you can use the 8 inputs as 4 differential input sets with (-) and (+) or as 8 single inputs. Whatever...following all the intelligent comments I've seen at the forums to keep it simple, I'm trying out one detector and one ADC in my demo board breadboard and learn from there... thanks so much.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
Sign In or Register to comment.