Showing posts with label arduino. Show all posts
Showing posts with label arduino. Show all posts

Tuesday, July 31, 2012

Raspberry PI Arduino Shield - Cheap Option

I have a project on the go which I call Project Doorman aka Carlton. It will involve a Raspberry PI, I2C connections controlling a 1-Wire controller which will be connected to a DS2408 switch. I will use an iButton ID keyfob and sensor i got from http://www.homechip.com a few years ago. So, keybob, open the door and Bob's your auntie.

I wanted to have as much of the electronics mounted on the RPI. I have a Slice of PI by ciseco.co.uk but the prototyping space is too small.

I was also looking at the Adafruit Prototyping Pi Plate Kit for Raspberry Pi but that would cost €20 landed. I was going use it, so all the fancy connectors etc., would end up not being used. Feck that, I said. I know the bits would be used on other projects. A penny saved is a penny to squander.

I read about a fella who was talking about using an Arduino Prototyping Shield on the RPI. That sparked an idea.

In my previous researching/playing with Arduinos, I got Budget Proto Shield (x3) from Oomlaut.com. I had one I hadn't used.

So I desoldered the headers, and soldered one on the other way.

Presto Chango, I had a Cheapo Raspberry PI Prototyping Shield/Plate


Here is the Protoshield attached.

it only uses a single line header, which provides access to the I2C pins (3 & 5). I also get 3.3V on pin 1. I will also need access to the 5V pin (2) and Ground pin (6). I probably will put a small header piece to accomodate this and solder some pieces of wire and connect it to the Shield. I don't care really, whatever works.

It is a nice size and definately has the real estate I need.

From the side. I used the space to have it fit on top of the other bits of hardware, in this case, the composite video connector. Everything has to be nice, after all.


Kist the header from different angles.



Here we have the major components that will be used for this project. The red guy is a Logic Level Converter I got from CoolComponents.co.uk. Very cheap and useful. It ensures that I only have 3.3V connecting to the RPI.

The next girl is the Dallas DS2482-800 the I2C 8 Channel 1-Wire Master Controller. I used the Tirna SMT SMD DIL adaptor SOIC 16 PIN NARROW  to mount the DS2482-800. Very Handy and fairly cheap.

The final good buddy is a Dallas  DS2408 a 8 Channel 1-Wire Adressable Switch. Very handy. Again I used the Tirna adapter.

That is about it. I will probably reorganise the layout to facilitate adding extra components. I might add a couple of light sensors, while I am at it.

So, what are the benefits? Cheap and Useful. I don't really need a prototyping board. It is going strainght into production.

Thursday, July 5, 2012

Raspberry PI Stuff and Building a Case

My Raspberry PI arrived a few weeks ago.

I tried both the Debian and Arch Linux boot images.

I don't have a convenient HDMI TV to play with, so I settled on the Arch version.

It suites me better, as I really wanted to use it as another Plug Computer, to do something with.

What to do with it? I am not sure yet. There will probably be something Home Automation related.

I am a big fan of the 1-Wire technology, for temperature sensors and control, so I compiled the latest version of OWFS on it. It worked fine with the USB 1-Wire controller.

The RPi has an I2C interface, so I decided to get my hands on a couple of  DS2482-100s and DS2482-800s. These are I2C to 1-Wire controllers. After a bit of messing about, I was able to address the conrolllers using OWFS.

That will be a furure post, hopefully.

I was looking for a suitable plastic case fir the new toy. There are quite a few about and rather pricy for what they are. I liked the one on SKPANG. Including postage and VAT, it would come in at about €20.  As my friend Ber would say 'Balzac' to that.

I came accross a post by Pecker Dunne on raspberrypi.org http://www.raspberrypi.org/phpBB3/viewtopic.php?f=40&t=9165&e=0

I was able to get a small sheet of perspex. Using youtube, I was able to determine that the 'score and snap' method was the best and cleanest way to get the pieces I wanted.

I made a few attempts. Two sheets of perspex and some No4 screws and nuts. I got some plastic washers to hold the board. It was just the job.






Attempt 2. In the presious version, I had put the screws too close to the IO header.



I also decided to make a breadboard version of it, to add breadboards and a USB hub.

I found that 3 screws would hold the RPi quite tightly and was easier to position the top piece.




Add a 10 port powered USB Hub


Some Breadboards
 

A Nanode and Xino Basic Arduinos for completeness.


I plan to use the slim breadboard for connections from the RPi headers and the larger one for the various components.

I sized the main plate, based on a plastic box with cover I have. Everything fits in and can be safely stored between project activity.

The next investigation will involve the Ciseco Slice of PI and the XRF radio module.





Wednesday, July 21, 2010

Homeasy Remote PC Control - Linux & 1-Wire

As discussed previously, I am a big fan of the Homeeasy range of products.

I have quite a few in use around the house. 16 in total.

My first adventure in home automation involved some X10 devices. These were OK but were slow to respond and overall unreliable.

I had appliance and lighting modules, some bayonet modules, pir and remote controls. Also some wireless transceivers and a controller. Now all unused.

I then came across the Homeeasy range of products. I think my brother Peter introduced me to them. Fairly cheap, so I got a few of them.

Came across James @ Notes from a small field, who was talking about setting up an arduino to operate like a Homeeasy remote control.

After a bit of work and revision, I was able to get a working arduino/homeeasy rig working. Here is a link to that particular project: Simple/Manual Protocol Arduino/Homeeasy

The final version also contained an Ethernet shield and operated as a web server. Various commands were sent to the web server using the URL to pass parameters, which were picked up by the arduino. Very good actually. It has been running for almost a year now. No crashes.

So, it worked fairly well. It is about 80% effective. It was mainly used in the kitchen and there were some dead spots that were only about 10% effective. Don't know why. Swapped modules, etc., still dead spots. This would have been OK for me but not acceptable for SWMBO and the other house inhabitants.

As hinted above, this set-up only accounted for the transmission of the Homeeasy Simple Protocol. This is not compatible with all the Homeeasy range of products. They also use an Advanced Protocol for some of their devices, such as sockets and wall switches.

I wanted to use some of these switches and sockets, so I had to get a method to remotely control them.

Around that time, there was a lot of activity in the adruino homeeasy controller area.

There were a number of options available for Homeeasy Advanced Protocol programming on the arduino.

I tried many of them but found less then 100% reliability. Again some dead zones or sometimes it would work and sometimes it wouldn't. Definitely not acceptable.

During this journey, I noticed that the hand held remote was very reliable. I presume it was something to do with my implementation. Personally, I think there is an aerial issue. I don't know anything about that, so I parked this project and moved to another approach.

I read about using the actual Homeeasy hand held remote wired up to an arduino on Instructables and something similar in the Practical Arduino book.

Easy enough. I put it together and it worked perfectly. 100%

So, then I thought, the arduino is all very good, but all I am doing is using the arduino as a smart relay controller.

I have been using the Dallas 1-Wire devices for a number of years to read temperature and other weather readings. I also use a 1-Wire relay to control my boiler.

Using a schedule stored in a database, the boiler goes on and off as required. This is the subject of another post, I think.

I decided to use 1-Wire switches to control the hand held remote.

I got myself a breadboard some wires and a couple of DS2408 chips and my trusty USB 1-Wire controller.



Again following the wiring layout on Instructables - Arduino Home automation, got it all up and running in no time.

There are 4 on and 4 off buttons and the DS2408 has 8 switches.

To utilise the 4 zones, I needed another 4 switches. I used the other DS2408 for this.



The 1-Wire system is controlled from a Linux box on the network. I wrote a PHP script that presented me with various devices and On/Off buttons to control them.

I used OWFS (One Wire File System) suite of programs to talk directly with the 1-Wire switches.

Happy days.