Part 3: Robot V2, Programming, and Wiring


Three weeks to go until impound.
With the switched reluctance motor out of the equation and the rampbot (mostly) mechanically done, I began construction on the second version of the ramp climber robot. This robot would use two motors and be built out of more reasonable materials than acrylic. Two motors would provide more power and a reliability boost. I would also be switching to a Lipo battery, also increasing power. This robot would be completely autonomous.

The CAD saga of this robot was fairly smooth. C9.1V4 included all the desired features, as well as addressing all the problems with the MCM robot.


The second motor got a nice little 3d printed holder to cant it off several degrees from vertical, allowing for greater rail clamping range.


C9.1V5 was similar but perfected. This would be my competition robot. I cut holes in everything to save weight. It just looks awesome.


Frame holes.


Electronics plate.

Not only did this robot look a lot nicer than the C9.1V2 MCM bot but it was also much more refined. It gained almost no extra weight despite adding a whole second motor due to general frame reshaping and cutting holes wherever possible. The robot also had several new features. Spikes on the back of the bot assisted in re-mounting the rail at the top of the field, and a top plate on the robot provided a place for batteries and electronics. This plate would also provide a mounting point for rail detection sensors, an important part of making the robot autonomous. It also required very few machining operations so it went together really quick!

Frame, notice the bent tabs to increase strength.


Mechanically assembled:

On the ramp:


With this done I moved on to the electronics. Each match of the competition begins with a 30 second autonomous period where drivers cannot send input to their robot. During this time period any points scored are multiplied by two for the final score.

Included in the kit are infrared reflectance sensors, which I had used previously to commutate the SR motor. These would be used to detect where the rail ends at the top and bottom.

The sensor boards are breakouts of the QRE1113 module which consists of an IR emitter and detector side by side. I did some tests with these sensors and found them to work pretty badly as the emitters were really weak. The solution was clearly to add more IR emitters. The results on this were fantastic, this sensor was one of the key parts of the bot.


I built a little arduino nano breakout board which had all the right pin headers. It was powered by a BEC which I got from the shelves of parts. All the electronics on the robot:


Once I had all this electrical hardware working well I began to program. The program was pretty simple in operation. The robot would just drive upwards until it saw the top of the rail, do a little deceleration/acceleration routine, then go down until it saw the ramp, decelerate/accelerate, and repeat forever and ever. It would do this routine unless it saw an RC signal, in which it would switch to manual control and obey the commands of the remote controller. For both autonomous and normal teleoporation I just left the RC transmitter off, allowing the robot to drive itself. It was definitely better at driving itself than I was. The code that ran this robot was around 300 lines.

I had a couple problems with the CG being a bit too high so I added a plate which suspended the battery below the main part of the robot.
Results with this system were fantastic. The robot ran completely autonomous and completed each lap in a blistering 2.15 seconds, for a predicted score of over 1300 points. Because no one else was even close to this score I slowed the deceleration/acceleration routine to be a bit nicer to the ESCs. The final time was 2.25 seconds, for a predicted score somewhere between 1100 and 1200 points. I tested this a couple times on both sides of the field and then decided to call it good enuf.
Here are is a video of the robot driving:

In order to score points each time, the robot had to touch the floor of the starting box. I attached some little strings to the bottom of the robot so it would just barely scrape.

For the rampbot, I made a daughter board that sat on top of Shane’s lovely 2.007 board, which is included in the kit of parts. The rampbot daughter board included a switch to select which side of the field was operating on, and an indication LED for each side (red and blue). Because the rampbot had to autonomously deploy every single time for the system to work, I made the code for this part extra-hyper robust. It included a full self-test routine and the side could not be changed without resetting the entire robot.


It sensed the start LED with a photo cell on a random piece of extrusion. At this point, the robot was competition ready, and this was a pretty good feeling.


Communication between the rampbot and the ramp runner was attained through a servo wire. While waiting for start, the rampbot pulled the signal line high. When the match began, the rampbot deployed, then pulled the signal line low and off went the runner.



Complete program flow:
Rampbot waits for start LED
LED goes on, rampbot deploys with servo
Rampbot pulls communication tether low
Ramp runner waits a second for everything to settle
Ramp runner drives off of ramp
Ramp runner begins driving loop

With only a few days left until impound I decided to do something dumb and repurpose the C9V2.1 robot into a backup robot. In case of main robot failure, the backup robot could be manually driven off the rail and the backup robot deployed into the action. I built my own remote controller and receiver, which operated used a sort of ghetto PPM signal on 433mhz. I tested this a tiny bit and then called it guud.

433mhz Transmiter:


Receiver on daughter board:


With all that going good I impounded and breathed the air of freedom. Read on for part 4, the competition!!