Mona Lisa Update
by admin on Mar.16, 2010, under DIY
We were recently able to get some work done figuring out the Zilog ePIR sensor and learning more about the hardware and software challenges of the Mona Lisa following eye EL project.

In our a breadboard setup, all we needed was our Arduino Barebones Board , the Zilog sensor and a necessary resistor. As far as wiring goes, this was a pretty basic build.
There are two ways to interact with the sensor. The Hardware Interface Mode gives a very direct connection to the sensors and doesn’t use the single board computer (SBC) to do any special analysis. All tuning parameters are set by input voltages.
The Serial Interface Mode requires a serial connection to the SBC that uses onboard softare to analyize the signals from the sensor and give us extended features like the special direction mode that first sparked our interest.
Since we needed the onboard serial connection from the Arduino board for power and debug output, we used the Software Serial library to communicate with the sensor. We just needed two digital pins from the sensor to the Arduino for the software serial setup.
Once we got connected, we read more about the command protocol and found that there is a startup delay on the sensor before you can send and receive serial commands. Although We haven’t gotten it down to a science yet, it’s about 30-40 seconds. If you try to send serial commands before the system is properly warmed up, you just get garbage.
The motion detection protocol was our primary concern. We were under the impression that the sensor would return the direction of the object when queried but it actually only returns a Yes or No motion response. The unit can be set to detect motion in either the + or – directions. If + represents left on my unit, only left-moving objects produce a Yes motion response when in + mode. The opposite is true for – mode. Only right-moving objects are detected in this mode.
As an additional quirky note, the + and – don’t always translate to the same direction for each individual sensor, but on each unit + is always + and – is always -.
The + – direction motion detection seems a bit less reliable than the normal mode. There are settings that can be tweaked like sensitivity, frequency response range, and extended mode, which may have something to do with the unreliable responses in this mode. There is also an ambient light gate that needs to be set using a photocell. We initially opted out of this feature for simplicity but as we fine-tune the project, we may need this to give more reliable results.
At this point, we think that the one direction setting isn’t going to work well with just one sensor. There may be some software tricks we can use to switch between left and right but since we have two sensors, we have devised a pretty crafty way to use both to track exactly where the person is moving.
Motion interference is another challenge that may be the downfall of this project but we’re still tinkering with the settings to find the right mixes and this may be less of a problem down the road once we get our two sensor setup going.