Tuesday, August 11, 2015

Week 5: Servo Motors and Circuit Testing

In the final week, new servo motor circuits had to be made. I had to find a way to turn very strong and powerful open loop motors into servo type motors. I decided that it would be quicker to salvage the servo circuit from toy servo motors but replace the H-Bridge and the potentiometer system. I created modified H-bridge circuits that ran off of the two wires used to power the motor in the toy servos. This allowed huge current and voltages much higher than 6 volts, the maximum for the toy servo motor circuits, to drive very powerful motors. After I decoupled the power rails of the modified H-bridge circuits I had no problems with MOSFETs breaking. After I found a proper way to mount the potentiometer, the new servomotor circuits measured position quite accurately.

Week 4: Wheel Encoders

I created wheel encoders using QRD sensors and black and white striped rings on the wheels. I designed a software algorithm to count every time the sensors detected a black then white surface. To prevent the software algorithm to increment from noise, I made a high and low threshold similar to an inverter with hysteresis. This algorithm was used to measure distance during tape following, and to travel set distances and turn 90 degrees.

Week 3: H-Bridges and IR Following


Because the previous H-Bridge circuits malfunctioned, I created new H-bridges. MOSFETs
were mounted on female header pins so they could be easily replaced. This turned out to be a very good idea because the MOSFETs were often destroyed if wires were connected improperly. I also created a very compact design so the circuits could save space within the chassis.

After completing the dual IR filtering circuits I wrote a control loop in software for IR beacon tracking. It interacted with the motor and allowed the robot to follow an IR beacon when both sensors were mounted in the front of the robot separated by a distance of 8 inches. It was also programmed to stop once the robot came close enough to the beacon. IR following is demonstrated in the video below.


Week 2: IR Sensor Circuits working

This week I was able to get the IR sensor circuits to work. Solder connection problems were resolved with more experience in soldering circuit boards. Noise problems were by decoupled the op amp power lines with 220 nF ceramic capacitors. I also replaced the female header pins with op amp mounts. It created stronger/more reliable connections for the 741 op amps and the rest of the circuit board. To create a signal between 1 and 5 volts corresponding to a distance of 3 to 8 ft from the beacon, I used variable resistors in the amplifier portions of the circuits. The IR sensor circuits ended up being a success. They did not break after repeated use and only had problems if the wire connections to the circuit board became loose.

Week 1: IR Sensor Circuit

I worked on dual IR sensor circuits used to track an IR beacon. Each circuit filtered and amplified a 10 kHz signal to create analog inputs that had a signal proportionate to the distance a 10 KHz IR emitter. A simplified diagram of the circuit is shown below. At first the circuits were not working due to noise problems, weak op-amp connections, and malfunctioning components. These problems were fixed in the following week.


Last Minute Setbacks

Ultimately, the robot competition did not go the way we had hoped. During the competition, Geronimo was only able to return one of the six pets to the safety zone. This was primarily the result of last minute failures that occurred hours before the completion began.

Perhaps the greatest setback occurred around 6:00am, just two hours before the playing surface was closed in order to prepare for the competition. We noticed that the magnetic sensor on the catchment plate was not responding properly, and as such, would not tell Geronimo to stop and remove the pet from the arm. As the lab was closed at this time, we were unable to simply wire up a new sensor. This setback prevented us from picking up more than one pet; had the sensor been functioning, we could have easily picked up the first three pets, if not more.  Though we were never able to confirm the cause the failure, we suspect a faulty wire was the cause.

Though the failed magnetic sensor was the most upsetting setback, it was not the only setback. Just an hour prior to the magnetic sensor failing, the wheel encoders and the IR detectors ceased to function, effectively preventing Geronimo from picking up pets on the upper level of the surface. Due to the time that was required to debug these sensors, we decided to move forward and focus on the three pets on the lower level of the surface.


We also experienced major setbacks involving the arm the day before the competition. For these, please refer to the section on Geronimo’s Arm.

Author: Josh Smith

Geronimo’s Arm

During the design process, we wanted to make Geronimo’s arm as simple and as elegant as possible. Because of this, we decided that the arm would consist of two parts:

  •           A parallel linkage oriented vertically so that the arms height could be adjusted
  •          A horizontally mounted arm that could rotate 180 degrees in order to account for the horizontal offset created by the parallel linkage
Initial prototype of Geronimo's arm.



Initially, we thought that we could use servo motors to control the arm. Our first prototype proved that these movement patterns were in fact possible using servo motors. However, there were some stability issues with various components of the arm. Additionally, the catchment plate that the pets were supposed to stick to changed orientation throughout the process, which limited the arms functionality.

A second prototype was made, with new servo mounts for the parallel linkage and a bracket for the horizontal arm. In order to maintain the desired geometry of the catchment plate, a fourth servo was added to the end of the horizontal arm.

Second prototype of Geronimo's Arm.


After the arms performance at time trials, we were concerned that the servo motors were not powerful enough to remove the pets from the arm using our chopping motion.  A video of this testing phase can be seen below.

Video showing second prototype's inability to remove pet.


In addition, the two servo motors controlling the parallel linkage were not able to be precisely calibrated, and so one was always a few degrees off from the other. Because of this, the servos would fight each other. Eventually one of the servos “won”, and we had a servo fire.

The problems with the arm caused us to fall behind schedule, and at this point, we decided that it would be in our best interest to start from scratch and make our own servo motors. The arm rebuilt took Dave and I two days, and involved us re-making the arm components to accommodate larger motors, gear systems, and potentiometers.

Solid model of final arm design.


The day before the competition, we began to have problems removing pets from the arm once more. We determined that the motor powering the horizontal arm was not strong enough, and so we opted for a stronger motor. However, when I was mounting the small gear to the motor we chose—something I had done with every previous motor—I managed to break the motor. In the hours that followed, the team searched for a replacement motor that would be strong enough to accomplish the chopping motion we wanted. This set us back even further.

We finally found a motor that suited our needs, and mounted it to the arm at 10:30pm, the night before the competition.

The servos that we made featured the following:

  •         3D printed bearings, to increase stability of the arms
  •         Potentiometers that rotated with the arms
  •         High torque motors
  •         Gear ratios of 3:1 for increased torque


The final arm design featured the following:

  •         An all-aluminum parallel linkage
  •        An aluminum horizontal arm
  •         A steel catchment plate attached via a zinc-coated steel hinge
  •         A magnetic sensor attached to the steel pin of the hinge to determine when the arm picked up a pet.



The final arm can be seen below.

Catchment plate and small servo mounted to end of horizontal arm.

Custom servo set-up driving horizontal arm. Nicknamed "Fat Bastard" by the team.

Custom servo set-up that drove the parallel linkage. Nicknamed "Satan" by the team.

Final arm design mounted on Geronimo.

Author: Josh Smith