Testing the precision of Elegoo Mars – Volume 5: What’s wrong with the Z-axis and how to fix it? (finally)

After publishing yesterday’s post I observed a strange thing – the lid of my Elegoo Mars came off during printing. The encoder I mounted on top of the Z-axis bounced it off. That was strange, how? And then it hit me. I have never, ever measured backlash of the bearings of the lead screw. I have only measured the backlash of the screw itself. Well, I think a video is worth more than a thousand words:

There is a play roughly 2 mm in the housing of the lead screw! I disassembled the printer:

The cause is clear – even the motor has a lead screw as shaft and therefore, you would assume it is designed for axial load, it is not. There are ordinary ball bearings (no axial nor angle contact bearings) and most importantly – there is a spring washer tensioning the bearings – just like in an ordinary stepper designed for purely radial load. This is, in my opinion, a clear failure of the motor manufacturer MOCOC TECH. Also, there is another source of problems – the silencer – as the screw is mounted in the motor and the rubber silencer is soft. The silencer probably prevents from resonating with the top plate of the printer and also creates a flexible element which can compensate for the axial misalignment of the screw and the nut.

When you combine this flexible play in the screw with my observation about forces present during printing, you get imprecise print height – up to the size of the play of the screw. It can shrink or squeeze your layers arbitrarily.

What is the solution? There are three solutions in my mind:

  • dirty & cheap – get two M8 washers, put them in the motor’s rotor, remove the spring washer and tightened motor body screws carefully to slightly tension the ball bearings. Also, remove the silent block. This is a solution for roughly 3 CZK. Warning: This is a dirty solution. Deep groove ball bearings are not designed for axial load nor tensioning. Also by removing the silent block, you remove flexible element which could compensate for misalignment of the screw and the nut. Your risk shorter life of the bearing, screw, and nut. On the other hand, the speeds and axial loads on Elegoo Mars are not that big, so you might be OK for years with this solution.
  • better solution – get a pair of axial bearings F8-19G and use them instead of the ball bearing. Pretention them either as in the previous case or with a hard spring washer.
  • The best solution – build separate housing for the screw with contact angle bearings and connect the motor via flexible shaft coupler. This solution provides noise reduction using the silencer. However, when you try this it might be worth it to rebuild the Z-axis to use a linear rail as the Elegoo solution of the Z-axis has a high effect-to-cost ratio, however, I can measure about 0.2 mm of play when I apply reasonable forces by hand.

As the G8-19G bearings are not available at my local store and I had to order them, I applied the dirty & cheap fix to find out what improvement can I get. Spoiler: a huge one.

I printed the test pieces from my previous posts (volume 1, volume 3, volume 4) and the problem practically disappeared. Compare the real size of the test piece before and after:

The full dataset can be found in this table (new measurements are from sample 10).

Most notably what changed is that if an error is introduced in a layer, it is compensated by the others. Therefore absolute precision is preserved. See that all the test pieces got practically the same height.

If you look at test piece 11, you’ll see it is quite distorted. It is the sample surrounded by a full plate of material. There was noticeable distortion, however, it was different compared to the previous cases. The overall test piece height was preserved, but the layers surrounded by material were a little bit higher. Just like first layers of other pieces. This is probably due to the effect I described in volume 4 (recommend reading before continuing). The effect is that the resin is viscous and as the build plate sinks, it has to push away the resin. When I introduced the delay to allow the resin to flow away and to settle the build plate in place I got much more precise pieces. On the simple pieces, even the first layers got the correct height. On the pieces with extra material, the distortion is still there, however it is much less significant. I believe by introducing even longer delay, we can get much more precise (I plan to do this experiment).

What struggles me is that instead of 3 mm I got 2.9 mm – pretty constantly. Therefore, I printed another staircase – 0.5 mm steps, 15 mm in total height (sample 15). I also got less – 14.7 mm. Currently, I have no idea what is this caused by – it not a constant error (not coming from incorrect bed leveling) and it is too large for shrinkage (2 % – epoxy or polyurethane resins have shrinkage less than 0.5 % and I don’t expect printer resin to be that different). Maybe tensioned bearings with misaligned screws cause step loses on the stepper. I am also not sure the error is linear – I’ll have to run many more tests. Any ideas what could it be caused by?

On the topic of lost steps – before the first print I releveled the build plate. When the print started, the build platform started to move down as expected. The build plate touched the bottom of the VAT and the stepper still continued – by the sound it clearly lost some steps. I am sure I have leveled my bed correctly. I leveled it against empty VAT. Is it possible the printer FW moves the platform a little bit below the zero point to pretention the Z-Axis to mitigate the problem with flexible housing of the screw? I don’t know, but this also something I would like to explore in the future.

After all, even there are still open questions I consider my Elegoo Mars to be used as I intended when buying it – to produce precise functional mechanical components.

Testing the precision of Elegoo Mars – Volume 4: More observation, no solutions

Since the last post I have made many more experiments regarding the Z-issue on Elegoo Mars.

First, I tried to mount an indicator to the Z-axis. I mounted it in the middle of the arm carrying the print bed and printed my test model. To analyze the results, I aimed my phone camera to the printer to capture the measurements. I performed both dry and an actual print run. You can find the whole, uncut footage of the experiment here (warning, it is really boring):

Then I took the footage and put the numbers in a table (direct link to the table):

Continue reading “Testing the precision of Elegoo Mars – Volume 4: More observation, no solutions”

Testing the precision of Elegoo Mars – Volume 3: New view on the Z-axis problem

In the previous post, I observed squashing of the prints in the Z-direction near the build plate (roughly first 20 layers). I have discussed the problem on the Elegoo group on facebook and some of the people suggested it might be related to viscosity or surface tension of the resin itself – when a thin layer of resin forms it can either push the build platform away from the print due to viscosity or it can pull the platform closer due to the surface tension. Therefore, I run some experiments.

I appended the results of my experiments to the table starting with sample 6 (direct link to the table):

There are several interesting outcomes. First, when I introduced a 40-second delay before exposure (sample 7) I was expecting to get things better if the problem is caused by the viscosity of the resin, which is pushing the build plate away. However, I would say it had nearly the opposite effect.

So I tried the opposite – to increase the drop speed. I observed no difference in the result. It might be caused by not actually increasing the speed – there might be a software limit in the firmware and I haven’t measured the actual speed.

The last experiment is the most interesting one. I tried to print the full print bed of the material with the staircase:

The object around the staircase is only 1.5 mm tall, the staircase is 3 mm tall. The first layers of this sample (number 9) have the height of the first layers nearly good (it might be related to the precision of leveling), however, once the object ends, it gets flat. See the graphs in the table and a photo:

I have then tried to print just a frame around the build plate, however, the results were the same as in previous experiments. Therefore the problem is not related to the lead screw (as it happens practically on an arbitrary height) and occurs whenever a large surface area of a layer is printed. It means that printing on supports is not the solution to the problem! Imagine printing a box – when the flat bottom ends, the walls near the bottom get distorted. Tilting the prints could help, however, it requires supports and on many of my planned parts, it is undesirable to put the supports on the sides as they are functional surfaces which should not be distorted (or it might be too much work to polish them up).

Interestingly enough there is one more observation – the layer height distortion happens only when the dense layer ends – in my test case the layers between 0-1.5 mm have a rather good thickness. From the table, it seems like the effect takes place once there is a vertical gap between large surface area on a build plate and the FEP film between 0.1-0.5 mm. However, I have no explanation of the phenomenon yet. Last what I struggle with is the fact that if it would be simple FEP film deflection, it wouldn’t cause a change in the total object height. I would expect the object to have the correct height as the other layers will be a little taller. This leads me to an idea of actually losing steps on the stepper driving the Z-axis. But I have not verified yet.

Do you have some observation, ideas? Please let me know! If you try to reproduce my experiments, let me know!

Testing the precision of Elegoo Mars – Volume 2: XY plane

As I mentioned in the previous post I am for printing precise mechanical components with Elegoo Mars. I have already tested the dimensional accuracy in the Z-axis direction. If I omit the precision problem near the build platform, it is sufficient enough.

The dimensional precision of the printed components in the XY direction is affected by the following constraints:

  • the display itself. Here I assume it is precise enough. If not, I could tweak display size in the slicer.
  • Exposure and “overgrowth”. If you cure the resin for a long period of time, some of the UV light gets reflected from the resin itself and therefore it exposes the resin around the exposed area. This leads to a bigger outer and smaller inner dimension. There are two ways to compensate for it – you can lower the exposition time or you can compensate in the slicer.
  • Linear shrinkage of the resin. Like all resins (epoxy, polyurethane, etc.) even the UV curable resin change their dimensions (usually shrink) during curing. Usually, the manufacturer provides information about shrinkage in the datasheet or you can try to measure it and compensate for it.

I have a rule – in the CAD I design the components as they should be in reality. I do not want to put any compensation in my CAD models. I want the manufacturing process to take care of them: e.g. the slicer does it itself or I have a script to post-process my CAD models. Luckily, ChiTuBox can compensate for all the sources above.

To compensate for LCD size, you can directly change its parameters in the default setting dialogue of the print. See image below. However, I think there is no need to do that.

To compensate for the overgrowth, you can only tune the exposure time in the ChiTuBox menu. However, this has a problem that incompletely cured layers, which don’t overgrow are in some cases not strong enough to support the print. Fox example with Elegoo Gray, exposure time of 4 seconds leads to quite precise components. However, if there are massive planes, the risk of breaking the prints are quite high.

Luckily, if you export the profile and open it in a text editor, you find out it is just a plain text file with key-value pairs. There are two interesting keys: edgeCompensationPixel and edgeCompensationTimePercent. I expect the first one to shrink the sliced by the given number of pixels using the traditional erode operation on images. It can be used to compensate for the overgrowth. The second one seems to scale the entire slice – which can be used to compensate for resin shrinkage. You just edit the values and import the profile back. A little inconvenient, but better than nothing.

Actually, the previous two paragraphs are not true. The compensation feature does not work and the experiments below are results of bad labeling of my files (I mismatched the exposure settings in them). I plan to publish a new post with corrected results and alternative solution soon.

To find the right values I modeled a simple test piece (Fusion 360 model):

These pieces should form a press-fit – they should go inside each other but the joint should hold and it should require some force to put them together.

Then I printed them twice for every setting – one set aligned to X and Y axes, one set tilted by 30 degrees in the Z-direction. The tilted set should verify how the joint behaves when it is not a nice straight line but is formed out of pixels. The printing was time-consuming as you have to print for each setting separately – I haven’t hacked the printer and process to support multi-exposure prints.

My results for Elegoo Gray are 5.5 seconds exposure time and edgeCompensationPixel is 2. I did not compensate for shrinkage as it is probably insignificant for the size of my prints. This gives me nice results really close to expected size and expected fits:

The only downside right now is that ChiTuBox does not support separate compensation for the first layers which are over-exposed to stick well to the build platform. Hope it will be available in the future along with the option to specify compensation parameters in the GUI.

Testing the precision of Elegoo Mars – Volume 1: Z-axis

I have recently bought a new SLA printer – Elegoo Mars. For 250 € it is a wonderful device (I have to admit there are some minor flaws, but for the price).

I am interested in making precise mechanical components with it. Small teaser – you can make herringbone gears with module M0.5 or even M0.3. Wonderful. However, during my experiments, I have found a strange behavior regarding the height of the components. It seems like the first 5 layers have a wrong height. Therefore, I prepared a test piece and performed some measurements.

The test piece is simple – it is a staircase with steps of 0.2 mm in the Z-axis and 1 mm in the horizontal plane. Then I printed the piece several times and measured the height of the steps.

Numbers 1, 2 and 4 were printed directly on the bed. Piece number 4 was printed on supports (3 mm height). See, that pieces 1, 2 and 4 seem to have a thin beginning. My measurements confirm that (direct link to the table):

As you can see the printer is quite precise, however, there seems to be something wrong with the first 1 mm of the Z-axis – once I lift the model on the supports, the problem disappears. Note that I sanded the bottom of the lifted model, as the overhangs are always a little bit convex. I examined the sliced files with Photon File Validator and they seem fine. Therefore there has to be something wrong in the printer – either buggy firmware or hardware error.

I haven’t found the cause of the problem yet – do you have any ideas what could it cause? Does your printer feature the same behavior? Test it and let me know. Here is the Fusion model: https://a360.co/2NlHemW.

DIY Through Hole Plating of PCBs

PCBs in China are dirt cheap. There’s no doubt about that. However, sometimes I’d like to have PCB right away and I also like to challenge myself in mastering technologies. That’s probably why I occasionally experiment with a DIY fabrication of PCBs. I have a nice workflow, where I can make 6/6 mil double-sided PCBs under 45 minutes of time and roughly 15 minutes of work. There’s however one limitation – my vias are soldered through-hole wires.

I’ve been thinking about though hole plating for several years. The general procedure is simple – you have to activate non-copper surfaces (make them conductive) and then you apply standard electroplating procedure. You can find many tutorials on the internet, however, most of the require hard-to-get chemicals for the activation solution. Few weeks ago, I noticed that the local electronic component supplier had started to sell Kontakt Chemie Graphit – a conductive paint. It’s basically a colloidal graphite in an organic solution. It is supposed to be used for making surfaces conductive to prevent static electricity discharges. This could be perfect for activation of the non-copper surfaces! So I gathered all the necesery chemicals and equipment and made a test run.


Continue reading “DIY Through Hole Plating of PCBs”

Testing the WiFi range of ESP32

I have a project, which requires long distance (approximately 1 km) communication, in my mind. Recently I got super excited about ESP32, so I thought why not to use it. After all, CNLorh has shown us that ESP8266 has a surprising range – over a kilometer.

I wrote a simple program for two ESP32s using PlatformIO and the Arduino framework (as working with wifi in ESP-IDF is kinda hell). Here you can find code for the master device, and here for the slave. Basically, Master setups AP, slave connects and the master sends UDP packets. If the slave receives a packet, it toggles an LED. That’s it.

The MH-ET LIVE module

The MH-ET LIVE module

The first test was unsuccessful. I took two MH-ET LIVE D1 modules and went outside. When I went around a corner of 4 storey building, the connection was lost. Sight-to-sight I was able to communicate on 150 meters.

Then I found out ESP32 supports the WiFi LR protocol. By using this protocol it should be possible to sacrifice communication speed and gain increased the range. This protocol can be easily enabled by calling the following function after the WiFi peripheral has started:

esp_wifi_set_protocol( WIFI_IF_AP, WIFI_PROTOCOL_LR )
esp_wifi_set_protocol( WIFI_IF_STA, WIFI_PROTOCOL_LR )

I did a second test. I could walk around the building and the communication was perfect. I didn’t observe a single glitch. Sight to sight I was able to communicate up to 200 meter. If I put the master roughly 2 meters above the ground, I could get 240 meters. Improvement, but not significant. However the reliability of the connection drastically improved with the LR procol. The connection was much better, however it was still rather a disappointment.

As a last resort I tried different hardware – I tried to cut PCB under antenna on the MH_ET LIVE D1 modules and I also tried to use the original ESP32 DevKit-C modules. I got roughly the same results. No improvement.

The MH-ET LIVE module after modification

The MH-ET LIVE module after modification

The last thing left to do was to make the same test with an access points instead one of the ESP32s. I used TP-LINK TL-WR741n. Guess what – no improvement. I got exactly the same results.

