Sonar controlling my touchscreen

In this forum you can share tips and tricks on how to use Cinemar products with some program or a task that you want it to do. So no one has to reinvent the wheel if you already did! (No questions in this forum only solutions, questions will be deleted without hesitation.)

User avatar
Evja
New Member
New Member
Posts: 30
Joined: Fri Apr 10, 2009 6:52 am
Location: Netherlands
Contact:

Sonar controlling my touchscreen

Postby Evja » Wed Apr 29, 2009 5:46 am

Hi all, just thought I´d share this in the tips+tricks section.

I have a 15" Planar touchscreen built into a wall for my HA system, and this really is great wow-factor for friends/family etc.

I decided to take it to the next level by having the screen magically appear and dissapear using Sonar.

I installed a Maxbotic sensor into the frame just below the touchscreen that does `ranging` of an object in front of it. This is hooked to an analog input on a IO board.

I now have this working in such a way that if you approach the screen closer than 2 feet, the ML interface will show, and once you walk away from it, my windows screensaver (fishtank) re-appears. After about 5 mins of fishtank, the monitor switches to low power state off. As soon as you are in range, it reappears on the ML interface.

My screen is facing a door, so if you open the hallway door once you come in, it will also show the ML screen.

The sonar bundle is also focussed enough to avoid the kids from trigerring it when they are running around :D

Cheers,

Evja

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Postby mcascio » Wed Apr 29, 2009 9:04 am

Cool stuff Evja.

Great to see the creative ideas flowing!
Mario Cascio
Cinemar, Inc.
http://www.cinemaronline.com

mnkynifefite
Intermediate
Intermediate
Posts: 372
Joined: Mon Sep 15, 2003 2:45 pm
Contact:

Postby mnkynifefite » Wed Apr 29, 2009 2:21 pm

I've toyed with a similar idea. What IO board are you using? How are you interfacing it with ML?

User avatar
Evja
New Member
New Member
Posts: 30
Joined: Fri Apr 10, 2009 6:52 am
Location: Netherlands
Contact:

Postby Evja » Fri May 01, 2009 6:57 am

I am using a Velleman K8055 IO board, that is hooked up over USB and is controlled by homeseer.

In theory you should be able to use any IO board that is able to read a voltage between 0-5V. I suppose you could do this directly from ML as well, and let ML server automation rules watch the value and trigger command maps.

The Sonar is a Maxbotix EZ1 as that was cheap and available. They currently do a wider range with different detection beam sizes. I find the EZ1 works well for this application. The output from the sensor is just an analog voltage, the higher the voltage the higher the distance.

I only have the sonar active (powered) when my motion or door sensors have set the room status to occupied to avoid it running all the time.

Let me know if you want more details.

Cheers,

Evja

User avatar
Evja
New Member
New Member
Posts: 30
Joined: Fri Apr 10, 2009 6:52 am
Location: Netherlands
Contact:

Postby Evja » Fri May 01, 2009 7:07 am

PS. You can also read this sensor over RS232 serial or using PWM if you have that ability.

Some bedtime reading here over on Cocoontech on this sensor as well.
http://www.cocoontech.com/forums/index. ... topic=4419

mnkynifefite
Intermediate
Intermediate
Posts: 372
Joined: Mon Sep 15, 2003 2:45 pm
Contact:

Postby mnkynifefite » Fri May 01, 2009 9:35 am

Excellent...thanks for the info.

Last question. So how are you polling the output? Did you create a custom script? Willing to share?

User avatar
Krumpy
Developer
Developer
Posts: 1228
Joined: Thu Sep 04, 2003 10:17 pm
Location: Minneapolis, Mn
Contact:

Postby Krumpy » Sun May 03, 2009 8:25 am

Great idea, but wouldn't a motion detector be less costly?

User avatar
Evja
New Member
New Member
Posts: 30
Joined: Fri Apr 10, 2009 6:52 am
Location: Netherlands
Contact:

Postby Evja » Mon May 04, 2009 3:17 am

I am not polling the IO board directly using a script.

I am using the HS plugin from Malarcy for the Velleman K8055 board, which works fine. The plugin is polling the board every 300 ms, although you can change this setting.

Cheers,

Evja

User avatar
Evja
New Member
New Member
Posts: 30
Joined: Fri Apr 10, 2009 6:52 am
Location: Netherlands
Contact:

Postby Evja » Mon May 04, 2009 3:25 am

Hi Krumpy,

The motion detector does not provide you with exact enough control for this purpose.

Just on if you are around in the area, and off if you are not. You are also depending on the time taken before an off command if sent by the sensor.

I guess you could use this just to have the screen switch on or off based on presence in the room.

The sonar device is sensitive/linear enough to set `trigger distance`. In my case the screen does not switch on if you just walk past from the kitchen to the livingroom. But when you approach within 2 feet of it, it will switch on. I am not sure how you could achieve this with a motion sensor.

Last but not least, cost is not really a difference since I already had the IO board in use for other things. Only cost was the sonar unit which was less than $30. The cost of a motion sensor here in europe is more than that :cry:

Cheers,

Evja


Return to “Tips, Tricks and Tutorials”

Who is online

Users browsing this forum: No registered users and 1 guest