Automation!! My old persistant love! Part-I
Posted by Beyond
Necessity is the mother of invention..Old saying – one more proof
So, winters are approaching and I was studying out one of the greatest creations of Walter Isaacson for Jobs. Ahha, I have completed it more than half!! \m/
My room is situated at the upper corner of our house. So, its pretty isolated and best suitable for any experimentations, work and Yes, watching movies and the blue stuff too.. 😉 I know that I am a big LAZY guy, I dont get up to switch on the fan if I feel like hot from my Magical Chair at PC or If I am on bed using my laptop then there is no chance for me to get up easily and I remember in every winters I spend whole days without moving from bed…
Similar is the situation when I was reading the book, and felt cold today so thought of switching the fan off, but being lazy I didn’t. Lights and fan were on and I was thinking the way out to switch them off!!! Obviously without moving an inch!!
I decided not to switch off them and sleep as it is. But cold is something than can make you feel heavily uncomfortable and can turn your AALAS/lazyness disappear. At about 4.am. I quit, and actually have to stood up but not for turning them on, rather for making a quick and rapid solution for this on/off condition..
All time I am using my Android Mobile fone or my PC and sometimes my Laptop too. My pc has got only Fedora installed over 250gb space which is now almost full. 😦 And in my laptop, I am having original genuine windows! (woahhh! I still have to rely on windows (sometimes) for the official documents because of the misalignment and other problems associated with the people and officials via openoffice or libreoffice.
So, I decided to simply control these lights and fans using these *objects*
In my PC, my serial port is all time busy, with my Single board computers, or GPS or GSM modem etc. So I cann’t use the serial port. Rest things were USB and the parallel port. But guess what, My motherboard Intel GV41 doesn’t got a parallel or serial port 😦 . I use a PCI card for two serial ports. But yes, one thing to mention, these boards like that of Intels’ have got no connector for serial and parallel but they have got an onboard pins for those. So one just have to got the motherboard related documents from the official site.
Looking at the pinouts, one can easily deduce out the required data pins. I simply wired the pins to a relay board (our own product)of ours at ATRIM, and did a little tweaking in the electricity board of my room and yes, the hardware part was over!!
For the software part, it is as simple as like writing “hello world program a few times” Lolzzzz.. Just access the parallel port and send the data to it. I did all the work in user space only so obviously one require super user rights to access the ports.
The programs for parallel port interfacing is adjusted for on/off for specific relays as you can see in the pics too that there are only four relays!
For actuating the lights/fans, i prefer them to add in /sbin fs, because they need root permissions to run and I dont want to export their path in startup scripts.
Following is the video for it. I hope me and my bro working on laptop most of the time dont fight with electric fan to switch on and off repeat and rinse! 😉
About Beyondan electronics hobbyst, 8 bit microcontroller(8051/AVR/Arduino) programmer, Linux lover, in love with Embedded Linux systems ... TGL: just push it "BEYOND THE LIMITS"..
Posted on November 1, 2012, in 8-Bit Embedded World, Linux, Projects and tagged android app, automation, embedded, home automation, intel dg41, lazyness, motherboard, parallel por, serialport, ssh, wifi. Bookmark the permalink. 3 Comments.