Author Topic: Low cost GPIO over RF  (Read 2801 times)

0 Members and 1 Guest are viewing this topic.

Offline crispusTopic starter

  • Regular Contributor
  • *
  • Posts: 131
  • Country: ro
Low cost GPIO over RF
« on: April 06, 2016, 11:00:04 pm »
Hi,

I want make a custom smart remote switch network. I need to switch on/off a relay and to be able to read 2 GPIOs.
It may be up to a couple of tens of such as "switches".

As RF protocol can be anything if is duplex: WiFi, BT, Zigbee, 433 Mhz, etc. As response / communication time per device 200-300ms it would be more than enough.

Right now I see 2 solutions:
1. Small MCU + RF module
2. RF with MCU integrated.

I would prefer cheapest chip/solution. Is there any part out there that would work of the shelf?

I saw some of nRF/Microchip MiWi/ESP8266 that might fit.

Any ideas?

Thanks
I know I'm numskull, but I look around me and I feel better.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Low cost GPIO over RF
« Reply #1 on: April 07, 2016, 12:02:01 am »
Networks have been done, why do it again?  Any of the ones you listed will work.  Zigbee is very interesting.

OTOH, almost every micro with ethernet capability has an example project where it sets up a web server and responds to commands/queries from a browser.  But a browser just sends text strings so the actual application can be anything that can read/write to the TCP/IP stack of the 'boss'.  I would use something like a Raspberry Pi.  What do I care if it has to run Linux as long as it boots up sooner or later.  WiFi is built in, the web server is built in, the board has IO pins and Python is the language of choice.

I was thinking about adding more automation to my sprinkler system.  I was looking at Zigbee because it is a mesh protocol and signals to the far end of the property (not all that far) can be routed through other nodes.  This is very cool.  I could use any uC that came along and there would be no massive overhead like with the Pi.

Really, the big part is at the client end.  How does the data get presented?  How does the user cause something to happen?  If a web interface is adequate, any uC that presents a web server and USB (for the WiFi dongle) will work.  It might even be possible to use the web server/browser approach over a Zigbee network.  There used to be a SLIP protocol (Serial Line Internet Protocol).  I haven't thought about it in years but ethernet wasn't always at gigabit data rates.
 
The following users thanked this post: crispus

Offline crispusTopic starter

  • Regular Contributor
  • *
  • Posts: 131
  • Country: ro
Re: Low cost GPIO over RF
« Reply #2 on: April 07, 2016, 07:24:27 am »
I don't need anything fancy. I don't care if it is http, raw TCP/UDP, anything. I just need to a command which reads or writes some GPIOs
The brain would on the "master".

I think right now the main criteria would be price... I was hoping someone used something cheaper  ;D
I know I'm numskull, but I look around me and I feel better.
 

Offline ealex

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: ro
Re: Low cost GPIO over RF
« Reply #3 on: April 07, 2016, 07:59:23 am »
Hello

the cheapest could be some ESP8266 module - you have a lot of support for it and you can upload your own code.

Also, if you need to keep the relay powered for a significant amount of time, you will have to search for bi-stable relays, otherwise you will draw a lot of power. More important if you want to switch mains voltage.

there are some ready-made solutions but i have no idea on how much they cost, see this guy's clip:
 
The following users thanked this post: crispus

Offline obiwanjacobi

  • Frequent Contributor
  • **
  • Posts: 988
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: Low cost GPIO over RF
« Reply #4 on: April 07, 2016, 08:27:02 am »
ATtiny + NRF24L01+ ??
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 
The following users thanked this post: crispus

Offline hendorog

  • Super Contributor
  • ***
  • Posts: 1617
  • Country: nz
Re: Low cost GPIO over RF
« Reply #5 on: April 07, 2016, 08:51:16 am »
Much simpler: Not cheap per unit, but very simple. IIRC These can do transparent I/O and transparent serial over 2.4GHz using some example code.
Since you mentioned very low volume it may actually be cheaper overall.
https://www.pololu.com/product/1337

Justified by using the same costing logic, however these are capable of significant range.
http://www.hobbyking.com/hobbyking/store/__27096__OrangeRx_Open_LRS_433MHz_9Ch_Receiver.html


 
The following users thanked this post: crispus

Offline Porch

  • Contributor
  • Posts: 37
Re: Low cost GPIO over RF
« Reply #6 on: April 07, 2016, 08:53:42 am »
I use ZigBee to do what you are doing for my home security system. The ZigBee handles reading the sensors for door/window/motion, then turn on lights or do other things. Also have an Arduino reading serial from a device, then spits it to a ZigBee for broadcast on the network.  A Beagle Bone Black has a ZigBee connected to it's serial port and works as the master controller for the entire system.

Wish the ZigBee stuff was cheaper, $20-$50 per radio depending on type,  but it just works.
 
The following users thanked this post: crispus

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: ca
Re: Low cost GPIO over RF
« Reply #7 on: April 07, 2016, 04:17:36 pm »
ESP8266 would be my default for this.
If you have ever used Arduino, then this would be crazy easy. Otherwise, just merely really easy.  ;)
There is a add-on for the Arduino IDE that lets you program the ESP8266 microcontroller directly. Examples are included from which you could quickly cobble together a working solution. This application, monitoring a couple I/O pins and activating a relay, is not a demanding one so all the people screaming about the overhead and inefficiency in Arduino need not bother. Besides, you can run this 32-bit MCU at 160 MHz if you want to.

Even the smallest $2 ESP-01 module has enough I/O for this task, provided that you don't use the serial port so that you can re-use those pins as I/O. Otherwise look into one of the other slightly bigger variants, or add a I2C I/O expander like PCF8574, which has the added benefit of protecting the MCU I/O pins from damage.

Since these are WiFi, you have the choice of using a central node as a task-dedicated access point, or just configure them all as clients and connect to your existing WiFi LAN. A major drawback to consider is power consumption. The ESP8266 is power hungry particularly when communicating over WiFi.

NRF24L01+ are also nice ... available, powerful, and cheap, and have much lower power consumption. But you need an external MCU to control it.
 
The following users thanked this post: crispus

Offline crispusTopic starter

  • Regular Contributor
  • *
  • Posts: 131
  • Country: ro
Re: Low cost GPIO over RF
« Reply #8 on: April 07, 2016, 09:47:33 pm »
Thans guys for your answers.

For this very project I will stick with ESP8266, it seems to be easier to debug. I don't care about power consumption, or distance because all of the switches will be in same room.

nRF seems to be interesting for a low power project.
I know I'm numskull, but I look around me and I feel better.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf