Monthly Archives: March 2012

Remote controlled power sockets for home automation etc

I’ve had these remote controlled sockets lying around for a while. They can be controlled via a radio-based remote. They often use 434MHz and OOK modulation (on-off-shift keying, which basically is turning the radio signal on and off based on a digital signal). This is a very simple protocol and frequency to reverse-engineer. This one is called NEXA, but I think there are quite a few versions with different brand names using the same RF protocol.

First take a receiver module such as this one. Connect it to power and ground, place an 8 cm wire to the antenna and connect the signal to a digital signal oscilloscope. If you don’t have one, you should get one. There are some sub-100 USD ones that work very well. I use Open Logic Sniffer, which is a great tool. Below is a picture showing a sample collected data. This is not the one from my NEXA remote controlled power socket. I didn’t save that one.

Connect it to the PC and you can see digital waveforms, timing etc on the PC. Use the remote that came with the socket to send a signal and read it using the receiver-module and the logic-sniffer. Press a button, and record the waveform. Note the timings etc. Zoom in to see the details. Try to see the timings + recognize specific repeating wave-forms. If you don’t have a logic-sniffer, you can also write a program to capture the timings of the signal using a simple MSP430-program. Then you have a DSO priced at $4.30 :-) . Here is a picture of the Receiver-module.

Then use a transmitter module such as this one to send the same signal. Here’s a picture:

Use an MSP430 Launchpad or an Arduino as your microcontroller-board. Connect GND to ground, VCC to your Launchpad 3.5V and ANT to an 8 mm cable. Connect DATA to P1.0 and write a program to replicate the signal you captured using the DSO. I have one example that works with the above NEXA remote controlled socket in Inventortown on this link. You can take it from Inventortown and use it in your ‘local’ compiler if you prefer. This code is just for MSP430 Launchpad.

You can probably use the same mechanism to replicate many garage door openers also. I’ve used this code and the mentioned devices from Farnell to remote control devices in my house. The good thing about doing this is that you don’t have to worry about playing with higher voltages. The external, certified power socket takes care of all the dangerous voltages, and you just control it remotely. Very safe and nice. Source code is also below the line here.

Continue reading

LCD MSP430 Launchpad Booster pack

‘ve changed display type to SPI, and I have now received the first batch of an order for 250 displays, that I really planned to make a boosterpack with. I’m planning to order a test-batch of booster pack PCBs that look like this:

Image

an the schematic:

Image

The display looks similar to the above pictures, but is slightly smaller and I think maybe slightly better quality. It has backlight, and a 9-bit 3-line SPI interface. It’s quite small, so I’ve made another post about the possibility to make a wrist-watch kit from this display.

New version of MSP430 LCD watch?

I’ve now got the first batch of the 250 SPI B/W small LCD displays that I ordered, but I’m not quite sure what to do with them. The obvious thought is a booster pack, but since this is quite a small display I’m thinking maybe I could make a watch kit with it. I might also make some booster packs eventually.

The display data sheet is here. It is SPI-based, but it uses a 9-bit SPI interface. The first bit is decides whether it’s a write to the display memory or a config-command. As far as I understand, the USCI-chips don’t support 9 bits, while the USI ones do. I’ve made a bitbanging driver for it so far, and it works ok. I guess with an HW-driver it’ll be updating faster. I’ll see if maybe it can be tweaked onto the USCI peripheral by sending 2 bytes.

The features are:

- small (34 x 30 mm physical size. Viewing area 28×19)
- 3-line SPI 9-bit (Driver Sitronix ST7579-G2)
- low power
- backlight
- black and white LCD
- approx 3 USD cost

I made a watch with the earlier LCD display (i2c-version) I was using. Here’s a picture. The SPI-display is slightly smaller, but the display quality is similar (slightly better on the SPI display). I will have 250 of these, so if anyone is interested in this display for projects, let me know. I’m planning on making some packs that are finished soldered and can be sold in the shop, but it’s relatively easy to solder these displays onto a board for your own projects also.

Image

So I’m planning on making a watch-board for the new display. It’ll have the display soldered onto one side. The other side will have space for example for a MSP430G2452. The design will be open source. Any suggestions to peripherals and buttons? I could put an accelerometer there, for example to detect taps on the display. I guess I could also put a radio in it???

A very basic start is here (this one has places for a header in case one wants to use the display as a breakout instead). The board design is a bit strange since I’ve used it to make a single-side test board also. So the ‘breakout’-traces are on the top only.

Image

Image

Bird house with camera

The kids and I have made a bird house with a camera in it. It’ll be fun to see whether we get birds there. We’re using the DLINK  DCS-932L WIFI-Camera. It has built in Infrared LEDs that light up the dark ‘room’. They are visible as slightly red lights, so I hope the birds won’t be afraid. If you want to see the latest motion-detected picture, you can see it here. It doesn’t always capture the birds though.

Character display

I got a really nice, small character display from Farnell, and want to use it in a new project I’m building (A general temperature controller that can be used in a Sous Vide or even a hot plate for soldering surface mount components). Farnell (Element14) is a good site to get components for DIY projects from. I’ve bought lots of my supplies for the 3D printers there also. Here’s a picture of the display.

I thought I had messed it up a bit while connecting the display, as I connected GND and VCC wrong. But it still works. Though for some reason I’m not able to write to the second line. I think there’s probably a bug in my code.

I’ve also bought a B57560G104F thermistor and some other components to make up the controller, and will report back (though with the baby there isn’t so much time for projects right now). This thermistor is the same I use for my 3D printers, and is used widely by the 3D printing community. It measures temperatures up to 300 Degrees C, so it’s possible to use for soldering applications.

Code and more info below the line.

Continue reading