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 RS485 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. which means I will have a master slave setup.
Any help or ideas would be greatly appericated.
Thanks
Patrick
measuring voltage and current +
Measuring the voltage is relatively easy (assuming that it is DC). If the resolution of a 10-bit A/D conversion is sufficient and the voltage is less than 5 volts you can just route the voltage to one of the PortA pins. If the voltage is small or larger than 5 volts you'll have to add an amplifier or other signal conditioning to convert the voltage to be measured to something that will be close to 5 volts maximum. This will allow you to use the entire range of the A/D converter.
Measuring DC current is a bit more difficult. I suspect that it is done most often using a precision resistor to convert the current to a voltage. The trick is making the resistor large enough to give you a good range of voltage to measure (and reduce the effects of noise) while, at the same time, making the resistor small enough to avoid having a significant voltage drop across it that would affect your circuit's operation. Assuming that you can do this you can use the differential mode of the A/D converter to measure the voltage drop across the resistor. Alternately, you could employ a differential amplifier to produce a single-ended voltage and amplify it at the same time.
Measuring AC voltage and current can be done but you'll want to convert the signal to a DC equivalent. If the currents are high, you can use a current transformer to produce a voltage that is proportional to the current. I used this method on a diesel generator controller that I built.
Measuring DC current is a bit more difficult. I suspect that it is done most often using a precision resistor to convert the current to a voltage. The trick is making the resistor large enough to give you a good range of voltage to measure (and reduce the effects of noise) while, at the same time, making the resistor small enough to avoid having a significant voltage drop across it that would affect your circuit's operation. Assuming that you can do this you can use the differential mode of the A/D converter to measure the voltage drop across the resistor. Alternately, you could employ a differential amplifier to produce a single-ended voltage and amplify it at the same time.
Measuring AC voltage and current can be done but you'll want to convert the signal to a DC equivalent. If the currents are high, you can use a current transformer to produce a voltage that is proportional to the current. I used this method on a diesel generator controller that I built.
- Don Kinzer