- Accelerometer
BLE
Battery charging circuit
Energy efficient
MicroPython
Location beacon
Location beacon
I’d like to build a battery powered device that can wake up when moved and report its position in a building. I was thinking of using beacons to determine location. Is there a board that has the following?
-
- Posts: 89
- Joined: Fri Sep 11, 2015 10:47 pm
- Location: Italy
Re: Location beacon
you can use a pyboard 1.1, Battery charging circuit and Energy efficient must be hand made or use a breakout board from adafruit or similar, for BLE you can use https://github.com/dmazzella/uble
Re: Location beacon
Limifrog has everything you want on one board including battery. it's 75 Euro because it comes with a lot of extra sensors.
It has a low power STM32L476, Panasonic BLE module, battery and charger, accelerometer, gyro, magnetometer, barometer, light and proximity sensors, microphone and 8 Mbyte data flash. Optional display.
It has a low power STM32L476, Panasonic BLE module, battery and charger, accelerometer, gyro, magnetometer, barometer, light and proximity sensors, microphone and 8 Mbyte data flash. Optional display.
Re: Location beacon
Thanks for the recommendations. I'll check them out. The micro:bit also looks promising: efficient power, MicroPython, battery jack, accelerometer and a low price. BLE doesn't work with MicroPython but there is a radio library that might be enough to achieve what I need in terms of location detection. It also has speech synthesis which is a plus.
Re: Location beacon
It looks as though Limifrog doesn't have a uPy BLE driver. Another option would be Adafruit Huzzah32 with add on accelerometer
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Location beacon
Is it feasible to use an accelerometer to determine location? Double integration is pretty hairy with errors accumulating rapidly.
Worse, how do you distinguish between a device lying at a small angle relative to horizontal from one subject to steady acceleration? I can imagine a hack to fix that one issue but in general distinguishing between the gravitational vector and that produced by acceleration is, er, "difficult".
Worse, how do you distinguish between a device lying at a small angle relative to horizontal from one subject to steady acceleration? I can imagine a hack to fix that one issue but in general distinguishing between the gravitational vector and that produced by acceleration is, er, "difficult".
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Location beacon
On reflection I think the only way it might be realised is to use a 9DOF sensor with accelerometer, gyro and magnetometer, and apply sensor fusion e.g. https://github.com/micropython-IMU/micropython-fusion. This enables the attitude of the platform to be updated in real time so that you can extract the acceleration vector with reference to Earth rather than to the platform. You'd then need to double integrate the Earth-referenced acceleration to get position.
While it would be an interesting project I'm very doubtful that it would work at all well in practice. Magnetometers are sensitive to disruption by local magnetic fields and, as I remarked before, double integration magnifies errors. It's possible that the latter effect could be reduced with filtering before the integration but I think it would be difficult.
But maybe someone has practical experience to prove my pessimism wrong?
While it would be an interesting project I'm very doubtful that it would work at all well in practice. Magnetometers are sensitive to disruption by local magnetic fields and, as I remarked before, double integration magnifies errors. It's possible that the latter effect could be reduced with filtering before the integration but I think it would be difficult.
But maybe someone has practical experience to prove my pessimism wrong?
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Location beacon
The microbit has a MicroPython radio library which lets you send and receive text messages. It also lets you adjust the strength of the signal. I only need to ensure that the device stays within 3 adjacent rooms and a hallway. In theory, I could place a microbit in each room and a microbit in the device. The room microbits could transmit the name of the room. Once awaken from sleep by movement, the device would continually monitor incoming radio messages. If the incoming messages stopped, the device would trigger an alarm state.
I couldn't find any specs on the range of the microbit transmitter, but hopefully the transmit power could be adjusted to paint a room (15x15 ft.). I can't place anything outside of the rooms because it is not our property.
I couldn't find any specs on the range of the microbit transmitter, but hopefully the transmit power could be adjusted to paint a room (15x15 ft.). I can't place anything outside of the rooms because it is not our property.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Location beacon
Apologies, I thought you were planning to build an inertial navigation system
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Location beacon
That's a clever approach. It would be a fun project.pythoncoder wrote:Apologies, I thought you were planning to build an inertial navigation system