I design my own digital caliper based on STM32F103 blue pill (and more).
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
Hello all,
There are a few people that were interested in the project. It would not be very fun if you don't have hardware to tinker with. So you got two options.
A - Is to get the files gerber files and the BOM from the repo and make yourself a board with the STM32
B - You can order a Type 2 kit from my tindie shop
There are a few differences to consider A is cheap to make. It is only 2 layer PCB and you can scavenge a blue pill to take the parts. But this comes with a cost of lower resolution.
Example B is a bit nicer you can choose what XIAO board to use and it better resolution. But it is 4 layer board and a bit more expensive.
Cheers,
M
Hello all,
This is how the fix looks like
Now it looks quite bad, but it works kind of good. This is wat we have now on the ADC pin of the XIAO
Now there are a few differences. Because the excitation pads are smaller the charge on the them is smaller and the useful signal is smaller. This makes the noise to signal ration bigger. And this is why we see a bit fuzzier signal.
The high part of the signal is sloped. My theory about that is there is a bit of overshoot on the excitation signals. This is normal since I soldered a bunch of signals.
A think when I put the shift register on the board this will be mitigated to a large extend.
Time for some KiCAD action.
Cheers,
M
Hello all,
I wrote on the previous build log that we have a different flavor of HW. For now we will call it type 2.
I was hoping that this would be just scaling the bigger footprints down and subtitling the MCU with headers, but it was not meant to be like that :)
When I got the the hardware I saw this on the scope.
I was thinking at first it is noise from the switching of the PDM and I added some RC network to each pad. This only made the thing worse. Also I was thinking that the XIAO boards are noisy. Even I striped the copper surrounding the T-scale thinking that it was picking up some noise. The problem becomes obvious once we zoom in even closer.
This is what one of those peaks look likes on the 2us scale. For the original hardware running the ST I was using port register to switch the state of the excitation pads all at once. But running the XIAO board I was switching them one by one and then we get this ladder effect.
Now the quick solution would be to do the same for the XIAO board, but not all the pins are on the same port. Further more what happens if we put RP2040 or other controllers. We need a way of switching everything robustly and with every MCU provided.
The solution for now would be to add a shift register like the 74HCT595D from NEXPERIA. I have some laying around and will make a test.
Also for bonus points a played around with the signal generation and I have modified the pattern a little bit so we get even nicer signals. You can get it from the repo.
Cheers,
M
Hello together,
Here you can find the necessary files to create your own boards. Since the design is two layer only it is possible to CNC the boards. You should only take care to isolate the back of the board where the scale is sliding with some tape:
Here is the link: https://github.com/MitkoDyakov/Calipatron/tree/main/Hardware/V1.2
You will find:
If you like the project and you want to join now is a good point. Still the project has a long way to go and it could be improved, but I feel the HW is in a working state and could be used in POC for your intended use.
Cheers,
M
Hey everyone,
I know it is been a while. The project is still alive. I just had a rough patch designing PCBs for the project. For some time I did not had s solution for the noise problem, but now I do and here is the update. I tried addressing it with a the twin t-notch filter. That was not eliminating the problem, but rather putting a band-aid on it. Also fixed a few other minor things.
I now feel good about the CALIPATRON V1 that I recommend interested people to get some boards to experiment with. To do this in the near future I will upload schematics, gerbers, component position files, BOM and assembly schema. If on other hand you want a complete board you will be able to find some on the tindie shop.
Cheers,
M
Hello all,
I decided to add a twin-t notch filter between the op-amp and ADC input of the MCU. This is the schematics of the filer and values used:
I build the on a proto board, cut the trace between the op-amp and MCU and connected everything together, with thin wires.
And running the software from the repo, we get the following results on the Serial Oscilloscope:
I think this is quite workable. From now on I think it is battle with the software :)
**But thinking more and more we need to count pulses anyway. If we write the software cleverly enough we might get away even without the filter.**
Cheers,
M
Hello all,
First lets do a resume of what I have done so far.
The challenges that stand before us
We are changing pin state every 15us. ADC conversion takes 2-3us and transmitting 5 chars total of 40bits over 115200 baud rate UART takes 347us without accounting for function calls and such. This means that we could not use Serial Oscilloscope to "see" in real time. Rather we could take a snapshot using DMA and then transmit the values over UART. This is picture of the 50Hz noise using the Serial Oscilloscope. You can clearly see when I am touching the board.
Since a few people have asked me I have uploaded the working version of the software both CubeMX and Arduino. Note that we do not have a algorithm for working out the distances yet as I was working out the signal conditioning schema.
Cheers,
M
Hey!
We have new hardware version for the main board of our caliper. There are two major update.
1. There is an op amp on the board for signal conditioning. You can take a look at the schematics
2. Update regarding mounting the board. You can find more from Ryan's post
Other smaller changes include:
If you want to join the project you can get hardware from PCBWay. Gerbers are available on GitHub if you want to use fab house of your choice.
Next major steps would be to actually get a measurements from the thing :)
Cheers,
M
Working on the back of Mechanical Stuff project log; we worked on giving the caliper's T-scale a solid backing to create a stiff backing.
We started with the idea shown below but it was going to be a expensive part to machine given the 3 faces that would be machined.
Overly Complex Rail/T-scale backing
Given that we wanted a slider and rail set up, we didn't re-invent the wheel and I did a mock up for an assembly using a linear rail. This would provide a cheaper and higher tolerance slider and rail then anything I could custom design. The assembly consists of 6 main parts; rail, slider, base plate, 4x posts, T-scale PCB (Green), and the caliper PCB (Blue).
The rail critical dimensions are wider then 18mm and thinner the better. Looking at Hiwin, THK, or Misumi to find a high quality linear rail.
We also need to figure a good way to adhere the T-scale PCB to the rail. It is possible that PCBway or JLCpcb has adhesive coated PCBs off the shelf, double sided tape, or super glue.
The posts shown below are from McMaster, part no: 93655A718 or 98952A065. These are the 22mm tall but might change to 21mm depending on what will work best.
The base plate is a planar part so it can be laser or water cut to make it cheaper part to machine. I want to see if we can get it made from Aluminum MIC6 given the greater flatness then most stock materials, although probably going to make it either from plastic or Aluminum 6061 T6. The position of posts on the lower half are closer to the linear rail's block to prevent any droop of the caliper PCB.
Hey!
I am waiting for some parts to arrive and in the meantime I decided to get the display running. Unfortunately I messed up the footprint and wiring was backwards. A quick work with the cutters and the soldering iron I turned the display 180° and it worked just fine! Now you can't push the buttons - but this I can fix on the v1.1 of the board.
Shout out to afiskon for creating a lib that runs on STM32 for the SSD1306 controller. You can find the code at his git hub repo. It was a breeze integrating it!
Cheers!
M
Create an account to leave a comment. Already have an account? Log In.
We still don't have running example. Not long ago we where dealing with hardware issues. As soon as we get some viable example we will post it. Please stay tuned.
Being as obsessed with calipers as I am I'm totally going to make this one of my first projects I try with my new PCB mill. It looks like you're using capacitive touch or something very similar. I wonder if it would be possible to make the slide component double as a MIDI keyboard.
Actually it is 2 layers on the PCB, so CNC milling will be perfect. I would do digital MIDI trombone if I was you :D
DUDE that is freaking GENIUS! That is so much more badass and clever than whatever I would have thought up. I'm capable of making any changes that might make a milled PCB more reliable and will absolutely shoot them back to the documentation so they can be added if so. If there's any changes that are too complex for me I'll shoot them your way and you can decide if they're worth your time to either help me or do yourself. I don't expect anything so no worries there.
While I'm FAR from as capable on CAD as I should be by now I've been 3D printing since ~2011 (FDM and mSLA) so I'll take a crack at designing a printed enclosure to chuck back upstream as well. Once I have a useable stock board (unedited except for maybe small changes to make it more millable) I'll post and let me know if you want a couple, I'd love to be able to add to the project. The workflow I've been creating creates what I call "80% PCBs" (I actually think they're going to be better than 80% of what professional fab houses can do but it's kind of a play on the 80% AR receivers that can be completed at home legally, shut up I thought it was funny haha). They're milled, black or green (I prefer black but can do any color, black and green is what I have on hand though) solder mask applied then either laser or CNC etched (haven't decided which gives results i like better yet - oh yeah I have a laser engraver too), and the last thing I'm working on is the silk screening. Luckily that's an established, pretty easy concept I'm just trying to adapt the screen creation process to be laser cut for better results. I recently discovered that xTool offers a laser cut silk screening setup so I'm trying to figure out exactly what they use for their screen creation for the best laser cutting, although I'll probably end up buying their screen system as - though pricey - it allows multiple screens to be used with a single frame that stretches the screens out when locked in. Not having to have a seperate frame for each circuit design would be huge (especially with how relatively tiny PCBs are) as that cost adds up super fast. I'll update as I make progress, thanks for the warm welcome!
I love your enthusiasm!!! I am always down for a fun project, so send schematics, models etc. and I will review them. Note that I don't have formal educations about this, so I figure stuff as I go :)
Very interesting. I'll keep it brief... I'm one of the founders of a popular open source CNC firmware. When testing normal calipers I noticed that there's a huge time delay between the measurement and the actual position, rendering it virtually useless for motion control. It's probably because there's no need to have a fast measurement. What I'd like to see is if I can combine the timing of the diy caliper with (fast) motion of a known frequency and time delay. I'm particularly interested in a linear encoder here, ideally absolute, but response time is key here.
I am aware of glass scales and rotary encoders. They all have their advantages and perks.
If you have a design with schematics and some pcb's somewhere, I'm happy to just order a few and test it out. Also feel free to drop a message.
I'm curious exactly what kind of delay you're talking about, because my Mitutoyo calipers seem pretty instantaneous. If you're talking micro-seconds though that's entirely moot as my dumb meat eyes can't even detect that fast.
The cnc firmware i work with has a step rate of 125 kHz. Not even my mitutoyo calipers give data at that rate. I need to know the delay between motion and measurement, the delay between measurement and data (observation) and information about the consistency/delay of the timings.
I'm really excited about this project too! Would it be a good time to try reproducing it? I'd like to see if it can be made slightly smaller, and used as an encoder for a linear axis. Looking forward to future updates. :)
Thank you for the comment, we have a new version of the PCB. I am going to test it next week and if all is fine I will post the schematics and the gerbers on the git repo for everybody to play with. I do have a few extra board I could send your way if you want to join the project. Just send me a pm.
Thinking about the mechanical stiffness issue. I propose trying to bond the pcb to a piece of glass with superglue or uv cure.
I remember watching this [video](https://www.youtube.com/watch?v=c7A6QDj5Lbw) by diffraction limited showing that glass is surprisingly flat and looking it up on ebay it doesn't seem prohibitively expensive.
Love the project btw! Very interested to see how accurate the diy digital calipers can get.
The glass would defiantly work for the flatness, but there are more things to take into account such as alignment and repeatability in movement. And to be hones its remarkable how much stuff I drop on a daily basis, so the glass will take a beating. On the mechanical front Ryan made a lot of progress.
Thank you for the comment, we have a new version of the PCB so stay tuned.
If you get rid of the edges, simple U or square aluminium extrusion profiles are also remarkably straight. Looking forward for the new PCB, I have a nice application in mind where this could be very useful.
Become a member to follow this project and never miss any updates
By using our website and services, you expressly agree to the placement of our performance, functionality, and advertising cookies. Learn More
hi where is software?can i make this caliper by arduino?what is the code in arduino?/
tnx