DIY Capacitive Rotational Encoder On The Cheap With FR4

Rotary encoders are critical to many applications, even at the hobbyist level. While considering his own rotary encoding needs for upcoming projects, it occurred to [Jan Mrázek] to try making his own DIY capacitive rotary encoder. If successful, such an encoder could be cheap and very fast; it could also in part be made directly on a PCB.

First prototype, two etched plates with transparent tape as dielectric material. Disc is 15 mm in diameter.

The encoder design [Jan] settled on was to make a simple adjustable plate capacitor using PCB elements with transparent tape as the dielectric material. This was used as the timing element for a 555 timer in astable mode. A 555 in this configuration therefore generates a square wave that changes in proportion to how much the plates in the simple capacitor overlap. Turn the plate, and the square wave’s period changes in response. Response time would be fast, and a 555 and some PCB space is certainly cheap materials-wise.

The first prototype gave positive results but had a lot of problems, including noise and possibly a sensitivity to temperature and humidity. The second attempt refined the design and had much better results, with an ESP32 reliably reading 140 discrete positions at a rate of 100 kHz. It seems that there is a tradeoff between resolution and speed; lowering the rate allows more positions to be reliably detected. There are still issues, but ultimately [Jan] feels that high-speed capacitive encoders requiring little more than some PCB real estate and some 555s are probably feasible.

This project is a reminder that FR4 (whether copper-clad, etched, or blank) shows up in clever applications: copper tape and blank FR4 can be used to quickly prototype RF filters, PocketNC built an entire small CNC tool around FR4, and our own [Voja] wrote a full guide on making beautiful enclosures from FR4.

Measuring capacitance with wax dielectric

How To Measure The Dielectric Constant For DIY Capacitors

Every now and then you need to make your own capacitor. That includes choosing a dielectric for it, the insulating material that goes between the plates. One dielectric material that I use a lot is paraffin wax which can be found in art stores and is normally used for making candles. Another is resin, the easiest to find being automotive resin used for automotive body repairs.

The problem is that you sometimes need to do the calculations for the capacitor dimensions ahead of time, rather than just throwing something together. And that means you need to know the dielectric constant of the dielectric material. That’s something that the manufacturer of the paraffin wax that makes it for art stores won’t know, nor will the manufacturers of automotive body repair resin. The intended customers just don’t care.

It’s therefore left up to you to measure the dielectric constant yourself, and here I’ll talk about the method I use for doing that.

Continue reading “How To Measure The Dielectric Constant For DIY Capacitors”

History Of The Capacitor – The Pioneering Years

The history of capacitors starts in the pioneering days of electricity. I liken it to the pioneering days of aviation when you made your own planes out of wood and canvas and struggled to leap into the air, not understanding enough about aerodynamics to know how to stay there. Electricity had a similar period. At the time of the discovery of the capacitor our understanding was so primitive that electricity was thought to be a fluid and that it came in two forms, vitreous electricity and resinous electricity. As you’ll see below, it was during the capacitor’s early years that all this changed.

The history starts in 1745. At the time, one way of generating electricity was to use a friction machine. This consisted of a glass globe rotated at a few hundred RPM while you stroked it with the palms of your hands. This generated electricity on the glass which could then be discharged. Today we call the effect taking place the triboelectric effect, which you can see demonstrated here powering an LCD screen.

Continue reading “History Of The Capacitor – The Pioneering Years”