Skip to the content
2 layers91.4 × 50 mmTachometer, the printed circuit board in 3D

Our application uses two hall sensors for measuring speed, traveled distance, burnt calories and time (not by the hall sensor). This data is shown on four 7segment displays (one part).

Size
91.4 × 50 mm
Copper layers
2
Thickness
1.6 mm
Parts
55
Nets
63
Pads
191
Tracks, vias
377, 64
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
7 Apr 2021
Updated
4 May 2021

Overview

Tachometer is an open-source printed circuit board by mkousal, from the mkousal/Digital-electronics-1-Tachometer repository on GitHub. It is a 2-layer board of 91.4 × 50 mm with 55 parts on 63 nets, routed with 377 tracks and 64 vias.

It is built around the BC817 and TDCG1050M. Its parts include 30 resistors, 6 diodes, 6 connectors, 5 transistors and 3 capacitors.

Main components

2

README

README.md

DIGITAL ELECTRONICS 1

2021, Faculty of Electrical Engineering and Communication FEKT
image
Title: Project 2021
Topic: 3. Console for bike with hall sensor, measuring and displaying speed, traveled distance and burnt calories
Time Window:

  • Start of Project: April 7
  • End of Project: May 4

Supervisor: doc. Ing. Tomáš Frýza, Ph.D.
Vivado Teachers: doc. Ing. Tomáš Frýza, Ph.D., Ing. Stanislav Rozum

3. Console for bike with hall sensor, measuring and displaying speed, traveled distance and burnt calories

Team members

Project objectives

Our application uses two hall sensors for measuring speed, traveled distance, burnt calories and time (not by the hall sensor).
This data is shown on four 7segment displays (one part).

  • Calories counting
  • Total time
  • Total distance traveled
  • Trip distance traveled
  • Speed measuring

Modes can be selected by pressing buttons (see below).
One hall sensor is used for measuring speed and traveled distance. Another one is for calories counting.
Burnt calories will increase only by stepping the pedals, not by downhill riding!

Hardware description

Programming Board

image

  • Main programming board is Arty A7-100T. It has four Pmod connectors (16.), we have used all of them
  • Other buttons and LEDs are not used => See Main Board

Main Board

image image

  • Schematic
  • Consists of: three buttons, 7segment display, Pmod connectors, LED status and two connectors for Hall sensors
  • Board is made for direct connection to Arty A7 board. Three buttons are used to controlling the tachometer. LED at the top shows what value is now displayed at the display
  • Used seven segment display with middle double dot and dots for decimal is TDCG1050m - datasheet

Hall sensor board

image
image

  • Schematic
  • Hall sensor board only consists of hall sensor and a few passive components that are described in datasheet and connector
  • You can screw it by using M3 screw to your bicycle
  • Used sensor is MH253 - datasheet

VHDL modules description

Buttons

Button_int:
  • This block reads the input from real world buttons and translates them to commands which will be sent to the state_machine controller. When buttons up or down are pressed, the interface will enter a cooldown state when no additional button presses will be registered (to prevent jitter) after the cooldown passes, the interface will send an up or down command out
  • If the ok button is pressed, the device enters the cooldown state, after which it will wait for a longer ammount of time. If no additional ok button press is registered, the interface will send out an startstop command
  • If, however, the ok button would be pressed again, the interface will send out the reset command

Traveled distance

km_total:
  • This block counts the travel distance and sends it out to the display. Every 100 m (meters) an pulse will appear on the meters_i which will add to the total count of up to 999,9 km
  • When the trip mode is activated the block will count the trip time and send it to the display instead, the total time is being still counted in the background
  • rst signal will make the current displayed data reset to 0
  • The enable signal will be present if the trip is not paused, on pause the trip data is not counted
  • This block automaticaly wipes previous trip data when the mode is turned on

This block also contains a function which converts the traveled distance from binary integer to BCD code to be displayed on the 4 digit 7 segment display.

Main controling module

