Archive

Posts Tagged ‘AM comms’

Ambient Light and Arduino boxed up and ready to rumble

November 12th, 2009 Ed 2 comments

One bitsbox order and a trip to buy some deodorant later, and my arduino is boxed up, and ambient light has a stand!

The cap off an addidas deoderant can makes a nice enough base for the orb from a B&Q disco lamp (no link as can’t find it online).  I soldered the ends of some CAT5 to the BlinkM, and left the other ends loose to be shoved into the arduino.

As I’ve got an arduino and ethernet shield, I went for the second largest ABS box and even then, I had to break off the screw connectors on one side so that the plugs could stick through the outside.  I soldered the AM receiver and transmitter onto a small piece of stripboard (also from bitsbox), added a couple of wires for aerials (with a knot in each to prevent someone pulling it out the circuit).  So that’s pretty much the finished product, what a shame!  I will add a thermometer to it so it can become a thermostat in another room – eventually this’ll go in the sitting room, so will have the current cost meter producing one temperature reading from the kitchen, this one in the sitting room, and have just ordered another arduino for my bedroom’s ambient light/thermometer/development board.

The java code has been working nicely, turning the heating on and off via the hacked home-easy plug!  I sent a text from my phone to turn the heating on, very proud of actually finding a use for it as I was stuck in traffic but had friends coming round so the heating would have cut out at 5.30 (it heats up til 5.30, then waits for movement) – only to find there was a street power cut that has lasted 3 days (intermittently)!  So, if the power holds up a little longer, I should get a tweet tomorrow telling me how long the central heating was on for, fingers crossed!

So, time to write the web interface, pretty dull :(

Home Easy Interrupts everything!

November 7th, 2009 Ed No comments

Ok, so all the parts of the arduino code work fine – just not all at the same time! The setup is as follows:

An interrupt procedure gets the home easy (HE) signal, and sends it to a callback function.  This converts the sender/recipient/state into strings, and then publishes the data to MQTT.  Problem with this is it takes time, and may be interrupted by the next HE signal.  This problem is exaggerated by the HE motion detectors, which send about 15 on/off messages one after the other.   When this happens, MQTT is interrupted and it leaves the arduino in a very strange state – loop() is paused, and nothing happens until it receives another HE signal, which kicks the arduino back into action – but by that time, any signals like “turn off the central heating” will be lost, so my energy efficient house becomes boiling hot!

So, after lots of hitting my head against a wall, my solution is to add the data to a global “string”, and then in the loop() method, to read this string, split it up into the MQ topic and the data to send to it, and then send it.  I have found the WString library crashes the arduino, so it’s all done by manipulating individual characters in the array.  Really missing the simplicity of Java!

And there are more problems…

Read more…

Arduino Central Heating Control (Home Easy Hack)

November 1st, 2009 Ed No comments

Firstly, I have no qualifications in electronics, I do not totally understand all the different types of central heating programmers, so I accept no responsibility for you screwing up your system. As I don’t have proper central heating cable, I the colour coding is way off – there are no earth wires, despite the pictures showing earth-coloured wires. This is safe – neither the central heating programmer nor the home easy device need earths, so I use the earth wires as control lines.

However, with that over… I’m on a quest to automate my home with arduinos, and central heating is something that “needs” automating. Yes, I could buy a Home Easy central heating controller for £75, but I already have three plugs and in all honesty, nothing to do with them (yet). After reading an article at instructables, I decided to do something similar but hopefully a lot easier. The final result I aimed for was to have my usual central heating/hot water programmer running as usual, but have the home easy plug sitting between it and the pump/boiler so I could make it act like a thermostat. Then, by leaving the central heating on 24×7 on the programmer, I can take full control over it via arduinos and an AM transmitter. Naturally you could use any home easy remote to control the heating as well, but that’s not very exciting! As I’m prone to playing, I also want to be able to bypass the home easy device and let the programmer work as usual – just in case the code/hardware fails!

Read more…

AM Transmitters Arrived

October 28th, 2009 Ed 5 comments

Farnell delivered two packages, ordered at 4PM, the next day via UPS – very impressive, must have costed more than the £8 it cost me (free P&P).

So, with the help of the arduino playground and homeeasyhacking, my arduino could receive and transmit home easy messages.

Prototype

The photo shows my prototype of all parts of the project (ambient light – bit of paper coiled up, will be improved soon – and home easy controller).

Wire the data line of the receiver (any of the two work on my receiver) to pin 8, and the data line of the transmitter to pin 6, and connect power/ground/aerials accordingly (I haven’t used an aerial for the receiver yet). A 23cm piece of wire works well as an aerial. All my cables are strands from CAT5 – I’m a cheap-skate!

To use the following code, first download the HomeEasy package from homeeasyhacking, add the .h and .cpp file (Sketch > Add File), then copy and paste the following code. Upload it, then start the serial monitor.

Press a button on a home easy remote and you should see the sender code – copy this, and replace “2427994″ in the code below with yours. Then restart the program, and whatever you programmed the first button on the first slider of the remote should turn off and on. Make sure, unlike me, you haven’t plugged your computer into that device – I eventually got the code working only to kill my computer’s power, oops!

To control another device, change the setHEDevice(0) line.
Read more…