Shop OBEX P1 Docs P2 Docs Learn Events
NEWBIE: Analog to Digital Question — Parallax Forums

NEWBIE: Analog to Digital Question

Frankfern123Frankfern123 Posts: 35
edited 2013-06-11 06:42 in Propeller 1
Hi All, Today's dumb question is as follows:

The Propeller has more I/O's than I'll ever need for my "hope to be" finished product. So do I need to add IC's for ADC and DAC conversion. All my devices run off 5VDC. If so, does anyone have any circuit examples. I plan on using the Propeller USB project Board as my base.

My project will have the following needs.

4 - ADC Inputs (all reading 0 thru 5 VDC)
4 - TTL Inputs
6 - Outputs to enable relays via LOW level grounding.


Thank you in advance.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-06-05 07:35
    You haven't mentioned DAC conversion needs, so it appears that you won't need any. You can certainly use the Prop's sigma-delta ADC capability, but for best speed and accuracy, the resistors and capacitors have to be mounted next to the chip package. There's no way to do that on the Propeller USB Project Board and external ADC chips are cheap and easy to interface with. I'd suggest something like the MCP3204 which has 4 inputs. This can be run off the Prop's 3.3V supply and you'd use voltage dividers on the inputs to reduce the 0-5V input range to 0-3.3V.

    For TTL inputs, you might be able to get by with 3.3K or 4.7K series resistors to limit the current to under 500uA (R > (5V - (3.3V+0.6V))/500uA = 1.1V/500uA = 2.2K).

    For relay switching, you could use a Darlington array (ULN2803A)
  • Frankfern123Frankfern123 Posts: 35
    edited 2013-06-05 08:30
    Thank You Mike, You always seam to be the 1st to answer me. (for what it's worth I'm having fun with all of this)

    I have another question though, another circuit I may need to add will be to drive 12 VDC solenoids. The factory application have 12 VDC running to them at all times and they are triggered with a ground for either simple ON/OFF or PWM. The way I've seen them wired is thru a single Hi Power tin can style transistor. Do you have any thoughts on how I can add this as well.

    In the end by what your describing i may be better off creating a "daughter board" with all my compnents that connects to the Prop Board I want to use.

    Please give me your thoughts.......... Thanks again.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-06-05 08:42
    Although it refers to the Stamps, Nuts & Volts Column #6 also applies to the Propeller or any microcontroller and shows how to use transistors to control high power loads. The ULN2803A I mentioned in Post #2 can handle up to 500mA loads and you can parallel the outputs for multiples of that. There are also MOSFETs that can be used, but you have to be sure to choose devices that will adequately switch on with the low voltages produced by the Prop's I/O pins. Various forum members have described their favorite MOSFETs for this, but I don't have a link to the threads. Try searching for this

    There's plenty of room on the Project Board for a MCP3204 and a ULN2803A as well as connectors to their inputs and outputs respectively.
  • ManAtWorkManAtWork Posts: 2,176
    edited 2013-06-11 06:42
    IMHO the best devices to switch small DC loads are automotive lamp drivers. My favorite ones are BTS432 (single chanel 9A) and VNQ860 (quad chanel 250mA). They can handle up to 40V supply voltage and you can drive them directly with a 3.3V propeller output. They are almost bullet proof (short circuit, overtemperature, loss of ground, inductive load and reverse polarity protection).
Sign In or Register to comment.