WHEG Robot

The Wheg Robot is wirelessly controlled using an Arduino Leonardo, a Sparkfun Shield, and XBee antennas. This robot runs on a 7.2 NiMH battery and uses the unique styled Wheg wheels to allow it to travel on more types of terrain.

Kayla P

Los Gatos High School

Incoming Junior

Hello, my name is Kayla P, and I am a rising Junior at Los Gatos High School. My starter project was the Mini Racing Robot and my main project was the Wheg Robot.  Looking back, I remember walking into this program unsure of what I would be able to accomplish. I knew a lot could be learned in 6 weeks, and I was excited and nervous to find out. Not only did I learn the process and intracracy of building a robot, but I also had the opportunity to start from scratch and finishing a product that I’m proud of.  Since the Wheg Robot was not a project done before by other students at Bluestamp, I often felt unsure of what step to take next. I had some experience with engineering design and coding before Bluestamp, but this project took many hours of researching many different areas of engineering that I did not know about.  There were several challenges along the way, but these challenges also exposed me to different areas of engineering, and pushed me to keep finding solutions everyday.

Code Samples for Wireless Joystick and Arduino based Robot

To see my full code for my robot and wireless controller, I have made a GitHub repository here .

Code on the robot to read the signals being sent from the wireless controller:

if(Serial1.available())
{
//Serial.println((char)Serial1.read());
remote = Serial1.read();
}

This part of the code uses the “serial1” function to make sure that signals are being transmitted to the robot. The first line in the ‘if statement’ that is commented out using two forward slashes, allows the user to check in the serial monitor exactly what signals are being sent.

Code on the robot which runs the motors:

switch(remote){
case ‘A’:
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
analogWrite(enA, 255);
digitalWrite(in7, HIGH);
digitalWrite(in8, LOW);
analogWrite(enD, 255);
break;

}

This code sample runs one side of the motors on the robot using a “switch case statement”.

Code on joystick to send a certain character based on the analog values being read from the joysticks on the wireless controller:

if(((analogLeft > 520) && (analogLeft < 550)) && ((analogRight > 440) && (analogRight < 500)))
{
Serial1.write(‘D’); //both not moving
//SerialUSB.println(‘D’);
}

This is part of the code that will read the analog values from the joystick and send a certain character wirelessly to the robot.

screen-shot-2017-08-20-at-4.36.37-pm

3D Designs using the program “Tinkercad”

Starter Project

My starter project was a small racing robot. In this kit, I was able to practice soldering because almost every single part had to be soldered into place. At the beginning of the starter project, I was given extra parts to practice soldering on the side of the robot. The robot is run on a 9-volt battery, and when switched on and placed on the ground, moves very fast.  Attached perpendicular to the main large PC board is a smaller PC board where there are LEDs and a display that flash when the robot is turned on. The 555 timer IC is a chip that uses timer, pulse generation, and oscillator applications which allow the LEDs and segment display to ‘pulse.’ The motor has a gear system and the wheel assembly is attached to this motor so that it can run.  The motor is placed underneath the robot so that it doesn’t interfere with the other parts of the design.  Soldering took a long time because I did not have prior experience with this skill. I also accidentally snapped one of the wires connecting the 2 PC boards, so I had to reconnect the wires for the LEDs to blink properly.  However when I turned on the robot, all of the robot parts were working correctly except the front blue LED.  I tried to de-solder the LED and flip it to see if this would help, but it would still not blink when I turned the robot on, even though the other lights were blinking like they were supposed to.  When the LED was tested by running current through it from the power supply that we have, it glowed brightly and properly. A theory as to why the LED is not working is that the 2 resistors are not allowing enough current to flow through to the LED, since they each have a measurement of 1000 ohms, with a total of 2000 ohms.

Main Project

First Milestone

The first milestone for my main project was getting all four motors to run from the Arduino. The four DC motors are connected to L298N motor controller modules, and these two motor controllers are then connected to the Arduino. The code running on the Arduino allows the motors to run for 2 seconds, stop, and keep repeating, since the function is on a loop. The power source is connected to one motor controller. Then there is a wire connecting from this motor controllers 5-volt port to the Arduino’s 5-volt port, to power the Arduino. The other motor controller is powered by a connection between the two 12-volt and ground ports on the two motor controllers. The wheel shown is a Wheg wheel that I modeled using CAD, (Computer Aided Design) and printed using a 3D printer.

Second Milestone

The second milestone for the main project was to make the robot controllable from the wireless joystick. I did this by having the code on the wireless joystick send out certain characters based on the analog values which are being read. The code for the robot then reads these signals and runs the motors depending on the certain cases that are being sent from the joystick. The certain cases are based on what joystick or joysticks are pushed up or down. The joystick reads the analog values from small potentiometers underneath each joystick. The robot and the wireless controller communicate using 2 small radio modules called ‘Xbees’. I configured them using a program called ‘XCTU’ to communicate with each other on the same channel. Since the robot was not very powerful at first, I used a buck converter, which can be used to boost the voltage going through the system. I also created 3 new wheel designs for my robot in this milestone. This will allow the robot to climb different obstacles based on their design. For instance, the larger version of the wheels that are currently on the robot in this video will allow the robot to clear more obstacles.  I also designed a Wheg wheel that resembles a fan. This wheel will let the robot ‘climb’ surfaces more easily, like steps or higher levels. Lastly, I designed the star-spoked Wheg wheel which will give the robot more stability.

Final Presentation

Leave a Comment

Start typing and press Enter to search