Data Logger Shield

Shield for NUCLEO-F103RB, it's a logger of pulses received from four external devices. Has WiFi, sdCard, keyboard and LCD.

Public Chat
Similar projects worth following
- pulse counting from four different devices
--- SMA connectors are used
--- logic level from 3V3 to 16V
- gathering data via UART
--- DB9 connector is used
- user interface
--- LCD 128*160 RGB
--- four push button to manipulate the GUI, standard usage so up/down/left/right
--- dimming LCD when it's getting dark
- UART over USB socket to transfer logged data
- microSD card to permanently save logged data
- WiFi to remotely transfer logged data.


PCB was designed in Kicad6 and will be routed in TopoR, so it will look a bit weird, yes... take a look on Google Images how those PCB looks like :)


Firmware is being created in C, CubeMX was used to configure hardware peripherals. Eclipse is used as IDE.


In order to cut time needed for development and make possible software development before assembling the hardware, a PC based simulator for firmware was created.

Simulator was done using Python+Qt, it uses firmware compiled to .so object.

Below you can find a screenshot from early state of the simulator (when the project was less generic, since e.g "Generate GM pulse" because originally it was intended as logger for GM counter). The simulator is heavily outdated but core concept and implementation is ok.

Adobe Portable Document Format - 268.27 kB - 09/03/2021 at 12:14


  • SD card support

    Robert08/30/2021 at 20:49 0 comments

    SD card works OK, here are interesting things that I've learned:

    • There are two protocols to communicate with SD card - SPI (slower, but easier) and SD bus, some cards will not work with SPI
    • The SD card can draw up to 100mA when writing data!
    • As usual, it's good to add small resistors in series to all pins that are accessible from external, user can insert or remove card, so all data ports can be considered to be accessible from external. This is to prevent ESD damages. For SD card those resistors are in range 40-50R.
    • It's good to add pull-up resistors to all data lines, otherwise some cards will not work. There are chips on the market with pull-ups and in-series resistors.

    Info from: [1], [2]

    The prototype is now a bit bigger than before, because I've decided to cannibalize data logger board for Arduino - back when a shipment from China was for free (in Europe) I'v bought a couple of them - just in case. I don't really need therm since I don't do a lot of Arduino, and this saves me on buying SD card slot and RTC clock. I will add an RTC clock to the design. 

    The SD slot was a bit problematic, finally I've de-soldered it to see bottom side and how the card is really connected. It's weird for me because they didn't ignore pin #9, it's accessible even when AFAIK it's unused. So the pinout is like this 9, 1, 2, ..., 8, extra pins for check write protection. 

    In the next step I plan to setup ESP32, it will involve probably soldering new breadboard to the prototype :)

  • Reduce amount of elements on PCB, but keep functionality

    Robert08/27/2021 at 16:39 0 comments

    I've got a small success in  reduction of  amount of components on the PCB, I tested it on the breadboard -presented before- and i works fine.

    First, I tried to remove the pull-up resistors for switch buttons, below is the original diagram. BTW note that on this schematic there is no low pass RC filter, the filter is used for key de-bouncing, it's used in many open hardware projects, but this can be done in software too.

    Below is actualized version.

    This is possible because STM32 has possibility to configure GPIO as having internal pull-up resistor (it can be an internal pull-down too), so this resistor is still on the schematic, but now I'm using the one build-in into the microcontroller.

    Below you can see it on CubeMx.

    Note: I still didn't decide to which GPIO connects the key-left and key-right, so those are not configured.

    Another IMHO cool optimization is in setting the brightness of the LCD, originally I've planed to use discrete solution that would be driven by PWM.  The ST7735S LCD module has a separate pin for LCD brightness, I was thinking that the actual current for backlighting is needed to be provided to this pin. This is not true, it's just a logic signal, that goes to the SOT-23 chip on ST7735S. 

    The previous version is presented below.

    All the bottom part might be removed, because very little current is in real taken from GPIO port and there is no need for buffering transistors Q3, Q4. The buffering is done by small chip on the LCD module. Below is the current version.

    I've also been able to communicate with the LCD.  Fun fact is that initially I used this lib for ST7735S, but I didn't notice that it's for 80x160 displays. Mine is 128x60. Fortunately, I've found this lib for ST7735 - this one handles my LCD well. From the other side, invocations of HAL functions are a bit hardcoded with business logic, so in order to bring my PC variant for simulation of the device to live, I will have to do a bit of refactoring. 

    My next steps will be checking circuit for SD card.

  • Bread-board circuit for testing LCD and keyboard

    Robert08/25/2021 at 14:51 0 comments

    I've created a draft of the device using bread-board to check if I correctly connected LCD to stm32 nucleo and to have something to do driver development before ordering PCB. In addition I've added to the board up/down/left/right keys.

    Connections changes to original schematic:

    LCD connection:

    • RST - PC7
    • DC - PA8
    • CS - PB2


    • up - PC3
    • down - PC2
    • left - PC14 (TODO: move it somewhere else)
    • down PC15 (TODO: move it somewhere else)

    I've also tried to solder the part responsible for dimming the LCD but having only MOSFETs in SOT-23 package, it seems to much to work.

View all 3 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates