Pages: [1]   Go Down
Author Topic: Small + cheap wireless-controlled LED bank  (Read 1091 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I'm new to this forum (and Arudinos!) but have some previous experience with PICs (diploma in EEE). I've been sketching out an idea for a sensor project and could do with a little guidance on approach.

The basic idea is to have a 'receiver' unit containing small bank of LEDs that can be controlled wirelessly, through a simple 'ON/OFF/BLINK' signal.

The data processing would sit at the sensor/transmitter side, with the receiver being a more 'dumb' machine that just hears 'turn on the red light', 'blink the blue light'.

  • The LED light+receiver unit should be small enough to sit unobstrusively on a desk
  • It needs to work through walls, at a distance up to ~10-20m (so no IR!)
  • The receiver should be battery powered + rechargable.
  • It should be possible to have more than one receiver+sensor pair in one site (so some simple addressing required)
  • The system needs to meet wireless requirements and DEFINITELY can't have any interference with local radio comms equipment.
  • I'll be building up to 50-100, so it needs to be as cheap as possible
  • Security/encryption isn't important; the priority is making it super-easy for any given sensor/transmitter to control the receiver

How would you approach this project?

I've had a look at using xBees and they seem like they're designed for this type of thing, but cost is an issue (looking to scale to ~50-100 receivers) so I'd rather avoid overkill. I imagine there's a more simple and elegant solution using a little easy-to-use micro like the Arduino Mini with an exisitng library + a dirt cheap RF receiver? It'd be great to hear from people who've tackled similar projects though to help avoid some of the pitfalls!
Logged

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1023
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sparkfun has some 315Mhz and 434Mhz recievers and transmitters for $5US and some RFM22Btranciever modules for $12US. Qty 100 would save a buck or 2. Others have the same or similar devices.

With the FM devices you could send a numeric command with some circuitry at the reciever end to decode what to do. Maybe even an ATtiny series device to simplify the circuitry that you would need to build.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 435
Posts: 23611
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd go with simple 434 MHz Rf modules with standalone arduino ('328, 16 MHz xtal, two 22 pf caps, 10k resistor, two or three 100nF/0.1uF caps, whatever resistor/LED you need, 5V wallwart for power) at each desk, and matching Tx module whereever it goes.

RF module example
http://www.robotshop.com/productinfo.aspx?pc=RB-Ons-02&lang=en-US

You have 20 IO pins. Need 2 committed for Rx/Tx. (D11, D12 are default when using VirtualWire library).
Perhaps arrange pins as headers for programming: 5V, Gnd, Reset, SCK, MOSI, MISO, for ICSP.  Or 5V, GND, GND, DTR, Tx, Rx, FTDI.
Arrange other 7 other as 'address' pins so can select 1 of 128 address.
« Last Edit: March 28, 2012, 11:43:43 am by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the replies - that gives me some confidence that RF is the way to go. Before I send off an order for some prototyping toys and a few RF Tx/Rx modules my only other question would be around comms standards;

Any radio interference from my Tx is a massive no-no for this application (the sites in question have critical UHF transmitters, mobile telephones, pagers, and possibly other radio comms) and radio frequency standards are far outside my area of expertise.

This is essentially a hobby project with a work application, but if I base my solution around these RF modules, I'm assuming it would be prudent to discuss it with our ICT team beforehand? Or are the 315Mhz/434Mhz modules simply unlikely to cause any interference with comms + alerting equipment due to working in a different spectrum?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 435
Posts: 23611
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Different spectrum.
Also, you would only be sending out a message here & there, yes? Not broadcasting all the time?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

29445
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Interested in these RF modules CrossRoads, links to coding and wiring to Arduino would be appreciated, sir.

Logged

Jj

Offline Offline
Edison Member
*
Karma: 4
Posts: 1722
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Look up nrf24l01 they are 3.50 a piece on ebay and work both ways, are addressable with a 5byte address, I've tested one without an external antenna for reliable transmission about 50 feet away up a floor,
32 byte packet max, so plenty of data in a single packet to control whatever
I've seen 2 libraries on the net, I use the mirf library and it works great
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 435
Posts: 23611
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try the example code in section 5 of the virtualwire library

http://www.open.com.au/mikem/arduino/VirtualWire.pdf

After you get that working, then in the transmitter code, change the indicated line
Code:
void loop()
{
const char *msg = "hello";  // <<<<<<<<<<<<<
vw_send((uint8_t *)msg, strlen(msg));
delay(400);
}

to an array that you load up your address & led on/off status
Code:
// load up the array msg[ ] with the data you want to send
    msg[0]=address;                               // load the array with the address
    msg[1]= ledState;                              // and the LED on/off command

    vw_send((uint8_t *)msg, strlen(msg));     // send the character out
    vw_wait_tx();                             // Wait until the whole message is gone
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes it'll just be the a short signal here and there (main reason for having a heavier sensor/data processing/Tx end!). Good to know I'm not going to scare my ICT comms guys!

Thanks for the great + detailed advice, CrossRoads, I really appreciate it.

Update to follow once this gets going smiley
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 435
Posts: 23611
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Looking forward to it.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: