I am making an android application that requires me to detect the user's motion.
My application also requires me to use an external sensor, which is a Bluetooth smart sensor, for some other purposes.
Now I have two options:
to use the accelerometer and gyrometer of the android phone
fetch motion information from the bluetooth smart sensor.
I understand that Bluetooth Smart (ble) is more energy efficient than Bluetooth sensors.
However, I am confused as to which of the above options will provide me a more energy efficient solution on the Android device. EDIT: I am presently not concerned with the energy efficiency of the bluetooth device.
Also, please see that I want this comparison only because I don't want to detect accurate user motion, otherwise an external device(bluetooth low energy device) would have been better hands down.
The accelerometer and gyrometer will take roughly the same amount of power whether it's on the phone or the external device. The difference is the external device has to transmit that information over a radio signal to the phone. It makes more sense to just use the Phone's existing information if that's sufficient because it won't require any radio transmissions and will require less power. Also, the phone will have a much larger battery.
The sensors on the phone have nothing to do with Bluetooth... they're incorporated right into the hardware.
EDIT: The difference between Bluetooth and BLE is that BLE uses the radio much more sparingly. Radio transmissions take a good chunk of power. So, using on-board sensors is going to (most likely) take far less power than using a radio to communicate with an external sensor. Also, I have a feeling that the accelerometers are always on on the cellphone so getting readings from those is going to take no more power than is already being used, too.
Related
The Altlibary is great at detection! One thing we noticed with testing is if we have an app doing both transmitting and receiving we are not picking up the other phones at times. (Very sporadic) With real devices like ibeacons we are constantly able to pick them up.
My question is how do we control the frequency of the transmitter vs the frequency of the scanning (recieving) so that we can both do transmission and detection at the same time?
My goal is to achieve the best of both worlds scanning and transmitting, is that even possible.
https://altbeacon.github.io/android-beacon-library/beacon-transmitter.html
By default, the Android Beacon Library's BeaconTransmitter uses the highest power and frequency allowed by the underlying APIs in the Android operating system. Here are the settings, showing the defaults:
beaconTransmitter.setAdvertiseTxPowerLevel(
AdvertiseSettings.ADVERTISE_TX_POWER_HIGH);
beaconTransmitter.setAdvertiseMode(
AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY);
While the settings are configurable, presumably you already want the fastest and strongest advertising for you use case. And that is exactly what the library does with no extra configuration. (Note: there is very little reason to lower the transmit power or frequency, because tests show that transmitters use negligible battery. See my blog post here: http://www.davidgyoungtech.com/2015/11/12/battery-friendly-beacon-transmission)
If you are seeing that hardware beacons are reliable, but some phone models' transmitters are not detected infrequently, then the issue may be hardware issues with those phones themselves. You may wish to characterize which ones are problematic.
I can confirm that I see very strong transmissions from the Pixel 3a, Moto G7, Samsung Galaxy S10 and Huawei P9 Lite I have handy.
I want to develop a mobile app that listens for broadcasts by a BLE device. My idea generally is patterned on the game "I spy".
In a room full of objects, there should be a numerous Bluetooth beacons. The beacons will have a button and when the button is pressed, it would send a broadcast. One person goes in the room to solve the puzzle so there won't be the need to consider if the broadcast reaches multiple phones.
When the button is pressed, the app should check the clue given and read the corresponding beacon's ID and then alert the user whether they're correct or not.
I would like this to happen without having the user's phone pair with all BLE beacons.
For the beacon, i'm thinking to use something along the lines of an Adafruit LE Friend or flora wearable. This would be soldered to a CR 2025 or similar battery. Do I also need an Arduino or can this be standalone?
I'm thinking that it could be standalone but I have no experience here
For your use case, the flora wearable is the more suitable choice because you can just solder a battery to it and get it to work (the Adafruit LE Friend requires a PC as it is a USB dongle). You will need to do some reading on basic Bluetooth Low Energy (BLE) concepts, and I recommend that you focus on the following:-
Advertising/Broadcasting: This is what your BLE peripherals such as the flora will be doing. These devices will be sending adverts when a button is pressed or a command is sent.
Scanning/Observing: This is what the app developed on mobile phones will do. Your apps will be continuously scanning for those LE adverts and display relevant information to users when those adverts are read.
Luckily these are relatively easy BLE concepts and there are already many examples for both advertising and scanning.
For more resources, I recommend having a look at the following:-
Bluetooth Low Energy: A Primer
Getting Started with Bluetooth Low Energy
Introduction to BLE
I hope this helps.
I know both are bluetooth smart devices. I need to know whether both can be used for the same applications. If not what do they have in common and what is different about them?
A sensortag can be configured to be an iBeacon, but it is designed to be a more generic Bluetooth LE device that can be put to many other uses as well, providing many other Bluetooth services.
An iBeacon is a very specific type of Bluetooth LE device, and many types of iBeacons can only perform that one function.
Because a sensortag is so generic, it is not optimized to be an iBeacon. Its battery, for example, will not last a super long time when acting as an iBeacon.
A TI "Sensortag" is basically just an eval board for the CC2540 / CC2541 BLE chips.
Most hardware "iBeacon" implementations use either that chip, or the competing NRF51822, on a more specialized custom board.
In either case, the transmission of "iBeacon"-formatted BLE advertising packets is controlled by the custom firmware loaded into the device.
The duty cycle, which is the major determination of power consumption, is also determined by the firmware. The Sensortag does have some other onboard peripherals, but if the design is sane it should be possible to get those into a negligible powered-down state.
Answering #TimTisdall comment (below), the following link is a 3rd party, non-official iBeacon-enabled firmware update for TI's 2541DK SensorTag hardware:
hex firmware files, demonstrating iBeacon on the cc254x
For more info regarding SensorTag, see:
http://www.ti.com/ww/en/wireless_connectivity/sensortag
&
http://www.ti.com/tool/CC2541DK-SENSOR
This question was a bit ahead of the time and here are some updates: The SensorTag now officially supports iBeacon technology. Information on how to configure it to act as an iBeacon is described in the wiki.
As davidgyoung already pointed out: it wasn't build to solely work as an iBeacon, so it may come with reduced battery life. On the other hand, it provides more functionality, which makes it a valuable tool for development at a good price tag.
As noted before the SensorTag has many other sensors on board. Using a "generic" iBeacon firmware on the SensorTag results in a high current consumption. The unused sensors need to be put into sleep mode (I believe it was the Gyro implementation, which eats a lot of power when not configured correctly in sleep mode).
So what is the easiest way to get started? There are so many options available it's hard to decide, from a beginner's standpoint, which is the best.
What is the best option for simple wireless communication? That is, communication from a controller to move a robot, or from an arduino to relay information back to a computer for processing.
Drawing from your experiences, what's the 'best' option in your opinion?
Bluetooth would be the most flexible, however I believe xbee to be the easiest. Software wise xbee is exactly the same as serial an even allows for wireless reprogramming and the higher end ones have some serious range.
Bluetooth can be easy if you have a Bluetooth device you're trying to talk to (e.g. Mac-book or Smartphone). The problem is that Bluetooth radios for the the Arduino are still (in 2013) expensive. A Bluetooth radio usually costs more than an Arduino! Low Power Bluetooth may be an option as well. Essentially, Bluetooth is a simple serial transfer of data so you have to create your own protocol on both sides.
Bluetooth Low Energy BLEis an emerging technology and is available on some new devices (recent iPads, macbooks etc: Supoorted Devices ), this may or may not meet your requirements.
Is it possible and will it be efficient to build a large network of mobile devices over Bluetooth?
For example all Bluetooth enabled devices in a large building so that any device can exchange a small object with any other device in the network through some devices that are in between?
Bluetooth is not meant for that. Interference will be a problem if the devices use a high enough TX power level so that all of them can communicate with each other. You can come with a smart application that can forward messages and restrict range of communication to a smaller area, but you'd be reinventing the wheel.
Look into Zigbee or XBee radios instead, this is exactly the scenario they were designed for.