2
\$\begingroup\$

I am making a DIY digital caliper, more on the project you can find here.

From various places I found how to design the patterned for the PCBs and with a scope I measured existing calipers to determine what signal are being generated.

Now to calculate the displacement I need to measure a voltage across a capacitor. This voltage looks like this:

enter image description here

My idea is to use to use op-amps to buffer, offset and then amplify this signal. Unfortunately I have never design such circuitry. Can you point me in the right direction, so I can read this signal properly with the STM32F103 ADC?

And also this signal spans from -300mV to +300mV. How come it drops under GND since I don't drive anything lower than GND?

enter image description here

Cheers, M

\$\endgroup\$
12
  • \$\begingroup\$ Welcome! Please post a schematic. \$\endgroup\$
    – winny
    Commented Apr 11 at 16:23
  • \$\begingroup\$ You can find everything on the git hub repo here : github.com/MitkoDyakov/BluePillCaliper/tree/main/Hardware \$\endgroup\$
    – DimDqkov
    Commented Apr 11 at 16:26
  • 1
    \$\begingroup\$ Please inline it into the question body, not as a link. \$\endgroup\$
    – winny
    Commented Apr 11 at 16:32
  • \$\begingroup\$ Looks a bit like LVDS, but I only see outputs in the schematic. Please clarify what node the oscillogram is taken from. \$\endgroup\$
    – winny
    Commented Apr 11 at 16:34
  • \$\begingroup\$ PB1 (the one with the grammar mistake) is the input to the MCU in question \$\endgroup\$
    – DimDqkov
    Commented Apr 11 at 16:57

1 Answer 1

1
\$\begingroup\$

I suggest you make a gain-of-one buffer with a CMOS op-amp and look at the waveforms on the commercial caliper and your circuit first. Your 'scope probe will be affecting the signals significantly.

Something like this (use a couple 9V batteries for the power for now):

schematic

simulate this circuit – Schematic created using CircuitLab

Keep the sense wire node very short or you'll get all kinds of noise pickup. The TL081 requires +/- supplies, you could try 9V batteries for testing.

\$\endgroup\$
6
  • \$\begingroup\$ Will do, need a few days to get the parts. \$\endgroup\$
    – DimDqkov
    Commented Apr 12 at 8:58
  • \$\begingroup\$ I have created the circuit. I assume the resistor network is there to create an offset. On the non inverting input of the amp I get 1.60V (Vdd is set to 3.2V). I connected two 9V batteries in series. The node where the two batteries connect I tided to the board GND. I measure +9V and -9V on VCC+ and VCC- of the op amp. The wire that connects the signal and the input of the op amp is just a few mm long. On the scope I don't see my signal, it shows -5V and a flat line. I will try with another op amp I might have killed the . \$\endgroup\$
    – DimDqkov
    Commented Apr 16 at 9:42
  • \$\begingroup\$ I can connect one of the PWM signals to the op amp and I will see the same signal with 1.6V offset right? I want to check my soldering work. \$\endgroup\$
    – DimDqkov
    Commented Apr 16 at 9:52
  • \$\begingroup\$ I guess I have zapped the first amp as I don't have any static electricity protection on my workbench. With the new IC get the same signal as before but offset about 2V in the positive direction. You can see the screenshots of the scope here: hackaday.io/project/194778-diy-digital-caliper/log/… as I cannot put pictures in comments \$\endgroup\$
    – DimDqkov
    Commented Apr 16 at 11:16
  • \$\begingroup\$ Unfortunately I don't have any way to access the pads on the commercial caliper. The closes thing I can give you is a readout of the signal from a third party it is in the build log. \$\endgroup\$
    – DimDqkov
    Commented Apr 17 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.