Hacking the Heath/Zenith SL-5408 to run on DC

I’ve used the Zenith SL-5408 motion activated security light as a motion detector for my Bird Blaster. In version 1.0, I couldn’t get the detector to work off battery power, even though the whole circuit runs at 5V levels. Now that I’ve acquired a little more electronics equipment and knowledge, I thought I’d take another crack at powering the detector from a low voltage source.

I started this round of reverse engineering by drawing out the power supply circuit in Eagle, adding components until I had reached the point where regulated 5V was present in the circuit. At this point, I didn’t notice anything that I hadn’t noticed the last time around. It was fairly obvious where the 5V supply originated, and that the PIR and timing circuit only used the 5V supply. The schematic is shown below. The 22 pin connection shown on the right is the point where the chip on board processor (the brains of the motion detector) is soldered in at a right angle to the main circuit board.

SL-5408 Motion Detector Power Supply Circuit

I looked a little closer at the 120V section of the circuit, and noticed a 1 Mohm resistor connected to the hot side of the power input. Following that resistor yielded the following addition to the Eagle schematic:

SL-5408 Power Supply – With Clock Signal

I soon guessed that this circuit was being used to create a 5V square wave at line frequency, which was then being fed to the processor. Probing pin 9 of the processor with my oscilloscope confirmed that I was correct. The signal must be used as a real time clock signal for determining the relay ON times in response to detected motion. Without fully understanding its function, I assumed at this point that the signal was necessary for the circuit to function properly.

In order to test this theory, I connected the motion detector circuit to an arduino, injecting 5V into the circuit at the appropriate point and connecting the “clock” signal to arduino pin 10. The output of the motion detector was read in the same way as described in this post by using the relay drive transistor as an open collector output, and connected to arduino pin 4. I removed all existing power supply components from the blue hatched region of the below schematic, then wired in the arduino in their place as shown.

SL-5408 Power Supply – Arduino Based

By using the timer1 library, I was able to create the appropriate 60 Hz square wave on the clock pin. With 5V supply along with the clock signal, the detector worked perfectly. I was able to verify this by lighting the onboard LED whenever the motion detector’s output was active.

Here’s a quick example sketch for testing the motion detector:

#include <TimerOne.h>

#define OSC_PERIOD 16667 //60HZ period (microseconds)
#define OSC_DUTY 512     //50% duty cycle square wave

#define OSC_PIN 10
#define DETECT_PIN 4
#define LED_PIN 13

void setup()
{
  pinMode(OSC_PIN, OUTPUT);
  pinMode(DETECT_PIN, INPUT_PULLUP);
  pinMode(LED_PIN,OUTPUT);

  Timer1.initialize(OSC_PERIOD); //Set pin 9 and 10 period to 50 ms
  Timer1.pwm(OSC_PIN, OSC_DUTY); //Start PWM at 50% duty cycle
  Serial.begin(9600);
}

void loop()
{
  digitalWrite(LED_PIN,digitalRead(DETECT_PIN));
  Serial.println(digitalRead(DETECT_PIN));
}

I finally have a method of powering this motion detector from a small DC power source. This comes at the added expense of a microcontroller, but that opens up lots of other options for further functionality as well. I plan to take advantage of this as I work on the next iteration of the Bird Blaster :).

Advertisements