user1390491
user1390491

Reputation: 31

Switch device on/off using bluetooth and application

There is something I want to make, and I'm not sure where to begin. I tried searching around but the problem is I don't know where to start. So basically, there is a hardware side and a software side. The hardware side is just a Bluetooth v4.0 device which turns on and off...that's it. Now I want to develop an Android application which can connect to this device via Bluetooth and switch the device on and off from the phone. Is there a special Bluetooth chip specific for this task? Do I have to write the program for a microcontroller so I can perform this task? If anyone could help just point me in the right direction just to get me started and I can research the rest then I would be really grateful. Thanks.

Hassan

Upvotes: 3

Views: 7917

Answers (3)

Philippe
Philippe

Reputation: 1

The cheapest way to do this is to alter a mass produced bluetooth product that already has a bluetooth chip, microcontroller and an output. Whilst giving less flexibility than an arduino board or raspberry pi; for a simple on/off bluetooth controlled switch this should suffice and can be made for as little as £3.50.

E.g: Buy a cheap made in china bluetooth headset such as (£2.89): http://www.ebay.co.uk/itm/Black-Bluetooth-Handsfree-Headset-Earphone-With-Ear-Hook-for-Mobile-Phone-/271349525637?pt=UK_Mobile_Home_Phones_Bluetooth_Acc_ET&hash=item3f2db12c85

Open it up and remove speaker. Pair phone with device (usually requires physical button push preventing randomer from pairing but may depend on bluetooth headset model)and play a tone which will generate a current in wires that used to go to speaker upon which you can attach a relay switch that can be had for pennies (check power rating if connecting to large device like garage door opener motor). Wire in on other side of relay circuit you want to control.

I should add there may be a cleverer way to get an output signal than by playing tone and hijacking speaker wires - by taking an ammeter and setting it on its lowest setting and connecting and disconnecting phone to device, try and locate if any current is starts flowing in circuit. If so may be a better place to wire to. Otherwise using something like app generator can quickly make an on button that transmits tone over bluetooth continuosly for a smoother experience.

P.S: if the question relates more to controlling another bluetooth device such as one phone controlling another, then this solution won't be all that useful as I'm guessing you won't want to start opening up your phone! as well as the issues highlighted by Jason.

Upvotes: 0

Simon Peverett
Simon Peverett

Reputation: 4207

A Bluetooth low energy (Bluetooth Smart) based device sounds like what you are after.

The company I work for, CSR, produce a Bluetooth LE chip that has an SDK for on-chip applications and uses very low power. There are many application profiles for Low Energy but I can't think of one specifically for just switching stuff on or off, although such an application would be very simple.

On the controlling side, you would definitely need a device capable of dual-mode operation e.g. to operate normal Bluetooth (BR/EDR) and Low Energy (LE). Any chip that is certified 4.0 will do this (newer iPhones, etc.)

http://www.csr.com/products/technology/low-energy

I hear Broadcom make chips too.

Upvotes: 1

Jay M
Jay M

Reputation: 4287

There is a bit missing from your plan. The 'bluetooh chip' needs a controller that tells it how to behave.
This would normally mean some sort of microcontroller, but there are Soc (system on chip) that include all of the radio, bluetooth stack and controller on one device.
There are bluetooth modules that include both the bluetooth and the controller and you can sometimes change the firmware on it to tailor it to some bespoke task like yours.

Secondly there is the problem of when you 'turn it off' how do you turn it back on?
I assume the device would have a battery?
When you add a battery to a design you have to consider low power design and battery charge management.
Of course you also need the additional electronics to handle the battery.

Start by trying to find a development kit or evaluation board that has all the parts you need. I've not spent time studying it's documentation, but something like this Texas Instruments CC2541

Upvotes: 1

Related Questions