Implementing a two-axis robotic arm controller with out MCU


The circuit is designed with out an MCU, as an alternative utilizing the GreenPAK SLG46620 chip, two Tower Professional SG90 servo motors, and an analog joystick.

Robotic arms are extensively utilized in robotic functions. They’ll transfer like a human hand. A robotic arm might be an impartial software or half of a bigger robotic system. Robotic arms are primarily used for pick-and-place functions in trade. They’re additionally present in cell safety cameras and toys.

A robotic arm often consists of a number of hyperlinks related by joints that may rotate. On this undertaking, we’ll construct a robotic arm with two pairs of rotations, one for the x-axis and the opposite for the y-axis. These will probably be managed by an analog sign from the joystick. The circuit will probably be designed with a Greenpack SLG46620 chip, two Tower Professional SG90 servo motors and an analog joystick (Figures 1 and a couple of).

Click on for full measurement picture

Determine 1. System Block Diagram. (Supply: Renesas Electronics)

Click on for full measurement picture

Determine 2. Circuit schematic. (Supply: Renesas Electronics)

The undertaking doesn’t require a microcontroller, because the GreenPAC chip incorporates all the weather wanted to kind a secure IC that’s able to controlling servo motors independently.

Concept of operation

The GreenPack chip will carry out all of the features of the system. It receives an analog sign from the joystick’s X-output, which is digitized internally and used as a PWM sign for the servo motor. The enter channel is then modified to learn from the joystick’s y-output, and the method is repeated. Analog alerts will probably be learn each 10 ms, alternating between the X- and Y-outputs. Due to this fact, every sign is learn each 20 ms, so the output frequency is 50 Hz. It’s appropriate for the operation of servo motor.

servo motor

Two Tower Professional SG90 servo motors (image 3) will probably be used to construct the robotic arm. The motor requires a PWM sign to regulate its angle of rotation, which varies from 0° to 180°. When a 0.5 ms pulse width is launched, the motor rotates to 0°. When the heartbeat width is the same as 2.5 ms, the motor rotates 180°. The ensuing pulse width ought to be between 0.5 – 2.5 ms each 20 ms to acquire an angle between 0° and 180°.


Determine 3. Tower Professional SG90 Servo Motor. (Supply: Renesas Electronics)

analog joystick

Analog joysticks are extensively utilized in robotic functions as a result of their low price and simple connection. The joystick consists of two potentiometers situated crisscross (image 4). It offers three outputs: x, y, and a push-button within the center. The joystick in our software will provide guide management of the servo.

To attain a variety that’s in line with GreenPack’s ADC specs, the joystick will use the chip’s VREF as an alternative of connecting an exterior voltage divider. It will cut back the variety of exterior components.


Determine 4. Analog joystick module. (Supply: Renessa Electronics)

GreenPak Design

The GreenPAK design was created within the free GUI-based GreenPAK Designer software program, which is part of the GoConfig™ software program hub, (hyperlink to the design file). This design consists of a number of components (Determine 5).

Click on for full measurement picture

Determine 5. Greenpack Design – Matrix 0. (Supply: Renesas Electronics)

An analog MUX receives alerts from two separate outputs in keeping with an outlined time interval. A pulse generator of 100 Hz provides a pulse each 10 ms. The X-signal is obtained within the first 10 ms and the Y-signal within the subsequent 10 ms.

Pin8 and Pin9 are configured as analog inputs related to a PGA configured as an analog multiplexer. The sign from Pin16 switches between its two channels. When the sign CH selector is ready excessive, the studying comes from pin 8, and when it’s set to low, the studying comes from pin 9. After changing the analog sign to digital, it’s learn from the FSM0. The FSM0 will get its enter from the output of the ADC block (ADC information). FSM0 is configured as a Falling Edge DLY.

Delay time = (counter worth+1)/clock.

clock = 256/2ms = 128kHz

The CLK pin of the FSM0 is related to the CNT5 output through EXT CLK0 to obtain 128 kHz in order that the heartbeat width of the output is 2 ms when a worth of 255 is obtained from the ADC. Due to this fact, the output interval of CNT5 is 7.8125 µs and the CNT5 information is 210.

