Community driven design experiment: Wireless Relay Board

36 views
Skip to first unread message

Yuan

unread,
Nov 22, 2011, 4:55:02 PM11/22/11
to London Hackspace
Hi all,

This is a little experiment, I hope you don't mind me using the list
for it!

As some of you may already know, my company, Universal Air Ltd.
produces microcontroller and robotics/UAV products for hobbyists. You
may have met us on our odd visit to the hackspace.

We believe it's critically important for any business producing DIY
and hobby products to get involved with the DIY and hobby community
that they are serving, so what I'm interested in doing is involving
the hackspace at an early stage in our product development process so
that we can produce products and designs that are more useful, better-
tailored, and generally better suited to your projects. Of course,
your valuable involvement does not go unrewarded, we have discounts
(or freebies donated to the space!) on the final product as well as
access to prototypes. And on account for our love for the Hackspace
principle, London Hackspace members will always be able to get a
discount (from the retail price) on all our stuff!

So to start the ball rolling, I'd like to talk about the first of our
new ideas for DIY home-automation products, a PCB containing relays,
that can be controlled by any one of our microcontroller products.
Therefore mains relay switching via USB (or Wi-Fi, or Bluetooth, or
XBee, depending on which microcontroller board is used, and in the
future there will be also a GPRS/GSM option). I'd like to hear what
people think of it, in particular any thoughts or comments that would
make the product better or more suitable for you.

Ultimately, I hope this experiment is of benefit to both the Hackspace
(with discounts, donations and some prototypes), and the wider
community (with products that better enable them to do the projects
that they want).

So some current design points of the 4-relay board are:

- Four 16A SPCO relays (5V triggered, with transistor for low-current
triggering)
- Current sensors for each channel
- M3 mounting holes
- Mounting point for antenna (the Wi-Fi/Bluetooth/Xbee boards all use
the same external 2.4GHz antenna)
- Status LEDs
- approximate dimensions: 110mm * 80mm


Current unknowns are:
- Integrate an IR receiver for remote control? (useful but rarely
used?)
- Mains voltage and frequency monitoring? (complex isolation circuits
required, increases cost)
- Micro SD card slot for datalogging? (useful but rarely used?)
- Connectors for temperature probe? (useful but rarely used?)
- Use dedicated GPIO/ADC chips on some sort of serial bus for several
boards to be chained together to the same microcontroller? (very
useful, but additional cost and complexity, would it be easier just to
offer 8- and 16-relay versions?
- cost: haven't a clue at this point, too many variables

So what do people think? Does anyone have any suggestions for
modifications or additions to the idea? (We can add little bits of
circuit if there's any spare PCB space that you could populate for
your own project).

With best regards

Yuan

Monty

unread,
Nov 22, 2011, 5:33:12 PM11/22/11
to London Hackspace
Just to annoy the radio enthusiasts, what about power line
communication? :P

Jim MacArthur

unread,
Nov 22, 2011, 5:55:57 PM11/22/11
to london-h...@googlegroups.com
Do you have any specific applications in mind? I can think of a few but none use more than one relay in one place, let alone 4 or 8. I'd quite have liked (when I had a house) to be able to switch some lights on and off while I'm out, but they'd need to be in different rooms. I'd also like to be able to switch a washing machine on so it's finished just at the time I get home. Most plug-in timers don't handle large inductive loads very well. They're all things that would be good to have a lot of individual networked relays for rather than several in one place.

Jim

Robert

unread,
Nov 22, 2011, 6:27:57 PM11/22/11
to London Hackspace
Why not put an xBee socket on there. Seeed studios have bluetooth,
GPS, WIFI, and ISM radios in the xBee format, pretty universal. Use
the LPC1343 with your uafunc.h file like you do with forebrain and
you've got some seriously powerful processor with real world outputs.

As for mains monitoring I think microchip do a line of chips that are
suited to this like the MCP3909 http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en520376

Slightly off topic but I'd love to see a FAT library/tutorial for the
forebrain + EEPROM USB memory stick. Also a USB CDC implementation for
it.

Hope that helps,
Robert

Yuan

unread,
Nov 22, 2011, 7:08:23 PM11/22/11
to London Hackspace
Very true, and therein lies the problem - relays and other power
control devices are a lot cheaper than the networking device that
would control them.

I had a general purpose board in mind, so not just home automation,
but also various uses as a computer-controlled (or Android controlled)
relay boards. But you're right, single-appliance home automation is
only one of several applications that I'd like to cover, but I also
have to find the highest common factor between the most likely usage
purposes, while balancing cost and accessibility to hobbyists.
Because relays are so cheap, I'd rather have more relays and only
increase the cost and size marginally, than to rule out some other
applications.

For example, one type of home automation application is to
automatically switch off devices that are in standby; e.g. a large
home entertainment centre may have many boxes and stereo equipment in
addition to a TV, all of which draw current on standby. Current
sensors on individual relays allow the board to shut off devices that
are in standby (user-configurable thresholds of course), and an
integrated IR receiver can be used to turn the relevant devices back
on from the user's remote.

But I think you've implicitly made a very good point - to that end,
I'm working on trying to solve that cost problem, and I have some
designs for a low-cost and small networkable relay. We've hired some
new people who I hope can contribute to this product line (I'm going
to pinch some people off the UAV and robotics projects when this gets
going). This is just the first step in that direction, I hope to
build up some expertise working with home automation systems.

As for powerline communications, I can see the radio enthusiasts
gathering their forces against us already. But they can relax, we're
looking at good old 2.4GHz (for now). Although I did look into
powerline networking just now, and I think we could design an
affordable product; for example Maxim produce a couple of ICs that are
compatible with Homeplug(TM) 1.0 devices, we'll revisit that idea at a
later date.

Yuan

Yuan

unread,
Nov 22, 2011, 7:28:13 PM11/22/11
to London Hackspace
Robert

Yes, you are thinking on exactly the same lines that I was. The relay
board is actually going to use a Forebrain board as the main
controller, the reasons for this is so you can swap out Forebrain for
one of it's wireless cousins - Hivebrain (Xbee), Mandible (Bluetooth
SPP) or WeirdEye (WiFi). To prove I'm not kidding:
http://www.universalair.co.uk/sites/default/files/blog/news/2011-10-01/2011-09-13-02.56.16.jpg
Pictured are prototypes for Hivebrain and WeirdEye.

