Skip to content

Reading data to PC from a cheap multimeter – 5

Now comes the trickiest part, to capture the pulse with a STM32 blue pill board and send it to computer via serial. I will use arduino for programming. The pinout I have found for the particular PCB board of my multimeter is as following.

  • 1 Segment 1 > d
  • 2 Segment 1 > c
  • 3 Segment 1 > b
  • 4 Segment 1 > a
  • 5 Segment 1 > f
  • 6 Segment 1 > e
  • 7 Segment 1 > g
  • 8 Segment 2 > d
  • 9 Segment 2 > c
  • 10 Segment 2 > b
  • 11 Segment 2 > a
  • 12 Segment 2 > f
  • 13 Segment 2 > g
  • 14 Segment 3 > d
  • 15 Segment 3 > b
  • 16 Segment 3 > f
  • 17 Segment 3 > g
  • 18 Segment 4 > a+b
  • 19 –
  • 20 COM
  • 21 Segment 3 > e
  • 22 Segment 3 > a
  • 23 Segment 3 > c
  • 24 Segment 2 > e
  • 25 battery low
  • 26 HV
  • 27 10.00
  • 28 100.0

Before programming, we have to connect the blue pill to the lcd pads. this is pretty much straightforward. I have started with the pin 1 of the blob ic and pin B1 of the blue pill and after pin C14, started with B1 while skipped A9, A10, A11, A12(reserved for later use). The pin connection clearly can be found in the github code in the void setup() function.

There are another 3 pads of lcd that does not comes from the blob. These three lines comes from the top-left resistor marked as 224. I have connected those from pcb trace as seen in the following image:

3 PCB trace shown with 3 red lines. Those are counted from right side(3-2-1)

At first, i have made a wrong decision, connected the wires directly to the pins of blue pill. This caused a loading effect and a garbage is shown to the LCD. Than i have connected 10K resistor in series between every connecting wire. 10K resistor drops the voltage too much that the bluepill does not get any signal as the ac voltage output to the LCD is about 2V. After that i have connected with 5.6K resistor, this gives a signal. A code like the following is used to get the output.

int num=0;
void setup()                                                      
{
  Serial.begin(115200);             
  pinMode(PA15, INPUT);                       
  pinMode(PB11, INPUT);                       
  pinMode(PB10, INPUT);                       
  pinMode(PB1, INPUT);                       
  pinMode(PB0, INPUT);                       
  pinMode(PA7, INPUT);                       
  pinMode(PA5, INPUT);                       
  pinMode(PA4, INPUT);                       
  pinMode(PA3, INPUT);                       
  pinMode(PA2, INPUT);                       
  pinMode(PA1, INPUT);                       
  pinMode(PC15, INPUT);                       
  pinMode(PC13, INPUT);                       
  pinMode(PB12, INPUT);                       
  pinMode(PB13, INPUT);                       
  pinMode(PB14, INPUT);                       
  pinMode(PB15, INPUT);                       
  pinMode(PA8, INPUT);                       
  pinMode(PA15, INPUT);                       
  pinMode(PB3, INPUT);                       
  pinMode(PB4, INPUT);                       
  pinMode(PB5, INPUT);                       
  pinMode(PB6, INPUT);                       
  pinMode(PB7, INPUT);                       
  pinMode(PB8, INPUT);                       
  pinMode(PB9, INPUT);                       
  int i = 0;                                  
  attachInterrupt(PA15, isr, FALLING);
}

void loop()                                 
{  
  //Serial.print(num);
  //Serial.println(num);
  delay(50);
}

void isr()                        
{
  delay(1);
  Serial.print(digitalRead(PA15));
  Serial.print(digitalRead(PB11));
  Serial.print(digitalRead(PB10));
  Serial.print(digitalRead(PB1));
  Serial.print(digitalRead(PB0));
  Serial.print(digitalRead(PA7));
  Serial.println(digitalRead(PA5));
}

This code gives output like 1101101 in serial console of the microcontroller.

After some tweaking with the code in another afternoon, it gave me output like the following image:

The code is available for download in my github account here. Any contribution is welcome!

Here is a gallery of the final project.

Leave a Reply

Your email address will not be published. Required fields are marked *