-
Type 2 Hardware available.
9 hours ago • 0 commentsHello 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
-
Type 2 hardware fix
10/24/2024 at 15:19 • 0 commentsHello 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
-
Calipatron type 2
10/22/2024 at 08:05 • 0 commentsHello 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
-
Production files
09/15/2024 at 12:23 • 0 commentsHello 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:
- gerber files
- POS files
- Schematics
- mounting diagram
- BOM
- KiCAD footprints
- step models
- 3D renders
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
-
We are still kicking!
09/11/2024 at 11:28 • 0 commentsHey 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.
- T-scale bar was wrong. The board was kind of working with the old one (on top) so it did not made an impression on me at first. But digging into the project it was getting clear that there was something off with the signal we puck up. Also for bonus points I added millimeter scale silkscreen.
- On the front of the board. I finally fixed the display pinout. It took me a few tries. I added the twin T-notch filter and ran the ground closer to the excitations signals. We have a name "CALIPATORN" - I did not come up with the name :|
- The big big change is on the back of the board and the one that brings the major improvement. What should strike you is the keep out area around the excitation/pickup pads. The ground plane was the source of the 50/60hz noise. When the T-scale was out of alignment it coupled with the ground and introduced the AC signal through the op-amp which amplified it and we could clearly see it on the measurement
The board above is our technology demonstrator. There are many other MCU on the market that are both cheaper, faster and with more feathers than the STM32F103. There are also people that don't like ST MCU in general. To address this I am working on this board. This contains the power supply and the op-amp part of the tech demo, but has a socket that holds XIAO style board. The good part is that you can have Arduino, Raspberry Pi or ESP-32 powered Calipatron. This board has a few glitches to iron out, but I will get there soon.
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 -
Adding Twin-T notch filter
07/27/2024 at 16:51 • 0 commentsHello 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 -
Project udpate
07/23/2024 at 19:51 • 0 commentsHello all,
First lets do a resume of what I have done so far.
- All 8 pins of GPIO Port A (10-17) are connected to the excitation plates of the sensor. We are implementing bit banging to run excitation pins. TIM2 is set to interrupt every 15us. In the timer ISR the pins are changed according to the array with predefined values. The pattern repeats indefinitely. The pin state array is populated according to what we see from the caliper disassembled before.
- ADC1 channel 9 on pin 27 is used to measure the voltage of the pick up plate
- I2C1 is supposed to be used for the display, but I still managed to wire it the wrong way. See earlier log for more info.
- USB is working and we use as CDC. We can use it in collaboration with Serial Oscilloscope to see the output of the pick up plate.
- UART1 is wired to a header, but not used at the moment.
- SPI2 is connected to the Op Amp, gain can be adjusted.
- SWD for programming and debugging both with CubeMX and Arduino.
The challenges that stand before us
- I went through a bunch of patents. In all of them they say that this frequency of 15us is determined on the physicals size of the sensor. Unfortunately it does not gives a formula to determine the frequency. In my ignorance I made the sensor a bit larger thinking it might be easier to manufacture. If we compare the signal from the original caliper and our they are similar but not the same. Some experimentation might be need so that the output match.
- Since we added the op amp we have 50Hz noise on the analog input of the MCU. I would assume this is due to the noise of the AC power all around us. In the States people might pick up 60Hz. This could be fixed in two ways. One is to implement a Notch Filter in software and the other would be to do it in hardware. This means a new version of the PCB which I cant justify right now. We have not gotten all out of this one.
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 -
Hardware V1.1
06/29/2024 at 18:11 • 0 commentsHey!
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:
- Fix for the display
- Power is only supplied from the USB and go through low noise LDO
- Boot selector pins are removed and solder jumpers are put instead on the back
- Removed the SN65LVDS1DBV
- Rearrange the debug header, so that a ribbon cable assembly can be used instead of jumper cable (for stlink v2 only)
- Added vias on the peripheral of the board to help with noise.
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
-
Mechanical Assembly Update
05/04/2024 at 21:33 • 0 commentsWorking 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.
-
Notes for the next version.
04/21/2024 at 16:45 • 0 commentsHey!
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