Skip to the content
2 layers90.2 × 48.3 mmBike logger, the printed circuit board in 3D

This project does data analysis of parameters from an E bike, in order to do accurate range estimations.

Size
90.2 × 48.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
108
Nets
47
Pads
335
Tracks, vias
1,356, 128
Pours
3
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
19 Nov 2020
Updated
2 Jul 2021

Overview

Bike logger is an open-source printed circuit board by MedadRufus, from the MedadRufus/MastersProject repository on GitHub, published under the MIT licence. It is a 2-layer board of 90.2 × 48.3 mm with 108 parts on 47 nets, routed with 1,356 tracks and 128 vias.

It is built around the CP2104EK, ESP32-WROOM-32 and LSM6DS3, with the MS8607-02BA01, BAT54S and MMBT5551L among its other parts. Its parts include 26 capacitors, 25 resistors, 10 diodes, 9 connectors and 6 ICs. It belongs with the ESP32 boards of this library.

Main components

7

README

README.md

MastersProject

Requirements

Design a data logger for E bikes that can record:

It needs to

  • measure: battery current for output and charging(1mA precision), voltage(10mV precision), inclination of road, humidity(as proxy for rain), tempreature of battery, external temperature, e-bike velocity, accleration.
  • run off the battery pack
  • consume minimal power
  • be sturdy enough to survive near the battery pack
  • Measure the environmental values(temperature, humidity) without being affected by the system(e.g. heat from the battery)
  • measure at least 2 weeks of non stop data
  • option to auto upload to the cloud, when connected to wifi.
  • cloud dashboard
  • log data at max data rate of 1 sample per second
  • Needs to handle significant noise in power supply generated by Motor
  • Need to handle inductive currents from motor
  • Needs isolation from motor.

The idea is to see how estimate battery discharge profiles to do accurate range and state of charge estimations.

Hardware ideas:

  • Accleration/tilt from LSM9DS1. Tilt can be measured from sensor fusino on the mcu
  • Processor: ESP32
  • Current sensor: INA226, 500 kHz +/- 30% sample rate. Up to 36V.
  • GPS: Ublox with antenna

Overall System diagram

image

Basic physical design

image

Uses of sensor variables

Picture2

Software development

The following commands must be run as workarounds on the eBike Blackbox.

How to disable strapping pin function of the MTDI pin(IO12)

On the PCB, the MTDI pin, IO12, is connected to the SD card MISO pin. In order to boot up, IO12 must be held low. Otherwise, it will brownout.

Some explanation can be found on the documentation.

text
If driven High, flash voltage (VDD_SDIO) is 1.8V not default 3.3V. Has internal pull-down, so unconnected = Low = 3.3V. May prevent flashing and/or booting if 3.3V flash is used and this pin is pulled high, causing the flash to brownout. See the ESP32 datasheet for more details.

Unfortunately, when SD card is inserted, MISO pin gets pulled up, causing continuous resets(boot loop).

So to disable this strapping function, we need to set the efuses to disable its functionality.

So we need to install esptool. On windows 10, using conda terminal, run:

bash
pip install esptool

Then run the following command to actually set the fuses. Set the -p argument to the port your esp32 is connected to.

bash
python -m espefuse set_flash_voltage 3.3V -p COM6

You should be done now!

References:
https://www.esp32.com/viewtopic.php?t=5970
https://forum.micropython.org/viewtopic.php?t=4387#p25381

Parts

