hazardus wrote: ↑
Wed Mar 13, 2019 10:22 am
I have few electric equipment. I would like to log when these equipment are turned on and turned off.
How would you do this? I can handle the code but I don't have any idea what to use to connect the Raspberry Pi to.
I need some kind of sensor to connect it to the on/off switch. I could use a relay but how would I convert the high voltage to
logic level? Any idea how could I achieve this?
By high voltage I assume you mean normal mains supply at 120/240/425 VAC? If your talking say 10/33kV then thats a whole separate discussion.
A couple of ideas;
- Use a clamp style Hall Effect current sensing transformer/sensor to sense when there is current flowing into the equipment. This will need an amplifier, signal conditioner, but there are many all in one modules available. Be sure its an isolated transformer, not a resistive shunt. A shunt will work, but it will need other opto isolation as well. I generally do not recommend shunts for mains voltages. Both would require an AD analogue input to the RPI. I have seen hall effect devices with I2C interfaces. Again an GPIO pin configured for I2C.
There are many cheap plug into the wall power meters, some with BlueTooth or USB outputs. Used a lot in home automation. This would tell you when current is flowing. USB is natove to the RPI, Bluetooth on some models, or use a cheap USB BT dongle.
Likewise there are all sorts of home automation wall plugs for controlling lamps and appliances, a lot have current sensing built in as well. Use it as a current sensor not as a switch. They interface via Zwave, X10 or similiar protocols. which there are interfaces for the RPI off the shelf
Use a photocell/photo diode glued to the equipments power on light to sense when its on, interface via a simple GPIO pin
Use a small magnetic coil to pickup stray EMF when the equipment is on, assuming the device radiates usable EMF. Would require additional amplification, and level sensing circuitry, then into a standard GPIO pin
..the only thing worse than a stupid question is a question not asked.