Shop OBEX P1 Docs P2 Docs Learn Events
Monitor voltage and current — Parallax Forums

Monitor voltage and current

pcleatspcleats Posts: 11
edited 2006-07-06 21:48 in BASIC Stamp
Hello all,
·
I am not sure if someone has addressed this issue before. I have tried a search, but have not been able to find anything.
·
What I am designing is a video distribution box that is connected to a surveillance system that is connected by a 30 conductor cable. In the box is a set of batteries, that are used to power the cameras and microphones that might be connected to the box. I need a way to monitor the voltage and current that is being used by the box. This information needs to be sent back to a LCD display that will be in the van.··I will also need a way to control some additional features in the box. After the power has been sent to the box from the van I will have 2 additional wires that I can use to send and receive data. This means I will be using I2C to carry the data back to the van. Any ideas on the best way to approach this.
·
The big thing now is the ability to measure voltage and current and send it back to the surveillance system to be displayed on an LCD display.

Any help or ideas would be greatly appericated.

Thanks

Patrick

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-06-30 15:51
    I2C is primarily intended for transmission over short distances, like from one side of a printed circuit board to another, maybe from one board to another in a small cabinet, not over greater distances. I suggest using RS232 with a transmit and a receive line using the power ground as a common ground. Look at the documentation for some of Parallax's AppMods for examples of RS232 based device control. Consider some kind of simple checking of the commands to control the additional features, maybe a simple checksum or sending two copies of the command and checking that they're identical. You're basically going to have one Stamp in the van and another in the distribution box. There are examples of this kind of Stamp to Stamp communication in the Stamp manual and in the Nuts and Volts articles on the Parallax website.
  • Mike GreenMike Green Posts: 23,101
    edited 2006-06-30 15:53
    You might also check out the Process Control and Industrial Control handbooks available for free download on the Parallax website. They should have lots of examples similar to what you want to accomplish.
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2006-06-30 16:39
    There's an article on monitoring battery voltage and current using RCTIME posted at
    www.emesys.com/BS2rct.htm#B_voltage
    That might give you some ideas about the first part of your question. If you want to add an analog to digital converter, you can use that , instead of RCTIME, for the conversion.

    For the communication, RS485 is a good alternative for use on the two wires. It excels for long lines where there might be ground loops or electrical noise. At each end, you would need an RS485 driver chip, like the LT1785 or SN65HVD485E for half duplex (master-slave) communications. RS485 driver/receiver pairs are simple and cheap.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • pcleatspcleats Posts: 11
    edited 2006-07-06 19:53
    Just wanted to pass some info onto everyone. I did some searching and found this chip for monitoring current draw
    http://www.allegromicro.com/datafile/0752-050.pdf

    Its super easy to us for measuring current. They have 2 devices one is a 50amp and 1 is a 100amp
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-07-06 21:48
    How much current are you figuring for?· You won't get much resolution, their being 1:50 or 1:100, esp.·if your current is only several Amps.· If you're trying to resolve 10A, 30A, then they'll be fine (but not down to mA); but 2A, 5A won't be so good.

    See DOC's pg. 4, VOUT vs Primary Current·-- Looks like output = 2.5V at 0A and 4.5V at 50A (that's 2V/50A = 40mV/A [noparse][[/noparse]delta])

    Post Edited (PJ Allen) : 7/6/2006 9:55:28 PM GMT
Sign In or Register to comment.