Simple wireless (usb) "keep alive" or "on /off" switch - Page 1
Forum section: electronics / beginners

author: DivineChaos
author_rank: Regular Contributor
timestamp: February 03, 2016, 01:28:08 am
content: Hey guys! The last post of my first official project here. I'm finally to the good stuff, the final preparations before I create and submit my first prototype board for production and I'm super excited!The final hurdle:How would I go about keeping a set of two wireless devices "on" while a usb port is powered or "on" , and have it shut off when the usb is not powered. (note, there will be an MCU inside these devices that can handle the ADC stuff)Needs:1. Low quiescent current both while on, and on standby2. As simple as can get. (few components etc..)3. At most about 40ft distance in open air direct sight and around 20ft distance through one wall.4. Cheap $Things of note :1. The "transmitter" (usb) can be 5v @ .5A2. The "receiver" is 3.3v and I can probably get away with about 20mA.I was thinking maybe low power Bluetooth, but im going for "simple" here and I think Bluetooth may be very very overkill. Plus it will need to keep alive two separate devices at the same time. Pairing may be an issue.Perhaps short wave radio or something of the likes?I have zero experience with radio and Bluetooth.What are your guys thoughts and suggestions on such a thing? I know my wireless Logitech mouse has a usb plug that sits flush in the computer and it does not use usb, and a single AA battery lasts weeks

author: uncle_bob
author_rank: Unknown
timestamp: February 03, 2016, 01:43:00 am
content: HiDo the "sleep" devices go down on command or simply when the USB happens to go away?How fast do the sleeping devices need to wake up (or do they)?Bob

author: DivineChaos
author_rank: Regular Contributor
timestamp: February 03, 2016, 01:55:23 am
content: They need to wake up in about 30's of receiving a "hey you, wake up" signal.The devices when not having that "hey you, stay on while I'm on" signal need to automatically power off or go into sleep mode when the usb power goes away.Basically, on when usb is on, off when usb is off. Just that.

author: uncle_bob
author_rank: Unknown
timestamp: February 03, 2016, 02:25:47 am
content: HiOk, well then there aren't a lot of choices. You are restricted in terms of the bands you can use for this stuff. There is also the practical "design IC's from scratch" limitation.If you are running a good MCU on the remote end, have it go into deep sleep for 30 seconds when it looses contact for more than 5 seconds. At 30 seconds turn on the Bluetooth and look for a signal. When alive, send an "I'm alive" message from the USB powered base once a second.Bob

author: DivineChaos
author_rank: Regular Contributor
timestamp: February 03, 2016, 02:53:54 am
content: So is Bluetooth a good choice? I've seen things like using RF?Problem with Bluetooth is pairing. It needs to send the signal to two separate devices and I'd like to eliminate the "pairing" procedure.Personally I'd like to go maybe with RF?On board each device will be an MCU, so perhaps there is a way for the MCU to search for a particular RF "blip" every once in a while without having a need for more components and just have a simple USB transmitter that broadcasts a "dumb" signal?Looks like there are some MCU with RF capabilities. I don't see any with RF receiving, only transmitting... maybe I am wrong?

author: uncle_bob
author_rank: Unknown
timestamp: February 03, 2016, 06:02:14 pm
content: Quote from: DivineChaos on February 03, 2016, 02:53:54 amHiYou can indeed do it with RF. You first need to pick a band in which you can legally transmit. Next up is to find a transmitter / receiver / antenna combo that will work for that band. If that sounds like a hassle, it most certainly is. Consider that as frequency goes down, antennas get bigger ... With a simple "blip" sort of system you also have the problem of Bob sending a blip from next door and turning everything on.The common Nordic Radio boards you see in the Arduino world are a bit less complex than Bluetooth. They still have enough signal structure that you can at least protect against garage door openers flipping them all the time.==A couple of other ways to do it:1) IR, just like a TV remote. All the "stuff" is out there to do the job.2) Ultrasonic sound (like a really old TV remote). The parts are a bit harder to find, but it's still do-able.Both assume you have some sort of line of sight to the devices.Bob

