Shop OBEX P1 Docs P2 Docs Learn Events
Duplicating PropBOE Analog inputs on Prop Proto Board.. — Parallax Forums

Duplicating PropBOE Analog inputs on Prop Proto Board..

doggiedocdoggiedoc Posts: 2,245
edited 2013-01-01 12:45 in General Discussion
Hey ya'll!

On my Automatic Chicken Coop Door prototype I used one of my PropBOE boards but now think I should replace it with a Proto Board. The BOE is serious overkill as all I am only using 2 analog inputs and a few GP I/O. I have (somewhere around here) a couple of LTC1298s and a couple of ADC0831s.

Question #1:
Would either of them be a drop in replacement for the ADC circuitry on the PropBOE?


Question #2:
I was planning to use the Propeller Proto USB Board #32812 but I noticed the input rating is 6-9 VDC. The coop is set up for 12 volts. Should I just make a voltage divider in the input line for the 9 volts limit or is this a good excuse to order a couple or five of new Propeller Project Boards?

Paul

Comments

  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-12-18 18:02
    The Project Board has a more efficient regulator, too, so it'll draw less current from your batteries.

    The ADC0831 should be usable, but I doubt it'll be a direct drop-in replacement. The communication protocol is likely different and will require some work.

    The LTC1298 is probably easier to interface to, as it has no data input, and the output can just use a resistor. It only supports one channel, though.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2012-12-18 18:04
    doggiedoc wrote: »
    Question #2:
    Should I just make a voltage divider in the input line for the 9 volts limit or is this a good excuse to order a couple or five of (the) new Propeller Project Boards

    Negative on that divider idea.
  • doggiedocdoggiedoc Posts: 2,245
    edited 2012-12-18 18:20
    PJ Allen wrote: »
    Negative on that divider idea.
    Or perhaps see if the Proto Board will tolerate 12v. :D
  • doggiedocdoggiedoc Posts: 2,245
    edited 2012-12-18 18:24
    The LTC1298 is probably easier to interface to, as it has no data input, and the output can just use a resistor. It only supports one channel, though.
    I have 2 LTC1298s so that might be oK. I'm not to eager to redo my code. Perhaps I'll experiment some this weekend.

    I am going to order a couple of the new project boards though. They look sweet!
  • doggiedocdoggiedoc Posts: 2,245
    edited 2012-12-19 15:01
    I'm a little surprised no one has suggested an alternative ADC that uses i2c. Help used to come quicker here.

    BTW the Propeller Proto USB Board #32812 seems to tolerate 12 volts (with no load).
  • kwinnkwinn Posts: 8,697
    edited 2012-12-19 16:12
    I use the MCP3208 for almost all of my applications. The drivers in the OBEX work well and the chips have proven to be stable, reliable, and accurate over time. It is a bit of overkill for some things, but I find the reduction in the number parts to stock worthwhile.

    If you want to use the USB protoboard you could always put a 6-9V regulator between the 12V supply and the protoboard. A 3 terminal regulator is pretty inexpensive. On the other hand the new project boards do look very nice so this may be the perfect excuse to buy one or two, or even five or ten.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-12-19 17:56
    doggiedoc wrote: »
    I'm a little surprised no one has suggested an alternative ADC that uses i2c. Help used to come quicker here.

    Most the help is either tied up in litigation on the licensing threads or too busy playing with their Prop II emulators.

    The old neighborhood is changing.

    As for your other question, of course it's a good reason to get some o the new boards!!
  • doggiedocdoggiedoc Posts: 2,245
    edited 2012-12-20 09:47
    mindrobots wrote: »
    Most the help is either tied up in litigation on the licensing threads or too busy playing with their Prop II emulators.
    Looks that way doesn't it?

    @Kwinn - I may have an MCP3208 around here somewhere. It has an SPI interface doesn't it?
  • doggiedocdoggiedoc Posts: 2,245
    edited 2012-12-22 06:50
    The only through hole ADC with i2c listed on Digikey.com is 24 bit.

    http://www.digikey.com/scripts/dksearch/dksus.dll?FV=fff40027%2Cfff80183%2C1140050&vendor=0&mnonly=0&newproducts=0&ptm=0&fid=0&quantity=0&PV243=79&stock=1

    I'm not sure if that would work or not.


    I'd appreciate any insight.
  • doggiedocdoggiedoc Posts: 2,245
    edited 2012-12-22 11:55
    Found one of these in my 'hoard'. Looks like single channel bit bang type. :(
  • RDL2004RDL2004 Posts: 2,554
    edited 2012-12-23 04:09
    Just a thought, but if all you're doing is deciding if it's light/dark enough to open/close the door maybe an ADC is overkill? Possibly a comparator of some kind would work just as well.
  • doggiedocdoggiedoc Posts: 2,245
    edited 2012-12-23 04:41
    RDL2004 wrote: »
    Just a thought, but if all you're doing is deciding if it's light/dark enough to open/close the door maybe an ADC is overkill? Possibly a comparator of some kind would work just as well.
    Perhaps you are right Rick. However, this way I have a nice bit of hysteresis built into the software thresholds. I don't need the door to oscillate. :D

    Paul
  • ercoerco Posts: 20,259
    edited 2012-12-24 05:10
    doggiedoc wrote: »
    Perhaps you are right Rick. However, this way I have a nice bit of hysteresis built into the software thresholds. I don't need the door to oscillate. :D

    Paul

    LM339 comparator + 1 megohm feedback/hysteresis resistor = 19 cents :)
  • doggiedocdoggiedoc Posts: 2,245
    edited 2012-12-31 11:49
    Update:

    So I caved on finding an i2c ADC and went with an LTC1298. Rewriting the code for SPI interface wasn't as difficult as I thought it would be. So I wired up a Prop Proto-board and installed it in the coop. Cursory test look good. I'll need to recode the thresholds for dusk and dawn tonight and in the morning.

    One hitch I'll need to overcome is the power supply. The proto board is rated for 6-9V and I've got 12v power wired in the coop. Maybe I've a 9v regulator around here somewhere. If not I could use an LM317.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-12-31 11:56
    I'm pretty sure the regulator on the proto board can take 12V in as long as you're not drawing much current. The 9V limit is to keep the heat down not because the regulators can't handle it.

    If your current requirements cause the regulator to get hot, add a heatsink.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-12-31 11:57
    I guess the door oscillating could have a negative impact on a bird's day :(

    As to which ADC, I would have steered you to the mcp3201 single channel. Simple, no commands channel selects or otherwise. Simply give it the falling chip select and appropriate number of clock cycles and you have your 12 bit output.

    Frank
    doggiedoc wrote: »
    Perhaps you are right Rick. However, this way I have a nice bit of hysteresis built into the software thresholds. I don't need the door to oscillate. :D

    Paul
  • doggiedocdoggiedoc Posts: 2,245
    edited 2012-12-31 13:03
    @Duane - I ran it for a little while at 12V with no problem. The current demand is not very high, but I added an adjustable regulator set to 9v between the board and the batteries.

    @Frank - a big factor in my selection of the LTC1298 is that I had some. :D
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-12-31 17:26
    [QUOTE=doggiedoc;1154454
    @Frank - a big factor in my selection of the LTC1298 is that I had some. :D[/QUOTE]

    Best reason of all...........
  • ercoerco Posts: 20,259
    edited 2012-12-31 18:01
    I'm sure you know this, but since you mentioned "a couple of adc0831s":
    adc0832=2x adc0831
    adc0834=4x adc0831

    Now before peeking, guess what an adc0838 is? :)

    http://www.national.com/ds/AD/ADC0831.pdf
  • frank freedmanfrank freedman Posts: 1,983
    edited 2013-01-01 03:34
    Ddddddoooooooohhhhhhhhh, I give up!!!! Tell me, oh, tell me please!!!!
    erco wrote: »
    I'm sure you know this, but since you mentioned "a couple of adc0831s":
    adc0832=2x adc0831
    adc0834=4x adc0831

    Now before peeking, guess what an adc0838 is? :)

    http://www.national.com/ds/AD/ADC0831.pdf
  • doggiedocdoggiedoc Posts: 2,245
    edited 2013-01-01 12:45
    The LTC1298 appears to be working fine. Although I did have to pull the board and add more series resistance to pull downs. While I had the board out, I wired up a DS1302 RTC for timekeeping - I add an SD reader for data logging later.
Sign In or Register to comment.