ESP32 DIY Digital Readout
EspDRO reads and proxies data from SPC capable (serial) digital calipers and indicators without any additional electronic components but using instead the built-in ADC in ESP32. It enables building custom, high-resolution measuring instruments, fully capable DRO (Digital Readout) panels for CNC/3D Printers, upgrade open-loop robots to closed-loop, point cloud 3D scanners, etc.
It costs $10-$20 to build (excluding instruments and time) and it's only 500 lines of code - it's amazing how powerful and affordable IoT chips (like ESP32) have become.
Reads and re-transmits the instrumet data over multiple channels:
Protocol and interfacing:
Other (fine touches):
Web view
Schematic
Video of it in action
This project started with my need to diagnose the positioning errors in one of my 3D printers: I had both 1-micron and 10-micron resolution indicators and calipers but measuring manually (write down readings from the instrument LCD) would have taken way too much time and effort. Since I had an ESP32 laying around, I figured I'd give that a try and I was amazed how easy it was to automate the whole thing: command the 3D printer via G-Code, then read the calipers/indicator via ESP32. Of course that in the process of building the instrument people seeing the data started asking for the firmware, so I decided to put some "finishing touches" (yeah, that really means 10x more lines of code :) ) and publish it, but also as a PIF for others that have posted useful guides around this space and helped me build this quickly. That's how #EspDRO came up.
Software prerequisites:
Arduino IDE (1.8.6) with ESP32 support, including esp32fs filesystem uploader plugin
Hardware prerequisites:
Validate the cable works and the pinout in the firmware is correct. If you have an oscilloscope, the signal should look like this:
Flash the webserver files (Tools->ESP32 Sketch Data Upload) and then upload the sketch/firmware. Start the serial monitor and you should see something like this:
Note: If you don't have an oscilloscope and the data is not coming through, there is a 'debug' serial command which you can use to calibrate the Analog Digital Converter. This will also tell you if the pins on ESP32 are actually getting any analog data, as different dev boards have the ADC1_0 and ADC1_3 pins mapped differently than DevKitC above.
Now navigate to the main page and set up WiFi: