Shop OBEX P1 Docs P2 Docs Learn Events
Can a Basic stamp do this job? — Parallax Forums

Can a Basic stamp do this job?

ken liljaken lilja Posts: 3
edited 2012-07-03 10:17 in BASIC Stamp
I am looking to find out if this is something that a BSII can do.
I want to read voltage, current and temperature sensors and display the readings on a display, minimum 12 characters (preferably one with a decent "V") One sensor has a built in ADC with a 2 wire output. The other 2 sensors will need a 12 bit, preferably a 3.3V reference voltage ADC. Possible sensors: http://www.sparkfun.com/products/10644 http://www.sparkfun.com/products/9418 or http://www.parallax.com/Store/Sensors/TemperatureHumidity/tabid/174/CategoryID/49/List/0/SortField/0/Level/a/ProductID/84/Default.aspx
I do have a BSII.

Possible operational schemes depending on what the processor can do:
A) 1 reading, reading changes to the next sensor every 4 seconds or so.
B) 1 reading, selected manually with a switch.
C) 1 reading, reading changes to the next sensor every 4 seconds or so, or selected manually with a switch.
D) 3 readings on a multi line display.
1) as D) above with a clock or varying irreverent statements on a 4th line.
Refresh rate at least 2 Hz.
If doable, is there a "best" version of the BSII for this task?
I have almost no experience with programming, some electronics background. This is a project to support my main hobby of radio control, so the "less" I have to learn the better. I do have several books and a BOE for the BSII, (I did complete a project where the BSII managed some relays based on push button inputs, current state and time delays).
If I know that this is within the capabilities of the BSII series then the searching and battle begins!
Thanks for you time and opinions,
Ken Lilja

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-07-01 16:24
    The BS2 does not have built-in I2C (usual 2-wire protocol) statements, but there are subroutines that will do this for you described in a Nuts and Volts Column you can download (#85?). There are other 12-bit ADCs that Parallax carries and there's sample code for handling them. They come in 2,4, and 8 channel versions. If you get a 4 line x 20 character display with a serial interface (like the one Parallax carries) you should be able to read all the sensors and display the results pretty much as fast as you like, well under 1/4 second, limited more by display speed than anything else.

    A BS2 will do for this, but the BS2p or BS2pe or BS2px has built-in I2C statements and more memory that I'd prefer to have if I didn't already have a BS2.
  • ken liljaken lilja Posts: 3
    edited 2012-07-02 07:00
    Mike,
    Thanks for the response. A couple more questions.
    The BS2p has built in I2C support. Can I find a 12 bit ADC that uses this protocol?
    I also see that the BS2p has a built in lcd controller. It seems to be limited to 2x24 and 4x12. I haven't found any 4x12 displays. Can I use a 4x16 or 4x20 display with a serial different controller?
    Thanks for any info.
    Ken Lilja
  • Mike GreenMike Green Posts: 23,101
    edited 2012-07-02 08:42
    There are two different kinds of LCD controllers for this sort of use, serial and parallel. Serial controllers usually only need one or two I/O pins while parallel controllers need 6 or 10 or more I/O pins. The LCD statements in PBasic work with parallel controllers. You'd use the SEROUT statement with a serial controller.

    There are I2C ADCs including 12 bit ones. I don't have any specific recommendations. Maybe someone else can chime in with one.
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2012-07-02 10:44
    There are plenty of 12 bit and higher ADCs that use I2C protocol, but the ones I think of are surface mount parts. Are you comfortable with that?

    One I've used with the Stamp (have code for!) is the MAX11612 and the firmware-compatible MAX1236. It is a 4-channel (2-channel differential) device with an included 4.096V reference, in a 8-pin uMax package. Other ADCs in the same family have up to 12 inputs, or a 2.048V reference for use say with the Propeller.
  • ken liljaken lilja Posts: 3
    edited 2012-07-03 10:17
    I bought a BS2px. It was cheap at $63.20 at Robotshop. I also picked up the Parallax 4X20 LCD display and a couple of DS1620 temp sensors.
    Tracy, I went with a MAX11615 ADC. Being of the same family as the MAX 11612 I hope that it can use the same code. Could you send me a copy?
    Thanks for the help!
    Ken
Sign In or Register to comment.