Oh yes, I was half-way through trying to port a FAT library over to
Forebrain, as well as develop our own USB stack, and then got
sidetracked dealing with all the other UAV stuff, with these delayed
shipments, slow customs controls, parts going missing, and the flood
in Thailand also affecting supply of some parts.

You can use Keil's USB-CDC example that comes with the LPC1343 sample
code bundle with Forebrain, we can't modify or distribute the source
for that due to licensing (I would very much have liked to alter the
source and include it as part of the Forebrain function set). The
link for that is here: http://ics.nxp.com/support/documents/microcontrollers/?scope=LPC1343
or you might have to download LPCXpresso to get it.

You can also use Microbuilder's codebase as well since they also do
some great work with the LPC chips, they have USB-CDC in their library
as well (if I recall correctly they also use Keil's code, don't know
what they've done with the licensing). Somewhere on:
http://www.microbuilder.eu/home.aspx

Hopefully once all the UAV stuff clears up, we can focus more on
getting more tutorials and examples.

Yuan

On Nov 22, 11:27 pm, Robert <pins...@gmail.com> wrote:
> Why not put an xBee socket on there. Seeed studios have bluetooth,
> GPS, WIFI, and ISM radios in the xBee format, pretty universal. Use
> the LPC1343 with your uafunc.h file like you do with forebrain and
> you've got some seriously powerful processor with real world outputs.
>
> As for mains monitoring I think microchip do a line of chips that are

> suited to this like the MCP3909http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en520376

SheraDreaming

unread,
Nov 22, 2011, 9:31:36 PM11/22/11
to London Hackspace
What Jim said.

I imagine there are problems with this, but anything that can turn on
a washing machine, dishwasher, house lights, coffee machine, Roomba
upon receiving a command from a distant iphone/Android app would sell
like crazy.

In addition to being very useful.

I love the hackspace...

Ken Boak

unread,
Nov 23, 2011, 2:24:08 AM11/23/11
to london-h...@googlegroups.com
Yuan

I have a little low power wireless board available - based on, and compatible with JeeNodes and Arduino

ATmega328 processor 16MHz
RFM12B wireless tranceiver  (up to 115k baud) in 433MHz,868MHz
micro SD socket for datalogging *
Real time clock with super capacitor backup *
4 high current outputs for relays,  2 dc motors (full H-bridge) or 1 stepper *
6 analogue inputs
3V3 operation
Available with plastic case or bare board *
Communicates with other wirless enabled nodes and to web connected gateway

Priced from £17.50 depending on choice of options (*). Samples available from next week Dec 1st

Why bother with overpriced Wifi, Xbee or bluetooth when these are clearly overkill for most home automation applications?

Matte

unread,
Nov 23, 2011, 3:32:48 AM11/23/11
to london-h...@googlegroups.com
ooh, where can I buy your boards from?

Tim Storey

unread,
Nov 23, 2011, 4:15:17 AM11/23/11
to london-h...@googlegroups.com
Ken,

can I order one please...

\t

Ken Boak

unread,
Nov 23, 2011, 5:16:57 AM11/23/11
to london-h...@googlegroups.com
Hi Tim

More details on my blog about WiNode

http://sustburbia.blogspot.com/

You may order direct from me via Paypal at nanodenanode at gmail dot com  (not my usual gmail address).

The basic node is  £17.50 or a pair for £30.

Real time clock, motor driver and micro SD socket are all options at £2.50 each. We also have spare 868MHz RFM12B modules at  £3 each or 4 for £10 if you want to make up very simple nodes on stripboard. 

Delivery will be next week - as we are kitting up 100 this weekend.



Ken



Evan Davey

unread,
Nov 23, 2011, 6:27:51 AM11/23/11
to London Hackspace
Not wanting to hijack the thread, but picking up on what SheraDreaming
said:

"I imagine there are problems with this, but anything that can turn
on
a washing machine, dishwasher, house lights, coffee machine, Roomba
upon receiving a command from a distant iphone/Android app would sell
like crazy. "

I wonder if this is actually the case given:

a) the technology to do this (iphone / Android aside) has been around
for donkey's years
b) pretty much every geek (and many non-geeks) seem to think this is a
good idea
c) there seem to be many big players thinking about it (all the major
consumer electronics companies, google@home, Apple etc.)