To conclude – even ESP32 is a great chip, I am not going to use it for long-range communication. I am aware, that my experiment does not feature controlled environment and a fancy setup. However, this is all I got time for. Have you done some range tests on your own? What are you results? Please, share in the comments or send me an email.

Rotational encoders on the cheap – the capacitive way

Rotational encoders are definitely a must-have even in hobby robotics. When you want an encoder in your project, you have many options:

  • traditional optical encoders (IRCs) – precise, fast, not so cheap and big
  • “ball-mouse like” optical encoders – cheap, fast, reasonably big, poor resolution
  • magnetic encoders – small, wonderful resolution, not so fast and expensive
  • etc.

With two projects in my mind (one really up budget, the second one requiring really small and really fast (>100kHz) encoders) I thought: why not to build a capacitive encoder? Basically a variable capacitor whose capacitance determines the position. It could be cheap (etched on a PCB) and really fast. So I decided to explore possibilities of this approach.


As usual, I started with an overview of existing solutions. Surprisingly, it is hard to find any reasonable resources. I found only two types of existing projects – professional solutions without any documentation for scientific purposes and a really nasty hobby projects which are far-far away from any reasonable results. There was only one exception – Elm Chan’s laser projector, which uses a capacitive encoder for galvanometer feedback.

In his project, he uses a diode bridge and a high frequency AC voltage (>8 MHz) to measure a capacity difference of two capacitors. The circuit should produce a small voltage on a output proportional to the difference. However, I wasn’t able to reproduce his results. My circuit produced a lot of noise and was practically useless. Clearly I am not an analog guy. So I decided to do it in more digital way.

First prototype

The idea is simple – I create a plate capacitor with half-circle electrodes by etching a pattern on main PCB and on a small PCB carried by motor shaft. Then I use the 555 timer in an astable configuration with the plate capacitor for timing. The circuit will produce a square-wave signal with a period proportional to the overlap of the electrodes and therefore, proportional to the shaft position. The frequency can be measured using a timer on a MCU in the input-capture mode. Simple, right?

First prototype of capacitive encoder

