PDA

View Full Version : Basic Stamp 2 Voltmeter?



Vaati
03-29-2010, 04:41 AM
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 http://forums.parallax.com/images/smilies/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 (http://www.mcuprojects.propmodule.com)·- 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 (http://www.gadgetgangster.com/130)·for your projects!· Includes an LED testing terminal!

SD Card Adapter (http://www.gadgetgangster.com/158)·- Add extra memory to your next Propeller project with ease!

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

Franklin
03-29-2010, 04:49 AM
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

Vaati
03-29-2010, 04:51 AM
Thanks! I'll check out the manual, and my WaM and BOE-bot texts for info on RCTIME. http://forums.parallax.com/images/smilies/smile.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
MCU Projects (http://www.mcuprojects.propmodule.com)·- 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 (http://www.gadgetgangster.com/130)·for your projects!· Includes an LED testing terminal!

SD Card Adapter (http://www.gadgetgangster.com/158)·- Add extra memory to your next Propeller project with ease!

Vaati
03-29-2010, 06:07 AM
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 (http://www.mcuprojects.propmodule.com)·- 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 (http://www.gadgetgangster.com/130)·for your projects!· Includes an LED testing terminal!

SD Card Adapter (http://www.gadgetgangster.com/158)·- Add extra memory to your next Propeller project with ease!

sam_sam_sam
03-29-2010, 06:33 AM
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·http://forums.parallax.com/images/smilies/idea.gif·that you may have and all of your time finding them http://forums.parallax.com/images/smilies/smile.gif

·
·
·
·
Sam

Vaati
03-29-2010, 06:45 AM
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 (http://www.mcuprojects.propmodule.com)·- 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 (http://www.gadgetgangster.com/130)·for your projects!· Includes an LED testing terminal!

SD Card Adapter (http://www.gadgetgangster.com/158)·- Add extra memory to your next Propeller project with ease!

sam_sam_sam
03-29-2010, 06:53 AM
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·http://forums.parallax.com/images/smilies/idea.gif·that you may have and all of your time finding them http://forums.parallax.com/images/smilies/smile.gif

·
·
·
·
Sam

Post Edited (sam_sam_sam) : 3/28/2010 11:58:21 PM GMT

Vaati
03-29-2010, 06:55 AM
Yeah--that's what I was planning on doing. http://forums.parallax.com/images/smilies/smile.gif

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

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
MCU Projects (http://www.mcuprojects.propmodule.com)·- 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 (http://www.gadgetgangster.com/130)·for your projects!· Includes an LED testing terminal!

SD Card Adapter (http://www.gadgetgangster.com/158)·- Add extra memory to your next Propeller project with ease!

sam_sam_sam
03-29-2010, 06:58 AM
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·http://forums.parallax.com/images/smilies/idea.gif·that you may have and all of your time finding them http://forums.parallax.com/images/smilies/smile.gif

·
·
·
·
Sam

mikediv
03-29-2010, 08:00 AM
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

erco
03-29-2010, 11:47 AM
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=

http://www.harborfreight.com/cpi/photos/98000-98099/98025.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."