a miniature bluetooth altimeter and thermometer

dsvilko

Senior Member
Hi!
I need your help. Could someone smarter than me please check that this could work before I order the parts?
I would like to build a miniature altimeter based on the BMP180 sensor. It would be connected to an android phone and basically send the raw data through a bluetooth module (so no need for a complex math on the picaxe side).
This is how I though to achieve this:
Li-ion battery charger charging a small battery. As I would need 3.3V to power the BMP180 module, the bluetooth module and the 08M2 I thought of adding a 5V boost module and a 3.3V linear regulator. There would also need to be a mechanical switch somewhere in there (battery terminal?). All of this could even possibly fit inside a small tic-tac box (33x57x12mm).

On android there would be a small sl4a script that would pull the temperature and the pressure through bluetooth, get the current local sea-level pressure from the web and calculate the current altitude. It would then write this altitude to a file accessible to a lightweight http server. Oruxmaps has a support for an online altitude service so can be tricked to reading the altitude from a local file through the local http server. In theory, it should work.

So, what do you think?
 

neiltechspec

Senior Member
1st comments.

The charger is providing way to much current (1A) for a 300mAh battery.

Why bother with 5v boost & then dropping it back down to 3.3v ?, just run it of the LiPo battery with a series diode for voltage critical devices if needed.

The BMP180 will run from 1.8 to 3.6v, so this is the only one that needs the diode to drop the supply.

The Bluetooth module 3.3 to 6v. The PICAXE will run of the LiPo ok.

Neil.
 

dsvilko

Senior Member
Thank you for the quick reply!
I can see how a 1A could be a problem for the battery (does it matter that it's rated for a 25C discharge?). Is there a simple (and cheap) way of limiting that current? Li-ion charging boards with lower rating are much harder to find.
Maybe I'll simply drop the built-in battery and charger in place of an external 5V power supply. Not as elegant but certainly simpler (and cheaper). The altimeter would not be used on a balloon :) but as a better altitude indicator while mountain-climbing, also adding a temperature to the list of sensors on the phone. When away from home I usually have a small USB external battery that I could use to power this thing.
Another possible solution I was considering was to use a small cp2102 USB to TTL module to both power my board and communicate with my android phone through usb otg cable (I have build the required kernel module for my phone). This would be the simplest and cheapest but I don't know how safe. A wireless connection seems a lot safer.
 

AllyCat

Senior Member
Hi,

I've not used any of those parts (except the 08M2), but a few "words of warning" from looking at the data sheets:

As neil says, 1A is far too high to charge the battery (safely), 100mA is probably closer. There are many versions of those charger boards, for example on ebay. Some have pads and (ideally) the listing may show the value of resistor required for a desired charge current (if not, check the data sheet for the chip used and change the appropriate SMD resistor). Note that a LiPo battery when on-charge rises to about 4.25 volts.

Whilst a series diode will typically drop 650 mV at a moderate current, it may be significantly less at low currents or high temperatures. The BMP180 seems to need only 3 microamps? However, an integrated regulator is probably unnecessary; connecting the BMP180 across a white or blue LED (perhaps even green or yellow for lower voltages) will limit the voltage. Choose a series resistor for the LED brightness (if required) or for the maximum current drain on this "low voltage rail". Note that the I2C pullup resistors should go to this rail !

And again as neil says, there's no need for a step-up conveter, a direct connection to the LiPo cell with a "shunt regulated" low-voltage/current "sub-rail" should be fine.

Cheers, Alan.
 

srnet

Senior Member
I can see how a 1A could be a problem for the battery (does it matter that it's rated for a 25C discharge?)
Yes, the 25C rated discharge matters.

Small Lipos like this can easily put out 20A or so, under fault conditions, thats a lot of current and can cause a lot of damage, to you or your project.

Unless you are well versed in electronics, you should definetly avoid using that type of Lipo.

If you look hard enough, you should find small lipos with built in protections circuits that limit the output current to a safe level, or use a small Lithium Ion such as used in cameras and mobile phones, these normally have protection circuits built in.

Is there a simple (and cheap) way of limiting that current? Li-ion charging boards with lower rating are much harder to find.
Not really, there are charger circuits with lower output currents, and some can be adjusted by changing a resistor.

I would concentrate on doing it properly, rather than just 'cheap'
 

manuka

Senior Member
as a better altitude indicator while mountain-climbing, also adding a temperature to the list of sensors on the phone
Newer Android phones (Samsung Galaxy S3 etc) increasingly have such sensors inbuilt, & suitable apps. may be all you need. However GPS based altitude may not be that accurate, & barometric ones need recalibration of course.

How serious is your mountain climbing? Factor in the vulnerability of add on circuitry for a standalone BMP180 sensor when outdoors - if something can fail it usually will. I wouldn't fancy wonky wiring woes when part way up The Dolomites in bad weather ...
 

dsvilko

Senior Member
As cool as it may be to have a tiny usb rechargeable wireless altimeter I am leaning more and more to either an external power or a usb-otg wired solution.
I already have some experience with picaxe-bluetooth-android connection. I am currently using something similar to this module. It was a pain to solder and it doesn't have a on-board regulator. I originally used a few diodes to drop the voltage to something very close to 3.3v. While it worked it was very unstable with a lot of failed transmissions. Once I installed a proper 3.3v regulator it started working much better so I am a bit sceptical that a few simple diodes would work. The current draw of the whole circuit should be low enough that I am not too bothered by possible inefficiency of double conversion if that means that I have access to both stable 5V and 3.3V. Both boards are small and cheap for it not to be a problem. Even though it would mean a larger project box, I could maybe use a 2xAAA (or even AA) batteries with such a setup.

What about the cp2102 route? Anyone have any experience with such modules? Are they relatively safe or is it too easy to fry the laptop/android usb port? Such a circuit could be really tiny (not much larger than a usb flash drive). Added bonus would be that it could be connected directly to the PC for programming (or could it?).

My android naturally has a built-in GPS but GPS altitude resolution is quite low even with an excellent reception. In a forest it can easily fluctuate more than 50m while the barometric altimeter should be very stable, specially when you have access to sea-level pressure data from the net.
 

srnet

Senior Member
but as a better altitude indicator while mountain-climbing
Then does it need to be able to operate without access to the Web, i.e. where there is no mobile phone coverage ?

Even in the UK, which is relativley dense poupulation wise, mobile phone coverage in remote area can be patchy to non-existant.

There are already relativley cheap altimeters out there, you calibrate them by setting the height from a fixed point on the map, likley to be more accurater than a web based prediction.
 

dsvilko

Senior Member
It does need to operate even if there is no cell coverage (which is quite good here in Croatia). You would still be able to make a manual calibration by stating the current altitude, the same as on a standard handheld altimeter. On the other hand, if and when you do have cell coverage the device could periodically check the standard sea level pressure and extrapolate the pressure change into the future thus making the measurements far more accurate if the trip is a bit longer. A typical handheld device is mostly useless as what I really want is to improve the altitude measurements in the recorded GPS track (looks much nicer if you want to make your track available to others).
And no, I can't conceive of a situation where I would die if my altimeter stopped working. I haven't yet tried hiking 'by the instruments' :) We are not talking about flying an airplane in a dense fog.
 
Top