author: DivineChaos
author_rank: Regular Contributor
timestamp: February 03, 2016, 06:27:09 pm
content: Yeah, no line of sight.I saw this:http://www.pyroelectro.com/projects/pyro_rf_receiver_27mhz/27mhz seems like an uncommon band and perhaps legal for very low power usage in the 30 foot maximum range.The antennae seem very large, possibly overkillAs far as legality goes, 27mhz seems "open" reserved for toys and the like

author: uncle_bob
author_rank: Unknown
timestamp: February 04, 2016, 12:52:45 am
content: Hi27 MHz in the US is the CB radio band. There are indeed license / allowed use rules there. Essentially, everything above 15 KHz and below 100 GHz has some set of rules associated with it. You can do this or that here or there without a site specific license (WiFi is one example). In many cases the equipment you use must be ok'd even if you do not have a license. You could do some Google research and track down all of the bands and their limitations.Will you get caught within the first hour and wind up in Leavenworth sometime next week? Probably not. If you accidentally interfere with somebody, they are likely to be bothered. Eventually they will get bothered enough to track you down.The only reasonably small / reasonable range / cheap stuff I know of runs at UHF or above. All of the RF gear is short range (3") RFID sort of gear due to the antenna issues. The Nordic radio stuff is maybe $4 each (delivered), that's going to be tough to beat.Bob

author: DivineChaos
author_rank: Regular Contributor
timestamp: February 04, 2016, 01:07:42 am
content: This wireless switch is seeming to become quite a hassle, it's really just for convenience, but a very nice convenience at that.By chance of off hand do you know what a wireless door chime uses? The motion sensor kind. Basically I could use something similar to that and get away with it for cheap I think.http://www.eeweb.com/blog/extreme_circuits/circuit-project-wireless-doorbellWhat about something like that?

author: uncle_bob
author_rank: Unknown
timestamp: February 04, 2016, 12:10:52 pm
content: HiThe wireless "home automation" stuff I have is almost all Zigbee based. That's essentially the same sort of thing as the Nordic Radio boards.A very arbitrary auction chosen at random:http://www.ebay.com/itm/10PCS-Arduino-NRF24L01-2-4GHz-Wireless-RF-Transceiver-Module-New-/170819069271?hash=item27c59c2557:g:J~gAAOSwGotWsEYdThat one happens to be a 2.4 GHz rather than a UHF board.One thing to consider is the hub approach. That's how a lot of the home automation stuff does it. You have a hub that is on 24/7. It is what keeps track of everything. It makes the whole "ask for status" process a bit easier.Bob

author: ade
author_rank: Unknown
timestamp: February 04, 2016, 05:11:30 pm
content: In the US at least, under FCC Part 15 you can use nearly any frequency at low power as long as you do not interfere withlicensedradio communications. (CB is not considered a licensed radio communication.) There are some frequency bands which are restricted from use, e.g., bands used for air navigation, SAR, etc.Most door bells, garage door openers, car remote fobs, etc., work in the unlicensed 27MHz or 315-433 MHz bands.You can design or incorporate a simple 315 or 433 MHz RF transmitter/receiver based on inexpensive products such as:https://www.sparkfun.com/products/10535(see data sheet for sample circuit)On legality:An unlicensed spectrum meansend-users(i.e., your customers) do not have to be licensed to use that spectrum.However, the device itself must still be authorized by the FCC before it can be marketed. And you still need to obtain an FCC experimental license to operate the device during development & testing.But, if you are only doing this as a hobby -- with no intention of selling the product -- then under Part 15 you are allowed to make and operate up to 5 devices without FCC authorization. Otherwise, you will need the experimental license. In either case you must take reasonable care to design your product to comply with Part 15 requirements.The alternative is to get pre-certified WiFi, Bluetooth, 802.15.4 or Zigbee modules, though they are more complex and costly.