Showing posts with label seeed studio. Show all posts
Showing posts with label seeed studio. Show all posts

December 1, 2012

EL Shield Project - Idea And Code

This is the idea of the project as an image ... everything is available from Seeed Studio:

The EL Wires are very easily connected to the EL Shield. The same with the EL Inverter which converts 5V DC to 110V AC for the EL Wires.Only the PIRs need some soldering for this project. I've also added three LEDs to show the PIR and running status.


The two PIRs detect
  • the direction in which the object moves (from left->right or right->left)
  • and the speed



When the left PIR detects something before the right PIR detects it, then the object is moving from left to right. The time (in milliseconds) between these recognition points is the object moving speed. Depending on this speed (milliSecondsPerMeter) the start time of light 1 can be calculated and also the end time of light 4, and the time for light 2 and 3.

The Code

I've extended the PIR example code on arduino.cc to handle two PIRs and the running session. The code for the EL Shield is as simple as the Arduino Blink example, you only have to set the pinMode and use digitalWrite to turn the EL Wire on or off.

In idle mode all four lights are turned on. In the running session all light are turned off and the first light starts, then turns off and the second turns on, and so one. At the end all lights are turned on again. To get into the running session both PIRs have to recognized the moving object.

I've uploaded the implementation on github : el_shield.ino

... and this is the first result:

This is a nice project, which Seeed Studio made available with the EL Shield give away. The code needs some adjustment, e.g. on the left side there's a tree (don't worry I will not chop it off) and the object recognition is later than on the right side.

PS: more images and videos of this project are here available.

About the Project

My idea is to use two PIR (Passive Infrared Sensor) Sensors, a EL Shield and four EL Wires. I'll put a PIR on the left and right side of the garden. If someone walks by, the nearest sensor will recognize this and the first EL Wire (next to the person) will start lightning. As the person moves on the second sensor will recognize this and therefore the lighting objects can follow the person.

Started Crystal Lab Blog

This blog is about electronic, crystal lightning, Arduino and more. So, if you're looking for some Breaking Bad stuff, you're wrong :) ... but maybe I'll write something about Crystal Castles.

I've started this blog, cause I want to write down the doing about the EL Shield project. I've got this EL Shield from Seeed Studio, which was a November give-away: