2019-11-14

2019-11-03 OrangeBot Upgrade Motors


>>>Pi Wars 2020<<< 



1Motor Upgrade

The first assembly phase already revealed some issues with the motor block:
  1. Mounting of the wheel on the motor is needlessly fiddly
  2. With power electronic tested is time to add encoder and speed PID
With the successful completion of the first MVP phase (remote control of the platform from browser with open loop PWM motor control) it's time to disassemble the platform and begin the second construction phase.
Objective for this phase is to focus on the motor control. Add encoder decoding for each of the motor channel and add a speed PID. Since the motor blocks are to be disassembled, mounting of the wheels on the hub is to be upgraded as well.


1.1Upgrade Plan

Order of assembly is:
    1. Mount motor on its bracket
    2. Place M3 screws on the hub
    3. Mount the hub on the motor shaft and tighten two keys
    4. Insert the wheel on the hub
    5. Tighten the M3 screws by holding the butt of the screw with an L shaped clamp
The fifth step of the assembly is needlessly fiddly and has to be repeated for twelve screws.
Illustration 1: Current Motor Block Assembly
Upgrade plan is to:
  1. Remove step 2 of the old assembly phase
  2. Thread the small surviving holes M3
  3. Mount the wheel by bolting M3 screws of the right length from the front
  4. Add encoder connector and test encoder waveform


2Upgrade Hub

Thread the small surviving holes on the hub to accommodate M3 screws.
First disassemble the platform.
Illustration 2: Disassemble platform

Drill with 2.8 and thread the small holes on the hub M3
Illustration 3: Thread M3

Threading of twelve holes on four hubs complete.
Illustration 4: Hubs Threaded

Test full assembly. Use M3x16.
Illustration 5: Motor Block Assembly

Assembly looks good, and now the process is streamlined allowing for an easier maintenance of the platform.

2.1Order of Assembly

Order of assembly is:
  1. Mount motor on its bracket
  2. Mount the hub on the motor shaft and tighten two keys
  3. Mount the wheel on the hub using M3x16 screws
Thread on aluminium is not strong on the best of days, so care should be taken not to tighten too hard the screws. Use of a special anti-slide ring to the screw is advised.


3Encoders

An encoder connector is to be added to provide closed loop motor control.

3.1Connector

Holes needs to be prepared to add the connector by sucking away the tin.
Illustration 6: Prepare Holes

Connector chosen is a simple 2.54mm male pin strip
Illustration 7: Upgraded Motors

Power wires and soldered directly to the motor power pins to improve current capability.
Encoder uses four pins. Two for supply and two for channel A and B.


3.2Encoder Test

With the connectors taken care of, an encoder test was in order to verify the correct operation of the assembly and to verify the pin assignment.
Illustration 8: Encoder Test Circuit

The encoder is powered with 5V and returns two open drain outputs. Two 1K pull up resistors are used to bias the two channels. In the test circuit two sink LED are connected to the channels to visually inspect the encoder.




Video 1: Test Encoders Manually+12V motor in both directions


4Assembly

Assemble back the motors and the hub on the acrylic base.
Illustration 9: Re-Assembled Platform


5Proto Board Upgrade

Upgrade the main board to support four quadrature encoders.
Encoders are connected to PORTC of the microcontroller and are powered by the same 5V that powers the microcontroller itself.
Each encoder channel is equipped with a 1KOhm pull up resistor as the encoders of the IG32-05 motors are open drain.
Illustration 10: Proto Board Encoder Wirings


5.1Encoder Cables

Four encoder cables connects the proto board with the encoders mounted on the IG32-05 motors
Illustration 11: Make Encoder Cables
Wirings:
  • IG32-05 Side
    • Brown +5V
    • Black +0V
    • White CHA
    • Blue CHB
  • Proto Board Side
    • Black +0V
    • Brown +5V
    • White CHA
    • Blue CHB


6Conclusions

The scope of this upgrade has been to make the wheel mounting more convenient and to pave the way to add encoder feedback to the platform.
Illustration 12: Complete Wirings

Next step is to upgrade the firmware to read the encoder waveforms.


No comments: