Get the highlights in your inbox every week.
TouchBoard sensor hacks
Rig a smarthome and more hacks with TouchBoard
There was a time when a reporter was called a hack. This term referred to their ability to hack away on a typewriter to create a story on a short deadline. Somewhere in the 1950’s MIT’s Railroad Club adopted the term when they saw a cool use of technology. Railroads help to build the world and spread commerce across the globe. This was a proud term, a name for an action that you could be pleased to have been associated with. Then, somewhere that hack name because used for criminal internet activity.
Today, a hacker might be considered someone to be put in jail.
Security vendors use slogans like "Stop Hackers in their Tracks" and "Fight Hackers Where They Attack." Okay, maybe these are termite pest control slogans, but the meaning is the same: hackers are typically bad people, according to the press. The problem is that hackers aren’t bad people. Bad people are bad people. There is a huge difference between a hacker and a criminal. Some hacks actually save lives.
Here is a nice hack for you: There is a microcontroller board called the TouchBoard made by Bare Conductive. I bought two of them when Radio Shack starting selling off their inventory. Each board cost me $10. Basically, it's is a sensor controller that is Arduino-compatible. The device has twelve touch sensors that connect to a processor, and the operating system is stored on a microSD card.
Smarthome with sensors
You can power it up, attach head phones or speakers, and with just one touch of the sensors, a song can be played from the storage card. You can change out the songs just by renaming and copying your songs over the ones on the tiny media card. If you press one sensor you get some jazz music. You touch another and you get some Frank Sinatra. A third sensor plays a symphony.
You get the idea. Twelve sensors, twelve outputs. But with this board, there are two other output modes on the circuits.
So, how can we hack this?
Let’s say you live in a home where you’ve installed this $10 TouchBoard to act as a sensor controller. When you step into your home an infrared (IR) detector senses your presence and activates the first touch sensor. This sensor is wired to your air conditioning unit. It is preset to turn onto 22 degrees Celsius when activated. Walking in the front door activates this first environmental device. The second sensor is already activated because it is wired to a light sensor outside your house. It just detects whether it is light or dark outside. Since you work long hours, you often come home late to a dark house. Since this sensor is already activated, when you walk in the front door, that switch is tripped and lights turn on to illuminate your hallway.
So, we have two sensors working now. Let’s look at the third sensor on the twelve sensor device.
This third sensor is wired to your media player. You like to come home to some music. When you enter your front door the third sensor is activated and your media player is already programmed to play some nice heavy metal or Danish folk songs, your choice. Right there we’ve turned a $10 MP3 player into a home automation platform or a "smarthome" as some would call it.
Red-light runners detected for safety
Now, let’s take this same hack to another level. That’s what hackers do, we try new things with existing technology.
Around where I live, we have a problem with cars running red lights. To stop this reckless problem. I could install the same $10 TouchBoard in the traffic light management system located near the sidewalk. Next, I would set up an inexpensive IR beam by the traffic light to shine down at an angle onto the pavement below. A beam like this would cost around $3 at Radio Shack. Next to the beam, I would install a Passive Infrared Detector (PID) which is also inexpensive, at around $11 at Radio Shack.
The IR beam would hit the pavement and be reflected back to the PID. IR is great at detecting heat and motion, like an on/off switch but with precision. Next, I would set up a small algorithm that can determine the speed of an approaching vehicle. When a vehicle enters the beam field, as the traffic light begins to turn from green to yellow, a calculation is made to determine the speed of that approaching traffic. We would then be able to figure out whether that incoming car is able to stop in time to meet the coming red light.
If that vehicle is moving too fast to brake for the red light, it’s simple human nature that the driver will run the red light. We have the statistics to back those numbers up. So, with this sensor set-up, when speeding traffic is sensed, and it is determined that the car will not be able to safely stop at that red light, then the first TouchBoard sensor is activated. This activation tells the traffic control box to turn all traffic lights red and keep them all red for three to four seconds. We don’t want any other traffic to move into the intersection so all lights remain red.
As the red-light runner enters the middle of the intersection there is another IR and PID sensor attached to a camera that takes a lovely picture of the license plate. That picture is then sent via email to the local traffic enforcement agency who will send that driver a letter along with a fine. That is the second sensor on the TouchBoard being activated.
On the far end of the intersection there could also be a third set of IR and PID sensors. These determine that the offending vehicle has left the danger area of the intersection. This would trip my third TouchBoard sensor to play jazz music and tells the traffic management system to reset the system and return to normal operations.
There you have it. With a simple $10 TouchBoard, you can play some music, automate your house, and keep people more safe.
A collection of articles on the current state and future of open hardware.