0
$\begingroup$

I’m looking for a way to discern whether a DAB radio plugged into a non-smart electrical outlet is switched on or off. Note that the radio is constantly plugged into a live socket, there is a power button on the device that turns it "on" and "off".

I'm not sure how much the power draw changes when the device is on as opposed to in standby but I'm not sure it would be much as it's just a low-power radio.

Is there any way for a device like a Raspberry Pi to tell whether the radio is on?

$\endgroup$
6
  • 1
    $\begingroup$ It's not clear what you are trying to do. Do you have access to the inside of the radio? Can you attach something to the outside of the radio? Please tell us more about exactly how you plan to use the RPi in this case. $\endgroup$ Jan 6, 2022 at 16:29
  • $\begingroup$ I have access to the inside but only want a solution that doesn't require this. Everything should be external to the radio. I can attach something to the outside. All I want is for the Pi to trigger a command when I turn the radio on and another command when I turn the radio off. $\endgroup$ Jan 7, 2022 at 11:45
  • $\begingroup$ Use a mi and test for sound output. $\endgroup$
    – Solar Mike
    Feb 6, 2022 at 12:26
  • $\begingroup$ @SolarMike assuming you mean mic, that would pick up any other noise in the same room $\endgroup$ Feb 7, 2022 at 13:19
  • 1
    $\begingroup$ Then consider a threshold level - just an idea: you can work common sense into it. $\endgroup$
    – Solar Mike
    Feb 7, 2022 at 13:30

2 Answers 2

1
$\begingroup$

I had a similar requirement wanting to know when my oil-filled electric heater was switched on so I could remember to turn it off before going to bed. The heater doesn't have a nice red LED to show that its working, nor a simple on/off switch. Going back to basics I thought that I could sense the current flowing through the mains cable. If you are happy working with mains electric and take adequate safety precautions you can intercept the mains lead into an enclosure and separate the two insulated conductor wires. Then you could detect the magnetic field generated by the current passing through one wire. You do not have to expose the copper conductor just make sure that the two insulated wires are apart from each other enough so the magnetic fields generated by the alternating current don't cancel each other out. The magnetic field can be detected by a coil wound round one of the conducting wires. A voltage will be induced in the coil which can be detected by the ADC (analog to digital converter) on the pi. Because of the electronic on/off switching there may be a detectable magnetic field even when the radio itself is not switched on but I would expect you would be able to detect a significant change when the radio is working. This idea is just a sketch which I am currently working on but if its appealing then its a direction you could go in. You could also use a Hall Effect device. Wiser members may expand on this.

$\endgroup$
1
  • $\begingroup$ I need to experiment more with this. I tried yesterday using a 24 volt AC supply and a coil of 100 turns of 0.2 mm copper wire wrapped round a ball point pen. I then placed the coil around one of the conductors of the 24 volt AC. Using my multimeter I detected a very rapid millivolt spike in the coil when I switched on the 24 volt AC which died away rapidly. I guess that there was an induced voltage in the coil. It may not be a practical solution without perhaps using an op-amp. Here is a current sense module which is a better solution. [Sparkfun] (sparkfun.com/products/14544) $\endgroup$
    – Silvosa
    Oct 1, 2023 at 11:33
0
$\begingroup$

Put a photosensor in front of the little LED that shows that the radio is on. The RPi can sense when the LED is on or off and do whatever you want.

$\endgroup$
3
  • $\begingroup$ Unfortunately my radio has no power on LED. $\endgroup$ Feb 7, 2022 at 13:19
  • 1
    $\begingroup$ I guess you need to tell us a lot more about your radio then. Provide a link to the manufacturer's specifications or user's manual; we can't read your mind. $\endgroup$ Feb 7, 2022 at 14:05
  • $\begingroup$ It's a Tangent DAB table radio. $\endgroup$ Feb 8, 2022 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.