Abstract
Accurate position sensing is important for state estimation and control in robotics. Reliable and accurate position sensors are usually expensive and difficult to customize. Incorporating them into systems that have very tight volume constraints such as modular robots are particularly difficult. PaintPots are low-cost, reliable, and highly customizable position sensors, but their performance is highly dependent on the manufacturing and calibration process. This paper presents a Kalman filter with a simplified observation model developed to deal with the nonlinearity issues that result in the use of low-cost microcontrollers. In addition, a complete solution for the use of PaintPots in a variety of sensing modalities including manufacturing, characterization, and estimation is presented for an example modular robot, SMORES-EP. This solution can be easily adapted to a wide range of applications.
1 Introduction
It is necessary to have accurate position sensing for most robotics control processes. Commercial position sensors are available for many applications. However, the form factor often presents a challenge to use these commercial off-the-shelf sensors. This is especially true for compact robotic systems with tight space constraints such as modular robotic systems [1]. Customizable position sensors give more flexibility to fit these situations.
Servos have been used in many modular robotic systems, such as Molecule [2] and CKBot [3]. Servo motors have built-in position control circuits. Some modular robotic systems, such as 3D Fracta [4], M-TRAN III [5], and SuperBot [6], use rotary potentiometers for position feedback. Optical or hall-effector sensor encoders are used in PolyBot [7], Crystalline [8], and ATRON [9] to report position information. These devices are usually too large for highly space-constrained systems, such as modular robots like SMORES-EP [10].
PaintPots are highly customizable and low-cost position sensors that can be easily manufactured by widely accessible materials (spray paint and plastic sheets) and tools (laser cutters or scissors) [11]. The sensors can exist in different forms in terms of size, shape, and surface curvature. Thus, these sensors can be easily integrated with well-designed parts or systems. The sensing performance and cost of PaintPot sensors make them competitive with commercial potentiometers [11]; yet, the customizability enables the use in situations that are not possible with commercial potentiometers.
Two different designs of PaintPot sensors are used in SMORES-EP modular robots. In each SMORES-EP module, there are four degrees-of-freedom (DOFs) requiring position sensing shown in Fig. 1—three continuously rotating joints (LEFT DOF, RIGHT DOF, PAN DOF) and one bending joint with a 180-deg range of motion (TILT DOF) [10]. Conductive spray paint is used to generate a resistive track surface. The manufacturing process is easy enough for a person to make a sensor quickly, but often does not yield consistent measurement and performance. The terminal-to-terminal resistance can vary over a large range depending on the thickness of the paint with a nonlinear output. This fact complicates the position estimation for every DOF.
For state estimation, stochastic techniques based on the probabilistic assumptions of the uncertainties in the system are widely applied. For linear systems, the Kalman filter [12] has been shown to be a reliable approach where uncertain parts in systems are assumed to have a particular probability distribution, usually Gaussian. Extensions including the extended Kalman filter (EKF) and the unscented Kalman filter (UKF) [13] have been developed for nonlinear systems. For SMORES-EP DOF state estimation, we developed a new Kalman filter with a simpler observation model considering the nonlinearity of PaintPot sensors. A complete and convenient calibration process is developed to precisely characterize each position sensor quickly. Four estimators can run on a 72-MHz microcontroller at the same time to track the states of all DOFs in a SMORES-EP module.
There are many applications that could use potentiometers but are too size constrained. For example, goniometers in instrumented gloves for virtual reality currently use expensive strain gauges or nonlinear flex sensing technologies. A joint angle potentiometer would be a good low-cost solution except for size constraints. Any compact device with a hinge (a flip phone, smart eyeglasses, etc., or wearable devices) could have that joint angle measured to provide feedback. This paper presents an example solution of a class of potentiometers that is easily adapted to fit many low-profile applications. It is semi-custom in that it is easily scalable to short-run numbers. These sensors are easily characterized and combined with our state estimation method, PaintPot sensors can provide reliable position information with little computation cost. Our solutions in the SMORES-EP system show that PaintPot sensors are promising for a variety of robotic applications.
The paper is organized as follows. Section 2 reviews relevant and previous work. Section 3 introduces the manufacturing and customized design for the SMORES-EP system, as well as some necessary information. The characterization process is shown in Sec. 4, and the estimation method is presented in Sec. 5 for all DOFs. Some experiments are shown in Sec. 6. Finally, Sec. 7 talks about the conclusion.
2 Related Work
A potentiometer is a three-terminal resistor with a sliding or rotating contact (or wiper) that functions as a voltage divider [14]. There are three basic components in a potentiometer (Fig. 2): a resistive track, fixed electrical terminals on the track ends, and an electrical wiper. Different from most modern potentiometer tracks that are continuous semiconductive surfaces made of graphite, ceramic-metal composites (cermets), conductive plastics, or conductive polymer pastes, PaintPot sensors use an inexpensive carbon-embedded polymer spray paint [11].
Commercial vendors can customize potentiometers using industrial processes. For example, some manufacturers offer inkjet-printed thick-films that are deposited on printed circuit boards and other user-specified surfaces and shapes for tracks. Two significant advantages of PaintPot solutions over these industrial processes are cost and time: compared with processes that often require thousands of dollars in up-front engineering fees, produce sensors that cost tens of dollars each, and have turnaround times of a week or more, PaintPot solutions can be used by a person or a team to create customized position sensors with the cost on the order of $ 1 USD per unit and also allows rapid iteration (limited only by the drying time of the paint).
Similar to PaintPot sensors, many rapid prototyping technologies allow electronics to be integrated into everyday objects at low cost. Self-folding printable resistors, capacitors, and inductors made of aluminum-coated polyester film (mylar) sheets are introduced in Ref. [15]. A technique to accurately print low-resistance traces on sheet materials using silver nanoparticle ink deposited with a standard inkjet printer is presented in Ref. [16]. PaintPot sensors can generate high resistance on order of 1 kΩ which is desirable for potentiometers used as voltage dividers.
This paper extends the conference version [11] on the same topic that includes the manufacturing process and performance of PaintPot sensors. PaintPot tracks are hand-painted using spray cans on 0.79 mm thick plastic sheets. The sensors have good performance in terms of repeatability, resolution, and hysteresis compared with commercial potentiometers but have a shorter lifetime. However, the performance of PaintPot sensors is highly dependent on the calibration process. This paper extends the conference version by presenting an integral and fast calibration process to characterize PaintPot sensors in SMORES-EP. Based on this, a new Kalman filter with a simplified observation model is developed to increase the reliability of these position sensors, especially for PaintPot sensors for continuously rotating joints where there are two coupled electric contacts, and the performance can be greatly improved compared with the simple rule presented in Ref. [11]. This reliable performance allows us to control a SMORES-EP chain to perform manipulation tasks [17].
3 PaintPot Sensor in SMORES-EP
PaintPots were originally developed to serve as position encoders for the SMORES-EP modular reconfigurable robot system [11]. Each SMORES-EP module (Fig. 1) is the size of an 80 mm cube, and has an onboard battery, a microcontroller, and a Wi-Fi module to send and receive messages, as well as four actuated joints and electro-permanent magnet connectors on each face, allowing modules to connect to one another and self-reconfigure [18,19]. The tight space requirements of SMORES-EP made it very difficult to incorporate off-the-shelf position encoders into the design, motivating the development of custom PaintPot encoders that occupy very little space within the robot. This section provides an overview of the manufacturing techniques used to create PaintPots, the fundamental material resolution of the sensors, and the design of the PaintPots used in SMORES-EP. For more detail, we refer the readers to Ref. [11].
3.1 Manufacturing Overview.
The resistive track surface of a PaintPot encoder is made from conductive spray paint on a plastic track substrate. The PaintPots in SMORES-EP use three coats of MG Chemicals Total Ground conductive paint [20] sprayed onto Acrylonitrile butadiene styrene (ABS) plastic sheet. Three coats of paint are applied, with 5 min of drying time between coats, following the painting guidelines in the datasheet. ABS plastic can be cut to precise shapes in a laser cutter and forms an ideal substrate for the paint, which readily bonds to the surface [20]. Electric terminals are created by mounting zinc-coated screws at the ends of the resistive strip. Applying paint above and beneath the screws creates an electrical connection between the track surface and the screw (Fig. 3). The leaded solder adheres to zinc-coated screws, allowing wires to be attached and detached.
Each PaintPot uses one or more wipers to measure the voltage at the point of contact with the resistive strip. Wipers with high contact pressure should be avoided, as they may scratch the paint. A larger contact surface area also reduces contact resistance, improving signal quality. The Harwin S1791-42 EMI Shield Finger Contact [21] is used in SMORES-EP. The wiper is a 4 mm high gold-plated tin spring contact with a 1.45 mm × 2.05 mm contact area, and a contact force of 1 N (mounted on a PCB at a 3-mm working height).
3.2 Performance Characteristics.
The fundamental material resolution of the resistive track was determined by characterizing the signal-to-noise ratio of the measured voltage on small length scales. Based on our experiments, the fundamental resolution of the track material is 8.63 ± 0.126 μm, which is of the same order of magnitude as some commercially available high-precision potentiometers. In SMORES-EP, the limiting factor in resolution is the analog-to-digital conversion bit depth (10 bit, or 84 μm); to reach the material limit, 14 bit of analog-to-digital conversion depth would be required.
While PaintPots are not intended for long-lifetime applications, our analysis found that circular painted tracks have a lifetime of about 50,000 cycles when lubricated, which is sufficient for use in SMORES-EP.
3.3 Wheel and Tilt PaintPots in SMORES-EP.
Each of the four articulated joints in SMORES-EP is equipped with a PaintPot, which provides absolute position encoding. The three continuously rotating faces (labeled TOP, LEFT, and RIGHT in Fig. 1) have Wheel PaintPots with circular tracks and wipers offset parallel to the axis of rotation, while the central hinge has a Tilt PaintPot that covers 180 deg arc with a wiper offset normal to the axis of rotation.
3.3.1 Wheel PaintPots.
The wheel PaintPots, shown in Fig. 4(a), have a circular track and two wiper contacts, allowing continuous rotation and providing position information over the full 360 deg range of the left, right, and pan joints. The annular geometry allows a slip ring to fit through the center. Tabs on the track extend into the center of the circle to provide space for the terminal contacts. The V-shaped gap provides enough space for the wipers to pass from one side of the track to the other without contacting both simultaneously (which would cause a short circuit). The two wipers are mounted on a PCB above the track at a 50 deg angle to one another (Fig. 4(b)); this configuration ensures that at least one wiper contacts the track at all times.
Tracks are cut in batches in a laser cutter. To facilitate easy mounting, a layer of double-sided adhesive is applied to the back of the ABS sheet before cutting. After cutting, three coats of paint are applied, and strips are allowed to dry for 24 h. Strips are mounted in a mated groove in a 3D-printed chassis as shown in Fig. 4(a). The chassis has a raised triangular feature that mates with the gap in the strip, so that the wipers remain at the same level as they pass through the gap region. Zinc-coated screws are used for electrical terminals. The measured terminal-to-terminal resistance of wheel PaintPots ranges from 2 kΩ to 20 kΩ, depending on the thickness of the paint. Before use, a coat of petroleum-based grease is applied to the track surface.
3.3.2 Tilt PaintPots.
The tilt PaintPots, shown in Fig. 5(a), have tracks with cylindrical curvature about their axis of rotation. A single wiper contacts the track and measures position through the full 180 deg of motion of the tilt joint (Fig. 5(b)). The track geometry of the tilt PaintPot makes very efficient use of space inside the SMORES-EP module; to our knowledge, no off-the-shelf potentiometers replicate this unusual non-planar shape.
Tilt PaintPots have the same ABS/adhesive substrate as wheel PaintPots and similar screw contacts. They are mounted to the 3D printed chassis before painting, allowing them to be painted in their final curved shape. This is preferable to painting flat and then bending: bending the paint after it has dried causes cracks to form, increases the resistance (three orders of magnitude), and causes a non-smooth variation of voltage along the length of the track. The terminal-to-terminal resistances of the tilt PaintPots range from 3 kΩ to 10 kΩ.
3.4 Cost.
The PaintPots used in SMORES-EP are inexpensive. The wipers are available from Digikey1 for $0.35 USD in quantities of 100. A 12 oz MG Chemicals Total Ground spray paint can be purchased from Amazon2 for $16 USD, and 0.79 mm ABS sheets can be purchased from McMaster3 for $3.70 USD per square foot. Based on these, materials for wheel PaintPots cost $1.05 USD and tilt PaintPots cost $0.70 USD. In order to build SMORES-EP modules with quality control testing [11], we yield about 75% of our wheel PaintPots and 90% of our tilt PaintPots, making the effective materials costs $1.40 USD and $0.78 USD, respectively.
4 Sensor Characterization
Potentiometers used as voltage dividers typically model the input position as having a linear relationship with the output voltage. Close adherence to the linear model has to be achieved by ensuring that the resistance between two points along the track is constant, which requires uniform geometry, thickness, and material properties of the track. This is difficult for PaintPots which are manually spray-painted. In order to obtain accurate position control on all DOFs of a SMORES-EP module, a calibration process is needed to characterize the performance of the particular PaintPots installed.
One terminal of a wheel PaintPot is connected with 3.3 V, and the other terminal is connected with ground. Two wipers can contact the track and report current voltage (V0 and V1) in the form of two 10 bit analog-to-digital conversion values ranging from 0 to 1023, and wheel position θ = 0 rad is shown in Fig. 6 and the whole range of θ is from −π rad to π rad. When a wiper contacts on or around the V-shape gap, the voltage value is not usable. This is the reason for having two wipers, to enable sensing the full 360 deg range. So, V0 should be ignored when θ is in the range from to and V1 should be ignored when θ is in the range from to .
Similar to wheel PaintPots, the tilt PaintPot is also powered between ground and 3.3 V with one single wiper contacting the track all the times. The voltage V0 from the voltage divider goes through a 10 -bit analog-to-digital conversion (with a range from 0 to 1023). When the tilt position θ = 0 rad, the wiper is positioned in the middle of the track as shown in Fig. 7.
An automatic sensor calibration setup is developed based on AprilTags tracking [22] shown in Fig. 8(a). Three tags are used to track the rigid bodies of a SMORES-EP module. Tag 2 is fixed to the base to be the reference frame, Tag 1 is fixed to the TOP Face of a SMORES-EP module for TILT DOF tracking, and Tag 0 can be fixed to LEFT Face, RIGHT Face, or TOP Face for wheel DOF tracking (Fig. 8(b)). During characterization, one DOF is moved at a time through its entire range of motion (2π rad for wheel DOF, π rad for TILT DOF) in both directions. The data, including θ and reported voltage, are recorded at 14 Hz (speed limited by the AprilTag ROS package).
While the voltage data is not linear with DOF position, it is monotonic (piece-wise monotonic for wheel DOFs). A third-order polynomial provides a suitable model. For a wheel PaintPot, the data from both wipers are shown in Figs. 9(a) and 9(b), respectively. For wiper 0, the reported voltage V0 is not useful when DOF position θ is in the range from to (shown in red). Due to the gap of wheel PaintPots, θ = f0(V0) is a piece-wise function which can be converted into a continuous function by shifting the segment ranging from to π rad (shown in green) by 2π rad downward (shown in yellow). Similarly, for wiper 1, the segment when θ is in the range from to (shown in red) is meant to be trimmed, and the piece-wise function θ = f1(V1) is converted into a continuous function by shifting the segment ranging from −π rad to (shown in green) by 2π rad upward (shown in yellow). After taking 50 s data in both directions (showing little hysteresis), and are shown in Figs. 10(a) and 10(b), respectively. An example run from a tilt PaintPot is shown in Fig. 11(a), and the characterization result θ = f(V0) is shown in Fig. 11(b).
5 Position Estimation
5.1 Transition Model.
5.2 Observation Model.
In Sec. 4, a PaintPot can be characterized with a nonlinear model—a third-order polynomial θ = f(V). Here, V is the measurement, namely the reported voltage(s) from the wiper(s). Based on this, a nonlinear observation model z = h(x) where z is the measurement and x is the state can be derived. We can linearize z = h(x) about the current mean and variance of the DOF position x to apply an extended Kalman filter (EKF). However, this places some computational burden on the SMORES-EP microcontroller. Here, we present a simple approach that can generate a linear observation model directly without linearization of the original nonlinear observation model about the current mean and variance of the state to overcome this nonlinearity. With this new approach, we just need to check if features are available using a simple rule and compute the newly converted measurements by evaluating polynomials obtained from sensor characterization (Sec. 4).
5.2.1 Wheel PaintPots.
For the wheel PaintPot sensor, the observation model is a piece-wise function due to the geometry of the sensor:
When , there are two valid measurements which are the reported voltages V0 and V1 from both wipers.
When , only V1 is valid.
When , only V0 is valid.
5.2.2 Tilt PaintPots.
5.3 Kalman Filter.
With the transition model and the new form of observation model, a Kalman filter framework can be applied for state estimation.
5.3.1 Kalman Filter for Wheels.
The initial state of a wheel DOF can be derived by any available feature. First check V0, and if it is inside the valid range from to , compute the initial state , and shift x0 if necessary. That is, if x0 < −π, let x0 be x0 + 2π. If , then because the wiper 1 must contact the valid range of the track at this time, and similarly shift x0 if necessary, namely if x0 > π, let x0 be x0 − 2π. The prior state can be represented as a Gaussian distribution p(x0) ∼ N(μ0, Σ0) where μ0 = x0 and Σ0 is initialized to an arbitrarily small value.
5.3.2 Kalman Filter for Tilt.
6 Experiment
The PaintPot sensors, including wheel PaintPots and tilt PaintPots, are installed in SMORES-EP modules for position sensing. Currently, 25 SMORES-EP modules have been assembled. In the experiments, both a wheel PaintPot and a tilt PaintPot are characterized first and then the newly developed Kalman filters are implemented to show the effectiveness of our low-cost position sensing solution.
The data from both wipers for a wheel PaintPot is shown in Figs. 13(a) and 13(b), respectively. The segments labeled by red color are useless, and the green segments are shifted to the yellow segments to generate continuous functions to describe the relationship between voltage and angular position. This sensor is installed for PAN DOF on a SMORES-EP module. All our sensors are painted manually, so the quality is not consistent with no guarantees on bounds. The sensor characterization results for both wipers are shown in Figs. 14(a) and 14(b), respectively.
With our Kalman filter, we are still able to derive a good estimation of the angular position for the PAN DOF on this module. A simple controller is used to command the PAN DOF to a desired position from its current position along a fifth-order polynomial trajectory. The first experiment commands the PAN DOF to angular position 0 rad from π rad resulting in an average error of 0.0878 rad as shown in Fig. 15(a). In this experiment, V0 is not valid for a while because wiper 0 contacts the gap of the track. The second experiment commands the PAN DOF to angular position 0 rad from −π rad with average error being 0.0698 rad as shown in Fig. 15(b). In this experiment, V1 is not valid when wiper 1 contacts the gap of the track.
The data from the wiper for a tilt PaintPot are shown in Fig. 16(a), and the sensor characterization result is shown in Fig. 16(b). In the experiment, this TILT DOF is commanded to traverse most of the range. The result from our estimator is shown in Fig. 17 with an average error being around 0.0325 rad.
7 Conclusion
In this paper, a complete low-cost and highly customizable position estimation solution is presented, especially suitable for highly space-constrained designs which are very common in modular robotic systems. PaintPots are low-cost, highly customizable, and can be manufactured easily by accessible materials and tools in low quantities. For the SMORES-EP system, two different types of PaintPot sensors are used, and a convenient automatic calibration approach is developed using AprilTags. A modified Kalman filter is developed to overcome the piece-wise nonlinearity of the sensors and some experiments show the accuracy. The successful application of PaintPots in the SMORES-EP system shows that they can provide reliable position information with a simple hardware setup. PaintPots can be easily adapted to and installed on a variety of systems, the not consistent performance due to the manufacturing process can be resolved by our characterization process which can be easily set up, and reliable state estimation can be derived by our modified Kalman filter that can be running on a low-cost microcontroller. The overall solution provides a new position sensing technique for a wide range of applications.
Footnotes
Acknowledgment
We would like to thank Hyun Kim for experiments and hardware maintenance. This work was funded in part by NSF grant No. CNS-1329620.
Conflict of Interest
There are no conflicts of interest.
Data Availability Statement
The data and information that support the findings of this article are freely available online.4 Data provided by a third party are listed in Acknowledgment.
Nomenclature
- k =
transmission ratio
- n =
Gaussian white noise in transition model
- z =
measurement in Kalman filter
- xi =
reported state from the ith feature
- zi =
measurement from the ith feature
- vi =
observation noise of the ith feature
- x or θ =
angular position
- u or ω =
angular velocity of the driving motor(s)
- Vi =
voltage measurement from wiper i
- =
shifted position measurement from wiper i
- =
predicted Gaussian distribution of the angular position
- N(μ, Σ) =
updated Gaussian distribution of the angular position
- Kt =
Kalman gain at time t