So very curious on others thoughts on what exactly is holding this
industry back:

* too much fragmentation around technologies - nothing talks to each
other and users are turned off by this?
* too expensive - cost of implementation and / or too fat
margins...needs to reach the scale 'tipping point'?
* switching technology has been cheap but rf (up until now) too
expensive?
* control technology / user interface has historically been too
expensive up until iPhone / android etc?
* when it comes down to it, consumers are unwilling to pay a 1000+
price tag for what many see as a gimmick i.e.: does the price point
need to be <1000?
* too many issues involved with retrofit / installation (particularly
for renters and things e.g.: washing machines less suitable to on/off
control )?
* ugly (I'm thinking of x10 here..)?
* can't source products (can only buy low end products like x10 in
places like hardware stores)?
* industry targeting 'total solutions' i.e.: everything has to be
seamlessly integrated before they are prepared to come to market?

It seems like the industry is ripe for the picking particularly with
an open hardware type offering and yet I can't help thinking what
looks simple is often much more complex than first appears.

Yuan

unread,
Nov 23, 2011, 7:47:31 AM11/23/11
to London Hackspace
Ken,

That looks like an awesome board.

The boards that I mentioned are general purpose development boards
with wireless modules. And the penalty that you pay with general
purpose development boards that are designed for ease of use (everyone
has WiFi, and most have bluetooth) and flexibility is that they are
not optimised for any one particular task, both in terms of
functionality, and cost. It's not surprising that they are overkill
for most home automation applications, as they were designed for
hobbyists to quickly create WiFi and Bluetooth projects of various
applications.

Specificly, the XBee modules are for medium-range wireless
applications (primarily we use these as a radio link with our UAVs up
to half a mile). The WiFi boards are for projects that interact with
the internet (e.g. check weather, send tweets, poll a server). The
Bluetooth boards are designed to interact with smartphones (and we
have an exciting project for smartphone-controlling our UAVs like the
Parrot drone).

We are, after all, a hobbyist company; I have to design the relay
board to be compatible with our existing line-up of products for
flexibility and interchangeability, and should allow users to quickly
build up a project using hardware and software that they are already
familiar with. But I do agree with you, as we expand into the home
automation market, I have a low cost 802.15.4 based solution to deploy
later.

Evan Davey

unread,
Nov 23, 2011, 8:18:33 AM11/23/11
to London Hackspace
Will be interesting to see what impact the google@home protocol has if
it is ever made open source in that the technologies you describe
above effectively converge (in a way this is happening anyway with
bridges between things like xbee and wifi).

