PDA

View Full Version : Building a data logger (bicycle computer)



bicyclist
17-01-2008, 10:53 AM
Ever since I installed a dynamo hub to my bicycle, I have been thinking of attaching a data logger to my bicycle. It would measure several parameters and log the results at regular intervals. When back home, the data would be transferred to a computer for further analysis. There would be enough memory for a week-long trip. The parameters could include the following:


distance travelled
speed (if not every odometer pulse is recorded)
temperature
rotational speed of the crank
altimeter
accelerometer
GPS position


Ideally, I would implement this in a GPS phone. But I think it will take a few more years until GPS phones will be useable in a bicycle. The interim solution would be to implement a stripped-down version in an old Nokia DCT-3 phone, such as the 6210, 3310, or 2100. Why? I always carry a phone with me. Besides, a display, case, battery, and enough memory for a self-built device would be too big or too expensive, or both.

I would connect the sensors to a microcontroller that would talk to modified phone firmware. The phone would store the measurement data that the microcontroller would send via MBUS or FBUS at regular intervals. It could also display some of the data when some speedometer/odometer menu is selected.

Currently, I am facing the following problems where your ideas could be useful. Some of these questions could be answered by the schematic diagram or the service manual, which I haven't been able to acquire yet.

Charging via the dynamo (AC generator, variable voltage):

Is there a DCT-3 with the newer 2.0 mm charger plug (http://www.forum.nokia.com/info/sw.nokia.com/id/3378ff2b-4016-42b9-9118-d59e4313a521/Nokia_2-mm_DC_Charging_Interface_Specification_v1_2_en.pdf.html)?
If yes, then a "special charger" could be implemented with a full-wave rectifier and overvoltage protection
If not, what is the maximum voltage accepted via the 3.5 mm plug? Different chargers supply different voltages.

Adapting a mount and a dock connector for the bicycle handlebar

The screen should be visible (speedometer)
Must not drop if there is a bump on the road
Rain protection (optional)

Connecting power and MBUS or FBUS to the microcontroller

Where to get the "dock connector" for the 6210?
What are the two strips at the bottom of the 3310 or 2100?
Last resort: rewire the phone plug

Hook the microcontroller to via Vcc/MBUS/GND, or
install the microcontroller inside the phone, and wire the sensor inputs to the phone plug

bicyclist
19-02-2008, 11:54 PM
With an adjustable power supply, I measured the charging current of three DCT-3 models: 6210, 3310, and 2100. Every phone required at least 4.0 volts for charging, and the current rose with the voltage. Unless the battery is almost empty, the charge controller will pulse the current at about 2 Hz frequency.

A constant voltage power supply seems to do the job. Looking at the schematic diagrams (thanks, Obnoxy!), the absolute maximum ratings seem to be 1.5 amperes (enforced by a fuse) and 9 volts (varistor). The maximum current won't be a problem, because the dynamo hub should not deliver more than 580 mA. Over-voltage protection is a must, because without load, the dynamo voltage can rise up to 100 volts.

I didn't dare to measure the charging current at more than 5.5 volts, but I guess anything up to some 7 volts should be okay. However, I want my charger to also fulfill the USB charger specification (4.75 to 5.25 volts, may be less for currents above 500 mA) and the Nokia 2mm "special charger" specification (up to 5.2 volts). This leaves me with a fixed output voltage of 5.0 volts. The tolerance of many 5-volt regulators is 4.75 to 5.25 volts.

So, I will be building a fixed 5.0-volt supply for the dynamo hub using a linear regulator. I built a prototype from a broken Nokia wall-wart (only using the rectifier bridge and a capacitor) and a 7805 regulator. The voltage dropout in the circuit was a little too big, because the best I could get to the phone was about 4.5 volts at 340 mA.

The rectifier bridge drops 1.8 volts at 600 mA, and the 7805 should drop at least 2 volts. In the actual circuit, there will be a MOSFET rectifier bridge, a Schottky diode and a LM2940T-5.0 low-dropout regulator. The voltage loss should be about one volt, and the phone should charge much better (getting 5 volts already at slow speed).

When it comes to the actual phone modding, I'm struggling with physical problems: how to mount the phone securely to the handlebar, how to prevent harmful vibrations, and where to find a suitable FBUS/MBUS connector e.g. for the 6210 for attaching the microcontroller-based sensor board. Only after those problems are solved, I could think about the software side.

I must also confess that I have a plan B: acquiring a ready-made tachometer, such as the Sigma BC 1606L, and be done with it. :-P There wouldn't be any fancy logging, and the DIY factor would be limited to creative wiring of the sensors (installing the wires and a custom cadence sensor inside the frame, and attaching the speed sensor to the rear wheel).

deadspot
20-02-2008, 12:57 AM
good luck to your project.....