After designing a simple PCB, which you can find here, I etched it and populated it. To protect the electrodes from a short and also to create as small spacing as possible (to increase capacity) I covered one of the electrodes with a transparent tape. The diameter of the semicircles is 15 mm (and therefore the active area is roughly 88 mm2. Based on resistor values I used, and the frequency I obtained, the capacity of this capacitor is about 8 pF – 5 times more then I expected (the tape is probably a better dielectric then I expected).

The first tests looked promising – I was able to measure a position, however the whole system was quite noisy and especially sensitive to touch – and mechanical stress. This is probably due to movement of the plates – event they lie on a the tape, if you squeeze them a little, they move closer together and it leads to big increase in the capacity. I also think this setup is quite sensitive to air humidity and temperature. Also it does not allow for continuous rotation because of the wire connecting one electrode to the main PCB. I was thinking about connecting the the other electrode via the motor shaft and the motor case, however, one of my friends had a nice idea (thanks Jiří).

Second prototype

The idea behind second prototype is quite simple – do not move the electrodes, move with a semi-circle of a good dielectric material between two fixed plates. The electrodes are fixed and therefore it is easier to maintain a fixed distance between them. Also, even if the dielectric semicircle does not maintain a constant distance from the electrodes, it makes no difference as the ratio of air and dielectric is the same (and that’s what affects the capacity). For the material I used FR-4 – it is easy to get and has 4 times bigger dielectric constant than air.

Second prototype

Second prototype

I also tried to make two electrodes for the second prototype to get rid of humidity and temperature dependency – I wanted to measure a capacity difference by measuring two capacities and making the compensation in MCU. However it wasn’t a good idea to put the two 555 timers on the other sides of PCB. Even with a decent battery of capacitors, they interfered in their function and produced an instability in the oscillation.

The other side of PCB with a ground plane and without the second 555 timer

When I got rid of one of the second timer and also introduced a ground plane on the other side of the circular electrodes I was surprised with results. To test the capacitor I used ESP32 with a motor control timer in the input capture mode. This timer’s clock tick at 80 MHz and feature a 32 bit counter. First, I arranged the resistors of the 555 timer to get a frequency around 100 kHz (I was aming for really fast encoders). With this setup, the timer makes roughly 800 ticks per period. As the capacitor still has a capacity even when there is no dielectric, the low period was 720 tics and the high period was 860 period – i.e. I got resolution of 140 positions. When the encoder is stable, there is a surprisingly small noise – only +-1 tick. Also I let the encoder run for over two hours and there was no drift in the position. You might think – 140 positions isn’t much, but I can read it at 100 kHz! When I lower the frequency (or if I could get the timers in ESP32 to tick faster) I am able to increase the resolution. So basically it is a trade off between speed and resolution.

What about continuous rotation?

If you read carefully and think a little, there is one small glitch in my setup – I am only able to detect position in the range 0-180° and no more. If I continue the movement above this range, I am not able to tell if I continue or if I am returning back as the capacity decreases the same way on the both sides. There is however a simple solution, which I unfortunately haven’t tested yet.

Electrode pattern

You need two electrodes A and B and a dielectric disk taking 2/3 of the full circle (semi transparent in the image). In this configuration you can always tell in which direction you move.


I would call my work as “proof-of-concept”. I think ultra fast capacitive encoders are feasible if you can measure period fast enough or you make Elm Chan’s circuit to work and use ADC instead. The capacitive encoder can be also a dirty-cheap solution – you need only a space on PCB, two 555 timer, 4 resistors and 4 capacitors. As the capacity of my plate capacitor is roughly 10 pF I think you could reduce its size 2 or 3 times and still get reliable results so not much of a space is necessary.

But always remember – time is money and an “expensive” solution in a form of a magnetic encoder IC might be in the end the cheapest solution.

Thinking about BOMs and Component Management

Let’s start with a disclaimer: I am a hobbyist. I do electronics mainly for fun, occasionally for serious business. All my thoughts are related to the context of single-person hobbyist (such as me) or a small group of hobbyist/semi-professionals such as RobotikaBrno. What I state here, might not be useful for the professionals.

Recent experience with Kitnic made me think again about component management in my projects – choosing, buying, storing and using electronic components. Before I present my idea, let me briefly describe my workflow.

My Current Workflow

Let’s start in the middle; as you could read in my previous posts I store my components in following manner:

  • I have a basic set of 0603, 0805 and 1206 resistors and capacitors in a special boxes (roughly 50 pieces per value).
  • ICs like MCUs and various sensor are stored in a grid of small boxes with labels.
  • Boards, china modules, etc. are stored in several paper boxes.
  • All the other components are in plastic bags with a hand-written label. These bags are kept in groups like transistors, diodes, LEDs, etc…

I also think it a good idea to have some parts on stock. I think everyone is familiar with the situation, when you are making a quick fix and you miss the resistor of the proper value. Ordering a component is time consuming (it takes few days to arrive) and costly (there are the shipping costs).

When I design a board I usually draw a schematics with respect to BOM and my home supplies. That means for example, if a value of a resistor is not critical, I try to match it to one of the values I already have in stock. But I do it only based on what I remember as going through the bags is time consuming. This also works only for my current stock, the stock might be different in a year.

I don’t use BOMs with precise order codes as I am a hobbyist, who populates boards manually and make only 1-5 pcs of a board. I have to care about minimal order quantity and I wonder why are there such a big price differences in practically identical components. When I need to order a component, I generate the BOM for several projects and go through the supplier website finding a component to match my needs with respect to price. I also try to match the components between projects. I don’t care much if I receive my components in reel, tape or a bag (precise order code usually forces me to buy a given packing, which can be in low quantities expensive). The process of ordering components is slow and annoying.

Also there is always a problem to decide what to order and what not to order. I usually base my decisions on my poor memory – I often don’t remember exact quantities I have on stock (and I am lazy to go through it). Therefore I rarely miss a component and usually order something I already have on stock. Also sometimes I order components for a project, which is for some reason left unfinished. Therefore my stock is constantly growing and contains components I will never use again (in my current workflow).

To sum it up – it is a little bit messy. From my experience, I am not the only one having this issue. Even some small companies have it.

What Would Make My Life Easier?

All these problems boil down to common source – component specification. When you use a component in a schematics, you should specify it. People use two methods:

  • They supply the part value (resistance, capacity, voltage etc.) and sometimes they add other criteria (e.g. power rating of a resistor).
  • Or they supply precise part name or event an order code for a supplier of their selection.

The second method might work for large companies producing thousands of boards – it is easy to order the components and the designer has everything about the components under control. It is also a good way to go with ICs and special components on hobbyist boards. However, when it comes to passives as resistors, capacitors, coils, etc., it does not work well for the hobbyist. If you specify the order code, then it is hard to use your stock supplies. If you decide to stick with a single type of your resistors or capacitors for the stock, it can get quite pricy, as you cannot buy the cheaper alternative. Also if you decide to build a board designed by someone else, you either have to match you stock supply with the order codes on the board or order components specifically for the board.

Let’s take it to the extremes to illustrate my point; when I have a small toy board, I don’t care whether a pull-up resistor is 10k or 12k. I want to specify it to be in range 8k-15k, in 0603 package and power rating greater than 0.05W. Nothing else, like manufacturer, height of the package doesn’t bother me. And any component fulfilling this specification will work for me. The same with capacitors – I usually need a given capacity, least voltage rating, package and min/max ESR and nothing else (like dielectric material) doesn’t bother me a lot in many cases.

The previous paragraph was rather extreme. Usually what I aim for is to make following step easy and repeatable for different settings: “I need an order code for the cheapest resistor with this value, at least this power ratig and with a tolerance at least 5%”. And ideally make the procedure automated based on schematics and allow for merging of BOMs and their simplification (e.g. I can replace 5% resistors with 1% resistors).

Let’s be honest – I think many hobbyist does exactly the same thing when order components for their designs. They do this matching by hand. And it can be a source of bugs as the specification isn’t written anywhere – especially if you are not the author of the board and you don’t know what parameters are critical. Well, it is usually enough that you order for a board designed a year ago.

Therefore I would like to keep track of this specification in schematics. I would like to attach attributes with the specification in KiCAD; like “resistance > 10k && resistance < 12k", "package ~= (0402|0603)". Then I could use an automated tool, leveraging for example Octopart, to find a part matching my criteria. Of course, if something needs to be precise, I put precise specification for the component.

Having this option would also motivate me to store my components in bags/boxes with a sequential numbers and the precise part name and keep an electronic track of my components. Then I could just export this “smart BOM”, verify it against my database and find out, that I should use 100n capacitors from bag nr. 42 and the remaining two capacitors can be taken from a bag nr. 87 (as they probably differ in voltage rating, but I don’t have enough of the first variant). This would force me to reuse most of my stock material and I would by only the necessary things.

It would also ease the situation when I need to find an alternative for a component as I miss one component and I prefer to buy it from a local seller to save time. But the seller does not have the precise component. Given the specification, I know which parameters of the component are crucial, and which not as much. The same case is the situation when I want to build someone else’s board and use as much stock material, as possible.

The Tools

I am not aware any of any ECAD program out there, which would support such a specification of components. Is there something out there I miss? Even a third party service I am not aware of? Do you see any flaws in the component parameter specification? If so, please let me know!

For me the outcome is: This can be easily added to existing tools like KiCAD and Eagle – both of them support attributes. What is needed is a format of these attributes to specify the constraints. Then we can easily build tools on top of it, which will make our life easier.