XAPBob
Posts: 91
Joined: Tue Jan 03, 2012 2:40 pm

Re: Cycle computer

Tue Apr 03, 2012 10:02 am

For Pi #2 I'm looking at building a cycle computer.

I already have a hub dynamo with cache battery and USB output, so I have a power source for the Pi which will be constant whilst I am out and about (I expect power draw to be significantly under 3W without significant graphics output).

[SON hub dynamo with a biologic ReeCharge]

I'll be wanting a pair of USB cameras (to allow me to review my decision making as well as to provide evidence in the event on an incident), a USB stick for recording onto (and being able to pull and give to the police) and a USB GPS device for further logging, as well as providing a time signal on boot.

Finally a couple of buttons/leds attached to GPIO will signal:

- Stop recording and unmount media (light to show completion)

- Stop recording and shutdown (light to show completion - particularly important when I stop, I don't want corrupt data.)

Any new USB media would be auto mounted for recording (Can't decide between going FAT or EXT2).

GPS logs may be recorded to both SD and USB (because I like GPS logs, and don't want to sacrifice them to PC plod)

Obviously the above could all be accomplished with an RPi model A (and a 4 port USB hub) - although I'll probably do the dev work on a model B

If I get hold of a decent motor then I will look at gertboard additions to provide power control - again this could easily be logged, and the GPS data could be used to refuse power above 15mph (to comply with UK law)

I need to look for half decent USB cameras (preferably IP rated) but I can happily buy one at a time

john_wage
Posts: 156
Joined: Thu Mar 22, 2012 6:20 am
Contact: Website

Re: Cycle computer

Tue Apr 03, 2012 11:23 am

there is no-way jose that you will go under 3W with that amount of devices running simultaneously.

also keep in mind USB data bandwidth is not infinite, since you are going to connect several devices that will require faster than real-time read/write of the video files.

User avatar
SN
Posts: 1014
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
Contact: Website

Re: Cycle computer

Tue Apr 03, 2012 11:53 am

good god gorilla cyclist
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?

XAPBob
Posts: 91
Joined: Tue Jan 03, 2012 2:40 pm

Re: Cycle computer

Tue Apr 03, 2012 12:59 pm

GPS is the big unknown, WebCams seem to be on the order of a few tens of mA (i.e. less than .5W for a pair, maybe a bit more for high res?)

The Pi should be able to fit inside a couple of watt with only low res composite output.

By the time I look at motor control I'll have big fat batteries, and the power draw will be less significant.

In terms of USB data rates I don't need to run for high speed video - 4 frames a second would probably be enough most of the time, although obviously more is more

USB GPS should be fairly low data rates.

Yes everything ends up running twice, but 480Mb/s is quite a bit to play with

It'll have to wait until I can start testing on Pi#2

Of course I could always try soldering some switchmode regulators into place if power gets critical.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23065
Joined: Sat Jul 30, 2011 7:41 pm

Re: Cycle computer

Tue Apr 03, 2012 1:24 pm

I've got a USB GPS working on my Raspi. Not sure of power, but it's very low bandwidth, just a few characters per second.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

hzrnbgy
Posts: 106
Joined: Mon Dec 26, 2011 10:55 pm

Re: Cycle computer

Tue Apr 03, 2012 2:43 pm

my gps module consumes about 100ma during tracking.

User avatar
SN
Posts: 1014
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
Contact: Website

Re: Cycle computer

Tue Apr 03, 2012 11:59 pm

Blackview Dr400G gives everything you want if you can organise a 12v supply off your dynamo - no raspi needed
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?

RoyK
Posts: 13
Joined: Mon Mar 11, 2013 10:14 am

Re: Cycle computer

Wed May 17, 2017 10:06 am

How did this project go? I'm planning something similar with an arduino doing data collection from a temperature/humidity sensor (DHT-22), a gyro/accelerometer (MPU-6050), voltmetering (both the 5V and my 36V ebike battery), magnetic sensors for both wheels and crank, feeding an either a pi zero w or a pi 3 (haven't decided yet), which will be connected to a GPS (USB), a camera or two (USB), and relay block (GPIO) supporting both lights and horns. USB 4G modem should do for connectivity, and if I get it as planned, I want the pi to power off when it's all idling, and have the arduino power it on again if it detects movement from the gyro/accelerometer. I'm considering attaching an RFID reader as well, to allow me to "unlock" it with a card and perhaps turn on all horns and so on if not unlocked (which may scare someone if they try to steal it).

Return to “Other projects”