state_machine:
  • This is the main utility block of the device. It recives commands from the button interface and switches the outputs accordingly. Inputs up_i and down_i will cycle through the 4 modes of the device and light up their status LED
  • While in a mode the data stream from its block will be sent to be displayed on the segment display via the data_o, with added decimal point or double dot if needed
  • While in a mode the reset and ok commands also aply for the selected block only. The trip mode is special, because it does not generate data on its own, when activated, it will send a mode change command to all blocks which will now store and display data in an additional variable as well as keeping the total count going
  • The status LED of trip will remain on as we cycle through the other modes until it is paused by the startstop button or turned off via the reset. At this point all trip data will be reset from all blocks and the normal total data will be displayed

Time mode

total_time:
  • This block acts as a stopwatch. When startstop is applied, it will start or pause the counting
  • Reset will reset the total time
  • When the trip mode is enabled, the stopwatch will automatically start counting the trip time and will reset before every trip is started

This block also contains a function which converts the total time from binary integer to BCD code to be displayed on the 4 digit 7 segment display.

SENSOR

sensor:
  • This block is used to calculate actual speed and triggering pulse every 100 meters for counting travelled distance
  • Uses input from hall sensor mounted at the front wheel. Output one trigger signal every counted 100 meters and calculate actual real speed and set it to display output

7 Segment Driver Module

  • This block consists of 4 smaller modules:
    1. CLOCK
    2. UP_DOWN_COUNTER
    3. DRIVER_4X7SEG
    4. DECODER_7SEG
CLOCK:
  • Generates 100MHz clock
  • This periodic signal is used in module UP_DOWN_COUNTER, which reacts on rising edge of the signal
  • Originally uses 4ms for each segment
UP_DOWN_COUNTER:
  • According settings (g_CNT_WIDTH), counts as the edge of the clock signal rises
DRIVER_4X7SEG:
  • Main module, drives four 7segment displays. It is determinated by CLOCK and UP_DOWN_COUNTER
  • Process MUX uses above modules to set data_outputs to each 7segment display
  • Input is a 16bit unsigned (b"xxxx xxxx xxxx xxxx")
DECODER_7SEG:

This module is used for displaying data on 7segment display. If have more displays, MUX has to be used
Both, common cathode and common anode can be used as well

Calories Mode

calories:
  • This block calculates burned calories by measuring the time between each pedals rotations
  • Rotation is captured by hall probe attached to pedal
  • The 100 MHz clock is used for counting time. Every 0.5s a number is increased, which recalculates the calories formula
  • When signal from hall probe is not generating for 2s, the number that was increasing is stopped. The amount of burned calories is sent to display

Testbenches and simulations

Button_int:
  • Shows states of button_int block
  • In order to save time and make the inner working of this device more clear, all simulated data has been sped up
    image
km_total:
  • Screenshot demos how the counting works
  • In order to save time and make the inner working of this device more clear, all simulated data has been sped up image
state_machine:
  • Screenshot below represents testbench of main unit
  • In order to save time and make the inner working of this device more clear, all simulated data has been sped up image
total_time:
  • Funcionality of total time counting is shown by this signals
  • In order to save time and make the inner working of this device more clear, all simulated data has been sped up image
sensor:
  • First waveform shows how the speed calculation works. Calculated speed is written to the s_disp_o, which is 16bit word and is here until the new value is calculated image
  • Second waveform shows pulsing at the s_trigger_o every 50 sensor's tick, which is equal to the 100 meters in real distance image
CLOCK:
  • Generates 100 MHz clock signal image
UP_DOWN_COUNTER:
  • As internal values set, counts with edge of the clock
  • 0-31 states: image
  • 0-31 states: image
  • 0-4 states = This is used in our application
  • Four 7segment displays are controlled by this states image
DRIVER_4X7SEG:
  • These screenshots show how the multiplexer works
  • s_data is the main 16bit data input
  • s_hex is the 4bit data output, which is used in DECODER_7SEG. This module decodes the 4bit data value and diplays it on a specific 7segment display
  • s_dig_o shows which one of four displays is being used. b"0001" means display on very right side
  • s_seg_o represents common cathode bits image image
  • This screenshot shows a real situation, when input data will be refreshed every one second (tachometer)
  • If data is not changed for a while, displays will use last data. This prevents from wrong/unwanted values image
DECODER_7SEG:
  • Decodes 4bit signal to 7bit (7 segments (+ decimal dot and colon)) image
calories:
  • The simulation is in ratio 1s = 10ms
  • In wave form is display calories counting in both modes and amount of burned calories is sending to display image

