![]() |
Re: N900 as bike computer?
Quote:
How would you design the software to minimize battery use? I expect sound processing is a bit cycle intensive (pun intended). |
Re: N900 as bike computer?
Quote:
Quote:
P.S. I usually don't cycle more than for two hours. And, anyway, its fun. |
Re: N900 as bike computer?
Well, I've finished soldering. Hardware works and "clicks" are recorded by maemo-recorder. More detailed description will be available soon.
|
Re: N900 as bike computer?
Quote:
Polling this device node shows the status: http://talk.maemo.org/showpost.php?p...5&postcount=64 If you want i can make some code to do it and show the frequency. The only potential problem is see is device file not being updated at a high enough frequency to be accurate, but it's worth a try since it's easy and you've already got the hardware bit. We've lost the mic usage by your method so no additional lost functionality (i think). The only thing a quick google about how the button is wired turned up is this: http://webcache.googleusercontent.co...ient=firefox-a Whether it's the same for the N900 headset i couldn't say, but i could check it out at work with a multimeter on Monday. I might actually have to make one of these myself. :) |
Re: N900 as bike computer?
Quote:
Through, it should be safe to short mic wires because this is how headphones are detected. When I disassembled mic module I already had working scheme, and I decided to stick to it. And I don't have 50 Om resistor near me. So, button sensing could be as power consuming, as sound analysis. Mic is connected to two contacts on the jack which are closer to wire. Outer one is ground, inner is mic. If they are shorted phone thinks, that headphones are connected, if there is resistance about 1 kOm (it should be less, than 1.5 kOm, I didn't search lower bound) phone thinks, that headset is connected. P.S. If you don't want to loose your headset I can make photos of mine. |
Re: N900 as bike computer?
Flandry, thanks, with my schematic
cat /sys/devices/platform/nokia-av/detect gives 4 when reed is not shorted and 0 if it is shorted. So it is possible to poll /sys/devices/platform/nokia-av/detect or, may be, if for this file urgent reed events are generated, we could even make this effective. |
Re: N900 as bike computer?
Quote:
The trick here is going to be to balance poll frequency and update interval to avoid killing battery life. I still think there's no way audio analysis will be able to compete for battery usage, but the active polling could be a drain just because it doesn't allow the processor to enter sleep state Edit: Have a project due this week so no more time on this for now, but i will try to get a functional app out next week to test it. If you could post a photo or two of your setup, i'd appreciate it. It seems like it would be best to wire up an adaptor with a lead running off for the switch. * ~Smallest non-recumbent adult bike tire is probably 1" (2.54 cm) mountain bike (26") tire, which has a 1913 mm circumference (1). Using a very generous 100 km/hr = 27.8 m/s as top speed, the maximum frequency is 27.8/1.913 = 14.5 Hz.The lowest practical frequency is around 0.5 Hz (4 km/hr with 700 X 44 (2244 mm circumference) tire. It seems there may have to be a tradeoff on accuracy at one end or the other for practical reasons. |
Re: N900 as bike computer?
No time towrite normal text now, may be tomorrow. So just several photos with needed details, scheme and resulting construction. I didn't added headphones nest because appropriate part was absent in a shop.
http://kibergus.su/?q=gallery&g2_itemId=183 P.S. I don't have phone mount yet. Don't askabout it. Flandry, should I bother with writing software or you already did it? |
Re: N900 as bike computer?
Quote:
As i mentioned, i've got a project due this week so it will be a few days before i can deliver a complete app to test it. It appears that ~15 Hz is the best that the sensor device file can manage, so that might be a problem. There are still some things to try, though. 7 Hz wheel rotation is still about 50 km/hr, so still useful IMO. It remains to be seen if it will miss really short presses with a slow poll rate. Will update the thread when i have an app to test with. |
Re: N900 as bike computer?
Here is a description, how to make a sensor.
http://kibergus.su/en/node/39 By the way, doesn't maemo emit dbus signals, when buttons on headset are pressed? We need to start dbus-monitor --system and check. Some events are generated, vhen headphones are inserted and uplugged. I can't make tests with the sensor or headset because they are about 50 km from me now. |
| All times are GMT. The time now is 06:19. |
vBulletin® Version 3.8.8