Close

Reduce amount of elements on PCB, but keep functionality

A project log for Hardware Data Logger

Easily extendable data logging platform featuring STM32F103RBTx, WiFi, microSD storage, LCD with four buttons, UART, and pulse counters.

robert-gawronRobert Gawron 08/27/2021 at 16:390 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.

Discussions