Encoder circuit for servos

Not rated 5,844

Circuit Image

The circuit is designed to fit snugly, eliminating the need for adhesive. It is recommended to test the fit multiple times, making incremental adjustments until a snug but movable fit is achieved. The entire circuit should be placed inside the servo, ensuring that the sensors protrude through their designated openings without extending beyond the plastic casing. Cutting the holes requires careful alignment and may take significant time to complete. It is crucial that the sensors remain securely in place without adhesive, allowing for easy removal of the circuit from the servo. The first gear should be rotated until both sensors detect a black surface. A gentle clockwise turn should be made until the LEDs turn off. Next, the first gear should be turned to allow one sensor to detect a white surface; if the LED activates, the setup is correct. The process should then be repeated for the second sensor. When the wheel is moved, the LEDs should illuminate and extinguish in a manner consistent with a quadrature encoder's output. Before sealing the casing, two wires must be soldered to the motor. An H-bridge is recommended for future use, although for initial testing, the original electronic board from the servo can be connected to the motor. Although the process is challenging, it is deemed worthwhile. The subsequent phase will involve creating a board to process quadrature encoder signals in hardware, potentially incorporating P5587 sensors.

The design of the servo circuit incorporates a meticulous approach to ensure proper fitting and functionality. The snug fit of the circuit within the servo housing is essential for maintaining the integrity of the sensors while allowing for easy access for adjustments. The sensors must be positioned precisely to ensure that they function correctly without the need for adhesives, which could complicate future modifications or repairs.

The procedure for setting up the sensors involves careful calibration, beginning with the alignment of the first gear to detect a black surface, which serves as a baseline for the sensor's operational range. The gradual adjustment to a white surface is critical, as it verifies the sensor's response and confirms that the circuit is functioning as intended. The behavior of the LEDs during wheel movement is indicative of the circuit's performance as a quadrature encoder, providing essential feedback for further testing and validation.

Soldering wires to the motor is a crucial step that must be completed prior to sealing the casing, ensuring that the motor can be controlled effectively in subsequent tests. The recommendation to utilize an H-bridge for motor control is significant, as it will facilitate bidirectional motor operation and improve overall control of the servo system. The original electronic board can serve as a temporary solution, allowing for initial testing without the need for extensive modifications.

The next phase of development will focus on designing a dedicated circuit board capable of processing quadrature encoder signals. This board will likely incorporate advanced components, such as P5587 sensors, to enhance the precision and reliability of the system. The transition to a dedicated processing board will enable more sophisticated control strategies and improve the overall performance of the servo mechanism.Remember that the circuit will fit tightly, so you will not have to glue it. Try several times to put it inside. Modify it bit by bit, and when it enters with a little effort but does not move you have the right size. put the whole circuit inside the servo, trying to adapt it just to let it fit while pushing out the sensors on their holes (they must not coming out of the plastic

but be as close as possible to the edge) Cutting the holes is not a 5 minute thing. For me it was the most challenging task. You need to align them correctly and try several times to put sensors in. They must remain locked without glue, so you can get the circuit out of the servo. Turn the first gear until both sensors "see" black. Gently turn clockwise until the LEDs turn off. Try to turn the first gear and let one sensor see white. Does the LED light up If the answer is yes, it is okay. Move on the other sensor and repeat. Try to move the wheel; do the LEDs turns on and off like a quadrature encoder`s signal When you are done, remember to solder two wires to the motor before closing the case. You should use a H-bridge from now on, but just for testing you could connect the electronic board that was inside the servo to the motor using the original circuit.

Yes, it is not easy, but I think that it is worth the effort. The next step will be a board that will process quadrature encoders$B!G(B signals in hardware and possibly P5587 sensors. 🔗 External reference