TOP module description and simulations

  • TOP module represents the whole project
  • Final test schema can be seen below: image
  • After having main board and hall sensor board done, software can be written into Arty A7 board. Generated bitstream is available here.
    image

Video

Video presentation is available here.

References

Used materials:

Used programs and its links:


©2021, VUT FEKT, Brno, Czech Republic
Kousal Martin, Ledvina Matej, Kříčka Tomáš, Košík Samuel
For Educational Purposes Only!

Parts

55
QtyValueFootprintReferences
17220Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR2, R3, R4, R5, R6, R7, R8, R10, R19, R20, R23, R24, R25, R30, R31, R32 +1
810kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R12, R13, R15, R16, R18, R22, R27
51k5Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR11, R14, R17, R21, R26
5BC817Package_TO_SOT_SMD:SOT-23Q1, Q2, Q3, Q4, Q5
5LEDLED_THT:LED_D5.0mmD2, D3, D4, D5, D6
3100nCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC1, C2, C3
3SW_Push_DualButton_Switch_THT:SW_PUSH_6mmSW1, SW2, SW3
1HallSensor1Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ5
1HallSensor2Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ6
1Pmod JAConnector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_HorizontalJ1
1Pmod JBConnector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_HorizontalJ2
1Pmod JCConnector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_HorizontalJ3
1Pmod JDConnector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_HorizontalJ4
1TDCG1050mtachometer:TDCG10..mD1

The 53 most common of 55 parts.

More from mkousal/Digital-electronics-1-Tachometer

1
  • 2 layers20 × 10 mmEncoderBoard, the printed circuit board in 3D

    EncoderBoard

    mkousal/Digital-electronics-1-Tachometer

    Our application uses two hall sensors for measuring speed, traveled distance, burnt calories and time (not by the hall sensor). This data is shown on four 7segment displays (one part).

    6 parts

Similar boards

  • 2 layers72 × 42 mmNRF24 jammer, the printed circuit board in 3D

    NRF24 jammer

    W0rthlessS0ul/nRF24_jammer

    The nRF24 jammer is a powerful tool that requires an ESP32 and configurable numbers of NRF24 modules to assemble.

    51 parts1kMIT
  • 2 layers271.8 × 114.3 mmArdumower mega shield svn, the printed circuit board in 3D

    Ardumower mega shield svn

    Ardumower/ardumower

    Develop an open source robotic lawn mower (HW+SW reference platform)

    426 parts282
  • 2 layers65 × 56.5 mmRPiG3iMac, the printed circuit board in 3D

    RPiG3iMac

    qbancoffee/imac_g3_ivad_board_init

    iMac G3 IVAD board initialization with an arduino

    44 parts240LGPL-3.0
  • 6 layers83.5 × 56 mmEspiff v3 1, the printed circuit board in 3D

    Espiff v3 1

    MDCservice/EsPiFF

    An ESP32 in the Raspberry Pi form factor

    172 parts223GPL-3.0
  • 2 layers87.9 × 98.7 mmBitdoglab smd, the printed circuit board in 3D

    Bitdoglab smd

    BitDogLab/BitDogLab

    Open-source educational hardware for embedded systems, programming, electronics, and physical computing.

    138 parts203
  • 2 layers77 × 100 mmBeamer1, the printed circuit board in 3D

    Beamer1

    shufps/diy-projector-clock

    DIY Projector Clock

    283 parts172
  • 2 layers84.2 × 52 mmPicoPico, the printed circuit board in 3D

    PicoPico

    DavidVentura/PicoPico

    Pico-8 Player

    57 parts141
  • 4 layers129 × 104.6 mmPC-1100X, the printed circuit board in 3D

    PC-1100X

    zscircuits/zs1100a

    All files hardware and software related to the zs1100a

    528 parts76

Questions

How big is the Tachometer PCB?

It measures 91.4 × 50 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Tachometer use?

55 parts, built around the BC817 and TDCG1050M. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Tachometer KiCad files?

From the mkousal/Digital-electronics-1-Tachometer repository on GitHub, at the commit this page was made from: the board is hw/tachometer/tachometer.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Tachometer design in my own project?

Its repository states no licence, so its author keeps all rights: ask mkousal before reusing the design.