📜 ⬆️ ⬇️

Simple servo tester with indicator

Servo tester is a device designed to test the servo drive, determine its extreme angles, speed, minimum step, and yaw. It can be very useful for builders of robots, as it allows you to start the drive and test the functioning of the model before the control electronics is ready. Such things are used in radio-controlled model stores to demonstrate the capabilities of servos to customers. However, I want to have such a thing at hand always. Of course, you can buy a variety of testers, but much more interesting to do it yourself.

In this article I want to share the experience of manufacturing a servo tester at home. My tester is controlled by an encoder, has several modes of operation, and is also equipped with an indicator to display the current angle.

image
')


Scheme and work


image
The concept is based on the Attiny2313 microcontroller. A seven-segment three-digit indicator with dynamic indication is connected directly to it through transistors. The indicator displays the current value of the angle and mode of operation. To control, use the button and encoder. When you press a button, one of the following modes is activated:
1 - increment of the angle of 0.1 degrees
2 - 1 degree
3 - 10 degrees
4 - movement of the shaft between the extreme points (0 or 150 degrees)
The encoder changes the current angle up or down, depending on the direction of rotation. The button and one of the encoder pins are connected directly to external interrupts of the IC. When the button is pressed for half a second, the current mode is displayed. During these manipulations, pulses with a duration of 0.8 to 2.3 ms and a frequency of 50 Hz are present at the output of the PD6 MK. I already wrote about the algorithm for generating a control signal earlier . The circuit has the ability to be powered from a DC voltage source of 5V, or from 7-12V. The choice of power is set by jumper.

Design


Developed detailed drawings of the board itself (of course, one-sided), ...
image
... assembly drawing front ...
image
... and the back of the device.
image
Pay attention to jumpers J1-J4. These are resistors with zero resistance in the 1210 case.

Build and configure


As can be seen on the drawings on the front side there are exclusively necessary controls, indications, as well as terminals for power connection. The board can easily be made at home with the help of LUT (do not forget to make the board drawing mirror-like!). I have it looks like this:
image
For programming you have to solder wires to the board. I specially spread my legs MOSI, MISO, SCK on the indicator, and left the contact pad on the RESET signal. When programming the fusion, it is not necessary to change, the firmware file, the printed circuit board and the list for purchase - at the end of the article.

Video work




Instead of conclusion


As advantages of your device, I would like to note that not often servo testers have an indicator, especially at a cost of less than 200r. In the future, I want to add two more modes to the firmware - to determine the extreme angles and the automatic angle change mode.
And, of course, a fee, a hex file and a list for purchase .

UPD:
The main article is now stored here .

Source: https://habr.com/ru/post/165473/


All Articles