The two-L0 inverter and CNT6 outline the 100 Hz generator, which provides a pulse each 10 ms to output a PWM sign to each servo motors each 20 ms. The output of the generator triggers CNT9, which is configured to function as a falling edge DLY with a delay time of 0.5 ms. The CNT9 output triggers the FSM0 to output a sign whose width is FSM information + 0.5, which will probably be between 0.5 and a couple of.5 ms. That is fed by means of the LUTs to the suitable servo.

CNT0 is used to offer 2.5 ms pulse width in every working cycle as the utmost allowed time restrict for outputting sign to servo motors (every in flip) to forestall any error.

DFF0, 2-L1, 3-L2 are used to regulate the enter channel, the place periodically switching between channels 1 and a couple of of the PGA is carried out each 10 ms. Pin6 is externally related to pin16, which is related to the CH selector pin of the PGA.

The 4-bit LUT0, 3-bit LUT0, 3-bit LUT1, and 2-L2 kind the demultiplexer to cross the PWM sign to the requested servo motor (Determine 6).

Click on for full measurement picture

Determine 6. LUT Configuration. (Supply: Renessa Electronics)

When the CH selector sign is HIGH, the studying comes from channel 1 by means of pin 8 and the rectified PWM sign goes by means of pin 4 to the X-servo motor. When the CH selector is ready to LOW, the studying comes from channel 2 and the sign is distributed to Pin5 after which to the y – servo motor.

The channel is changed with the falling fringe of the CNT0 output after 2.5 ms have elapsed from the beginning of the cycle to output the heartbeat with the beginning of the following cycle (see Determine 7). This offers sufficient time for sign studying and stability.

Click on for full measurement picture

Determine 7. Timing diagram. (Supply: Renesa Electronics)

To forestall any errors within the ADC when the sign is small (lower than 40 mV), DCMP0 is used to check the ADC worth with register 0. If the worth is smaller than 9, the angle will probably be assumed to be 0° and the output CNT9 will probably be fed on to the requested servo motor.

The joystick is obtained from VREF0 contained in the GreenPack chip in order that the sign learn by the joystick is inside the working vary of the ADC. VREF0 is related to pin 19 the place the supply selector is ready to ACMP0, which was adjusted to 1200 mV. The joystick has a push-button that may be leveraged for extra performance. A debugger was constructed utilizing CNT8 and the improved sign is output by means of Pin20. Pin 12 is configured as a low voltage digital enter as a result of the joystick voltage is 1200 mV (Determine 8).

Click on for full measurement picture

Determine 8. Greenpack Design – Matrix 1. (Supply: Renesas Electronics)

To check the design, GreenPAK Designer’s Sign Wizard was used to use varied alerts to the enter (Determine 9) and monitor the output (Determine 10).

Click on for full measurement picture

Determine 9. Producing Sawtooth Wave. (Supply: Renessa Electronics)

Click on for full measurement picture

Determine 10. Pin 8 (Yellow), Pin 9 (Blue), Pin 5 (Purple), and Pin 6 (Inexperienced). (Supply: Renesas Electronics)

The next video exhibits the undertaking within the works and can be accessible right here.

conclusion

On this article, we used the Greenpack SLG46620 chip to construct a circuit controlling a robotic arm of two joints, x and y, utilizing two servo motors operated with analog joysticks. The chip was extremely environment friendly sufficient to include all of the necessary components of a circuit inside a small area. There was no want for an exterior microcontroller and few exterior components have been wanted.

This design might be expanded to create a robotic arm of better levels of freedom by connecting a couple of chip. Such a system might be utilized to many various industrial functions.


Anas Aaju is a management and automation engineer with a grasp’s diploma in undertaking administration. He has expertise of 10+ accomplished tasks for educational and business tasks. He’s a technical teacher and innovator within the prototyping and IoT area.

Associated Content material:

For extra Embedded, subscribe to Embedded’s weekly e mail e-newsletter.





Supply hyperlink