I've only done a little research but google@home details seem thin at
them moment - they could be using http://www.synapse-wireless.com/
mesh technology (see
http://www.eetimes.com/electronics-blogs/other/4217102/Rumors-abound-with-regard-to-Google-s-Android-Home).

And then something with on board rf like the ATmega128RFA1 (http://
www.sparkfun.com/products/9734) becomes viable as both a fit for
purpose and more user friendly option.

Yuan

unread,
Nov 23, 2011, 8:37:43 AM11/23/11
to London Hackspace
Evan,

I actually agree wholeheartedly with your comments. This is how I see
it: Cost versus functionality is the main problem for consumers -
nobody wants to pay a lot of money for too few features (a gimmick as
you say). The cost we can deal with - RF modules and solid state
power switching are becoming cheaper, but the functionality is more
difficult - most things that we would want to automate, we can't do by
switching on and off at the socket, we will need to interface with the
control systems of the device itself.

This might not be an issue for those who wouldn't think twice about
ripping into appliances to get at the control circuitry, but for the
mass market this isn't an option, and it would have to be down to
individual companies providing integration with home automation
systems. But then you have a problem with getting industry to play
nice with each other, and any instance where you have to encourage an
entire industry to do something without any external impetus is a
catch-22 situation. Nobody is using the system, so nobody sells the
system, so nobody uses the system.

And further to that, few individual companies are prepared to spend
the money engineering this functionality into the appliances. This
is a penalty for the early adopter, and it takes a massive effort to
coordinate a group of companies to do something like this if they
can't see the immediate benefit. You can consider most companies to
be paranoid schizophrenics - they edge away nervously at adopting new
technologies because they're afraid nobody else will do it, but as
soon as they see a trend taking off, they'll have that technology
plastered all over their advertising, heralding it as a must-have for
consumers.

Solution? Either form a large alliance of companies who pledge to
support a certain technology, this is the path the ZigBee alliance,
and the Enocean alliance are heading in. It's slow, wrapped in
paperwork, this is a "manager's" method - get everyone around a table,
start discussion how to do things, make agreements, "my people will
contact your people". Eventually they might get there, but it'll be
on their terms.

OR, you take the "engineer's" method, just go and do it - produce a
system that people start adopting, force the big companies to adopt
now or fall behind. And what's more, force them to sell it for what
it's worth to stay competitive, such systems only add a maximum of £20
or so to an existing appliance and with (comparatively) minimal
development time and cost; if nobody is going to drag the industry
kicking and screaming into the future on the terms of the consumer,
then all that's going to happen is that some pen-pushers line their
pockets some more.* Problem with this way of doing things is that as
a disruptive technology, it's not prime candidate for being adopted
mainstream (without some significant funding), and so as a business
decision, that would be a bad idea.

And so the solution to the solution: open source standards.

Same points and conclusion as yours, but I spent about 20 times longer
arriving at it.

*Any opinions my own.


On Nov 23, 11:27 am, Evan Davey <evan.j.da...@gmail.com> wrote:
> Not wanting to hijack the thread, but picking up on what SheraDreaming
> said:
>
>  "I imagine there are problems with this, but anything that can turn
> on
> a washing machine, dishwasher, house lights, coffee machine, Roomba
> upon receiving a command from a distant iphone/Android app would sell
> like crazy. "
>
> I wonder if this is actually the case given:

> <snip>

Yuan

unread,
Nov 23, 2011, 8:45:34 AM11/23/11
to London Hackspace
Heh, posted that last one before reading your new post.

Google are very good at producing disruptive technologies - they've
basically cast aside GPS device makers like rag-dolls with their
Google Maps/Navigation service.

Regarding that sparkfun board. That's kind of expensive, there are
cheaper solutions, I'm thinking ARM Cortex-M3 cores with built-in
802.15.4 modem and Zigbee stack. Maybe we'll create a home-automation
dev board (low cost, low power, mains switching), I'll look more into
this later.

On Nov 23, 1:18 pm, Evan Davey <evan.j.da...@gmail.com> wrote:
> Will be interesting to see what impact the google@home protocol has if
> it is ever made open source in that the technologies you describe
> above effectively converge (in a way this is happening anyway with
> bridges between things like xbee and wifi).
>
> I've only done a little research but google@home details seem thin at
> them moment - they could be usinghttp://www.synapse-wireless.com/

> mesh technology (seehttp://www.eetimes.com/electronics-blogs/other/4217102/Rumors-abound-...).
>
> And then something with on board rf like the ATmega128RFA1 (http://www.sparkfun.com/products/9734) becomes viable as both a fit for

Evan Davey

unread,
Nov 23, 2011, 9:18:13 AM11/23/11
to London Hackspace
Yes the dev board is expensive - I was thinking more of the chip
itself which is about 6 pounds (quickly checking RS). Not sure how
much infrastructure you need to wrap around it to get to work but
wouldn't have thought it would be much more difficult than a standard
ATMega - and you can probably get it using the arduino bootloader. If
the SNAP / google @home protocol is open and easy to use the you could
theoretically have a pretty cheap mesh networking platform.
Particularly useful if there is a simple bridge between that protocol
and a standard wifi network.

From a home automation perspective (at least on / off / dim) it would
then be a case of being able to integrate it into existing light
sockets / meeting regulatory standards / make it looks nice - probably
the hardest bits and why no-one has been successful at it yet.

From a 'hacking' users perspective, it would still be nice to have a
single protocol / platform even if the looking nice etc. parts aren't
meet. That way you can have some confidence there is a community
playing around with the same home automation products as you (which is
one reason why I think arduino has been so successful).

Yuan

unread,
Dec 12, 2011, 10:37:03 AM12/12/11
to London Hackspace
Right. Design completed for the relay board, will have prototypes in
a few weeks, I'll send one or two to Hackspace. Everyone who posted a
reply in this thread gets a big discount.

Specs:
Relay board fully controllable over I2C. Current sensors on each
channel. Lots of buttons, LEDs and stuff.

Ken Boak

unread,
Dec 12, 2011, 11:08:26 AM12/12/11
to london-h...@googlegroups.com
Yuan

What wireless did you opt for in the end?

I got 200 of my wireless nodes made - and they have a usable range of about 125m.  I'm planning on an experimental picocell system - down my street.

The node has 4 high current relay outputs (or 2 dc motors, or 1 stepper) and 4 ADC inputs scalable 0-10V or 0-36V.

There's a realtime clock for waking the board up to do specific tasks at specific times and a micro SD card socket for datalogging.  There's a 32K battery backed SRAM so that the board can be re-coded over the air and reflashed.

Hackspace special offer £15 each  - includes 868MHz wireless transceiver

Compatible with Arduino, Jeenodes, Nanode RF etc




Ken

Yuan

unread,
Dec 12, 2011, 11:25:28 AM12/12/11
to London Hackspace
No wireless, no microcontroller, just a board with 4 relays, and
current sensors, buttons and lots of LEDs, with everything operating
over I2C (one address for the GPIO pins for controlling relays, LEDs
and button states, and one address for the current sensors). So up to
four boards daisy-chainable per I2C bus. Plus an IR receiver not
connected to I2C.

Compatible with any microcontroller board you like, as long as it has
an I2C interface: Arduino, Forebrain, including wireless ones,
computers with I2C outputs (like Raspberry Pi), etc.

interface is 6-pin connector (0.1" pitch):
-5V
-reset (optional, pull high if not used)
-interrupt for button inputs (optional, open-drain),
-SDA
-SCL
-GND

Also a pin for the IR receiver on the Forebrain socket, at the P1[8]
pin.

I will deal with low-cost 2.4Ghz 802.15.4 versions later after I've
done some research on home automation protocols.

Yuan

Tim Storey

unread,
Dec 12, 2011, 11:29:21 AM12/12/11
to london-h...@googlegroups.com
they sound good Yuan... when will they be available ?

\t

Yuan

unread,
Dec 12, 2011, 11:32:41 AM12/12/11
to London Hackspace
Getting a batch made, but as it's Christmas and new year coming up, It
doesn't seem likely that I'll get them before next year. Will post
here when I do.

Philippe Bradley

unread,
Dec 12, 2011, 2:32:00 PM12/12/11
to london-h...@googlegroups.com
Hi Ken,

Please forgive a pair of n00bish questions. 
Are the relay outputs volt-free (dry) relays?
How does the realtime clock function on this?

I'm curious about the possibility of experimenting with one of these for boiler control; so that either the clock or a wirelessly-transmitting thermostat operates one of the relays to send the boiler to sleep (and then build in further inputs, like a fuel level sensor, weather forecasts, etc). But could multiple systems operate alongside one another, given they'd be operating on the same frequency?


I'm a little scared of the learning curve though, and I'd welcome the involvement of curious 'spacers keen to have a tinker!

Yuan

unread,
Dec 29, 2011, 4:25:08 AM12/29/11
to London Hackspace
Reply all
Reply to author
Forward
0 new messages