Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp 2 Voltmeter? — Parallax Forums

Basic Stamp 2 Voltmeter?

VaatiVaati Posts: 712
edited 2010-03-29 04:47 in BASIC Stamp
Can the BS2 read a voltage input from about .1 to 3.7 and display the voltage level on a 7-segment LCD? If it can read the input voltage, how accurate can it be?

EDIT: I should probably also add that this will NOT end up as a BS2 project, but a PICaxe 08M project. (sorry guys, but the BS2 is overkill smile.gif )

Another thing to point out is that the PICaxe does have a built-in ADC, so it may be easier than I thought.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
MCU Projects·- my new site where I will be posting all projects, code, etc.

Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

SD Card Adapter·- Add extra memory to your next Propeller project with ease!

Post Edited (Vaati) : 3/28/2010 11:27:35 PM GMT

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-03-28 21:49
    You can read voltage using RCTIME. Read the info in the syntax manual to see how it works. You could also use an external ADC chip to do this. They make those up to 24bit that are not too expensive for hobby testing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • VaatiVaati Posts: 712
    edited 2010-03-28 21:51
    Thanks! I'll check out the manual, and my WaM and BOE-bot texts for info on RCTIME. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    MCU Projects·- my new site where I will be posting all projects, code, etc.

    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    SD Card Adapter·- Add extra memory to your next Propeller project with ease!
  • VaatiVaati Posts: 712
    edited 2010-03-28 23:07
    Hmm...
    It seems that the application I had in mind for this will be a little more complex than just using RCTIME.

    My goal for this is to be able to have a compact "voltmeter" for my adjustable power supply, and make an "Adjustable Power Supply Mk.II" which includes a PICaxe that reads the voltage and displays it on some seven-segment LED's.

    The problem is, it's not like the potentiometer is exactly accessible for the RCTIME command. Correct me if I'm wrong, but that cannot take an input voltage from 1.2 to 25 volts (reduced by 1/10 using a voltage divider) and simply display the voltage using DEBUG (for starters, and then onto the seven-segments). It looks like it just reads the resistance of the pot and determines the capacitance discharge time.

    I don't really understand what RCTIME does. Can it actually be used to read a voltage input?

    Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    MCU Projects·- my new site where I will be posting all projects, code, etc.

    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    SD Card Adapter·- Add extra memory to your next Propeller project with ease!
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-03-28 23:33
    Here is a ADC Chip will work for you
    You do have to scale the input to read a voltages more than 2 volts

    http://datasheets.maxim-ic.com/en/ds/MAX1497-MAX1499.pdf

    Bellow is a demo that I wrote for this chip

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • VaatiVaati Posts: 712
    edited 2010-03-28 23:45
    Wow--thanks!

    I will get that chip and see how it works out...

    Now, how does an ADC work? What can it do in terms of reading voltage and outputting a digital value?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    MCU Projects·- my new site where I will be posting all projects, code, etc.

    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    SD Card Adapter·- Add extra memory to your next Propeller project with ease!
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-03-28 23:53
    Go to there web site·and ask for some free samples

    that chip is about $40.00

    that is what I did

    It reads it just like a volt meter that chip also can send it to a LED display


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 3/28/2010 11:58:21 PM GMT
  • VaatiVaati Posts: 712
    edited 2010-03-28 23:55
    Yeah--that's what I was planning on doing. smile.gif

    Their samples ship fairly fast, but no one is as fast at shipping as TI.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    MCU Projects·- my new site where I will be posting all projects, code, etc.

    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    SD Card Adapter·- Add extra memory to your next Propeller project with ease!
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-03-28 23:58
    I have not had time to use all of the thing that this chip can do but when I have some time I will write some more code for this chip

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam
  • mikedivmikediv Posts: 825
    edited 2010-03-29 01:00
    sam_sam_sam I will keep an eye on this post I just ordered the chip myself it looks like it has quite a few features I would be really interested in any code you share thanks
  • ercoerco Posts: 20,256
    edited 2010-03-29 04:47
    BS2, PicAxe, ADC,·why mess with it if you just want to display it on an LCD? It's been done to death...

    Get this multimeter at Harbor Freight for $2 on sale and cut it up to fit into your project. It's complete, calibrated and it includes the LCD!

    http://www.harborfreightusa.com/usa/itemdisplay/displayItem.do?itemid=98025&CategoryName=&SubCategoryName=

    98025.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
Sign In or Register to comment.