Friday 6 November 2020

New Arms


The first arm I made for my robot turned out to be a little on the small side.
Also it did not do much, as it was driven by just one motor.

So I decided to make new Arms.
To have arms do lots of different movements needs lots of motors, I want to keep this to a minimum.
I will be using DC motors.
To control a motor properly you need feedback from the motor or whatever it is moving.
As a minimum you need stops at its limits and some sort of position counter.

I have already made a driver for the Pen Lifter and Platform Lifter which only needs one control signal and has stops. With this setup the motor always travels to the extremes. I will need to modify this driver so that I can stop the arm motors at any position and know what that position is.

I have come up with a circuit form my new motor driver.
It will require five pins on a microprocessor controlling it, one for forward, one for reverse, one for position feedback and two for the stops feedback. That's quite a lot of pins for controlling a motor.
So this is going to limit the number of motors I can use if I just want to use a Nano to control all arm motors. I am going to use the AtMega168, I don't need to much memory (well I will find out).
To increase the number of pins the Nano has use of, I decided to add another MCP23017, this gives me 16 more pins.

I decided I would just have six motors, three in each arm. One for the shoulder, one for the elbow and one for the hand grip.



That's going to need 30 pins on the microprocessor. Actually it will be just 24, I am not going to have feedback from the Hand Grips at the moment.
Although the Nano has 22 GPIO pins, on the Nano I still need two for I2C, two for TX/RX and two for getting interrupts from the MCP23017. This leaves only 16. 
So I have decided to use 12 pins on the Nano to control direction of each motor, and use 12 pins on the MCP23017 for feedback from the motors.
    
The MCP23017 is split into 2 ports, so I am going to use one port for the left side and the other port for the right side. This way the two interrupts will be one for left and one for right.

I am going to put all six motor drivers on one PCB, I am also going to have a go with SMD's (Surface Mounted Devices).
So with this in mind, I have decided to have the BCP made by a professional manufacturer.
The PCB Manufacture I chose was PCBWay, this is the first time I have had a PCD made by a manufacturer of PCB's so I am going to do a separate post on how I designed the board and got it manufactured.

The result looks like this:

 

With components and Fitted:


Now all I have to do is figure out how I am goring to fit the stops and counter to the motors.
In the past I have use an infrared sensor and shutter system to count movements like I have for the riser on the chassis.

The size of these makes it very impractical, I have seen smaller versions, I have some I salvaged from old printers.
Then I remembered about the 3144 hall effect sensor, it is small and magnets come in all sizes.
I thought of the magnetic strip, this can be cut into any size.
I did some experiments to see if was strong enough when cut into small pieces.
It worked great, I had to find its polarity and mark it up before cutting so that I placed them in there correct orientation.

For the shoulder motor I glued the magnets into a holder I made, so that it could be fitted to the top of the shoulder.

I made a small circuit board for the sensor which could be mounted to the frame.

As the arm rotates about the shoulder the magnets pass in front of the sensor, switching it on and off.
This enables the microcontroller count it's position.

Next was to add stops so that the motor would not go beyond it's limits and the controller would know when to start counting from.
I was able to modify the shoulder mount to hold two switches and I made two adjustable stops that fitted around the shoulder joint.

The motor for the forearm was a little easier.
I used a hall effect sensor again, but this time I cut a piece of magnetic strip into a disc, which I was able to placed on the drive shaft.
This gave me a lot more accuracy, as the disc rotated one revolution, it turned the sensor on and off three times, the sensor had to be in just the right position, if it was out of position it only turned on and off, once every rotation. 
The switches where mounted as I had done for the platform lifter.

For the hand I have just fitted stops for open and close.
The close switch detects when something has been griped.






If you like what I have done, or want to know more.
Please leave a comment below.