Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Bicycle meter based on AVR

Status
Not open for further replies.

Vermes

Advanced Member level 4
Joined
Aug 2, 2011
Messages
1,163
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,316
Activity points
22,318


Assumptions
  • the current speed
  • the current frequency of the pedaling rate
  • trip distance
  • travel time
  • the average travel speed
  • maximum travel speed
  • backlight
  • velocity relative to time graph
  • speed relative to distance graph
  • the change in circumference of a wheel
After activating the device this screen appears:

6190029600_1314899675_thumb.jpg


The crank rotation is seen on the left (along with scale, which shows 0 and optimum). On the right side the current speed is shown, list of modules and at the bottom – the current module (in this case, the distance).
The whole device operates on two wire sensors with reeds, three or two buttons and two AA batteries 1,2V.
The buttons are used mainly for scrolling and selecting the modules, but generally it depends on the module – for example, pressing the selection of the distance module clears the distance, pressing the selection of the circumference of a wheel allows to change it.
Equipment
  • Atmega8
  • Nokia 5110 display
  • parity generator
  • buttons
  • sensors based on reeds
The main element is Atmega8 – the whole logic of the system is placed there. The system controls the display and collects interruptions from the buttons and sensors. In this project a parity generator was used, because Atmega8 has only two external interruptions.
Software
Project was written in C, with six lines assembly. The most is in C89, but sometimes there are GNU99 and C99 amplifications. So it may be compiled with GCC.
The software is divided in core, sensors and modules. The sensors collect data. The modules display data, they have a simple construction and are easy to be written. The core links all those.
The code itself is based on both the interrupts and the main loop. Interrupts are responsible for collecting and storing data. The main loop is responsible for displaying data.
Assembly
The screen is soldered permanently and the sensors use BLS-02 ends. It was attached to the bicycle with help of Styrofoam and special snaps.



The photo of the meter with batteries.



Link to original thread – Licznik rowerowy na bazie AVR
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top