108
QtyValueFootprintReferences
22TestPointTestPoint:TestPoint_Pad_1.0x1.0mmTP1, TP10, TP11, TP12, TP16, TP17, TP18, TP19, TP22, TP23, TP24, TP25, TP27, TP28, TP29, TP30 +6
19100nFCapacitor_SMD:C_0402_1005MetricC1, C2, C3, C6, C10, C13, C17, C18, C19, C20, C21, C22, C23, C24, C25, C26 +3
15RResistor_SMD:R_0402_1005MetricR1, R2, R5, R6, R15, R16, R17, R18, R19, R20, R21, R22, R23, R24, R25
84.7kResistor_SMD:R_0402_1005MetricR7, R8, R9, R10, R11, R12, R13, R14
8BAT54SPackage_TO_SOT_SMD:SOT-23D1, D2, D4, D5, D6, D7, D8, D9
41uFCapacitor_SMD:C_0603_1608MetricC5, C14, C15, C16
4Conn_01x04Connector:NS-Tech_Grove_1x04_P2mm_VerticalJ4, J5, J6, J7
4MountingHole_Padcustom_footprints:MountingHole_2.7mm_M2.5_customH1, H2, H3, H4
4SW_Push_1571563-4custom_footprints:SW_1571563-4SW1, SW2, SW4, SW4_reset1
3Conn_01x04TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_HorizontalJ2, J8, J9
210kResistor_SMD:R_0402_1005MetricR3, R4
210uFCapacitor_SMD:C_0603_1608MetricC4, C11
2MMBT5551LPackage_TO_SOT_SMD:SOT-23Q1, Q2
110uF 100VCapacitor_SMD:CP_Elec_6.3x7.7C12
1BAT54CPackage_TO_SOT_SMD:SOT-23D3
1CP2104Package_DFN_QFN:QFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mmU5
1ESP32-WROOM-32RF_Module:ESP32-WROOM-32U1
1LEDLED_SMD:LED_0402_1005MetricD10
1LSM6DS3Package_LGA:LGA-14_3x2.5mm_P0.5mm_LayoutBorder3x4yU4
1MS8607-02BAPackage_LGA:LGA-8_3x5mm_P1.25mmU3
1Micro_SD_CardConnector_Card:microSD_HC_Hirose_DM3AT-SF-PEJM5J1
1USB_B_MicroConnector_USB:USB_Micro-B_Molex-105017-0001J3
1XC6210Package_TO_SOT_SMD:SOT-23-5U2
1XP_Power_STHcustom_footprints:STH0548S3V3U6

More from MedadRufus/MastersProject

1
  • 2 layers29.2 × 16.5 mmCurrent voltage sensor, the printed circuit board in 3D

    Current voltage sensor

    MedadRufus/MastersProject

    This project does data analysis of parameters from an E bike, in order to do accurate range estimations.

    11 parts2MIT

Similar boards

  • 4 layers158 × 95 mmFHNW Pro4E FS19T8-3DPrinterBoard STM32, the printed circuit board in 3D

    FHNW Pro4E FS19T8-3DPrinterBoard STM32

    mnemocron/FHNW-Pro4E-FS19T8-3DPrinterBoard-STM32

    Marlin 2.0 compatible 3D printer board based on STM32F103 (KiCad)

    264 parts17GPL-3.0
  • 2 layers59.2 × 41 mmBluey, the printed circuit board in 3D

    Bluey

    electronut/ElectronutLabs-bluey

    Nordic nRF52832 BLE development board with sensors.

    79 parts96
  • 4 layers68 × 68 mmSilence, the printed circuit board in 3D

    Silence

    atx/silence

    A current controlled LED strip driver.

    149 partsCC0-1.0
  • 4 layers210 × 82 mmAuxController, the printed circuit board in 3D

    AuxController

    SolarEnergyRacers/solar_car_control_system_v6

    solarenergyracers.ch - control system (AC, DC, MC), Documents

    118 parts
  • 4 layers91.4 × 88.4 mmSAcre, the printed circuit board in 3D

    SAcre

    Cosmin-DB/SAcre

    Diseño electrónico de un dispositivo portátil basado en ESP32.

    93 parts
  • 2 layers36.2 × 36.2 mmDrone PCB, the printed circuit board in 3D

    Drone PCB

    PlumPot55/PCB_Designs

    Source Files of our PCB we did as a community

    50 parts15
  • 2 layers76.3 × 49.6 mmEls esp32, the printed circuit board in 3D

    Els esp32

    guidoschreuder/els-esp32

    Port of Clough42's electronic leadscrew to ESP32

    63 parts6

Questions

How big is the Bike logger PCB?

It measures 90.2 × 48.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Bike logger use?

108 parts, built around the CP2104EK, ESP32-WROOM-32, LSM6DS3 and MS8607-02BA01. 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 Bike logger KiCad files?

From the MedadRufus/MastersProject repository on GitHub, at the commit this page was made from: the board is Bike_logger/pcb/pcb.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Bike logger design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).