Portable Arduino Bot

3,610

1

About: My hobby is building robot. My goal is design and 3D printing all different kind of robot and provide the robotic hobbyist community with a platform that could then program and improve up on.

Over the years, I have built many robotic projects and most of it run by an Arduino so let me explain a little bit about this amazing technology. Arduino is a microcontroller board, has up to 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs or more, this allows Arduino to read the input from sensors in the real world in real time and react accordingly by controlling a servo motor or DC motor.

During the programming phase of the project, sometimes I want to test out a new algorism during lunch break or I have some free time to mess around with the data but I do not want to carry the current project around due to its size or its stage of completion. There are many files on Thingiverse for Arduino cases, however, I don't want to wire an LED or a switch mess when I do some coding so that I can test the new code to see how it would work in the real world.

With that goal in mind, I have designed this Portable Arduino Bot. This robot is small, compact, durable and fully equid with LEDs, switch, buzzer, etc. you can also equip the bot with the sensor that would work with your project. I also want to encourage kids to program and what is a better way to do so by infusing the project with the Star War themes.

I will do my best so that if you have done Arduino project can just follow through with picture. I will also do my best to explain what I have done in words for those want to learn something about Arduino.

Supplies:

1 Arduino Nano - link

1 600 mAh Venom Battery - link

1 Circuit Specialists Microswitch - link

1 Circuit Specialists On/Off switch - link

1 10K Ohm resistor - link

3 Adafruit LED - link

6 2x4 hex screw - link

Step 1: 3D Printing

All the STL files for this project will be included below, I will also share the setup and the type of material that I used in this project. The usage of different material may not gain the same result shown in the picture.

The Bot housing and the Bot's legs should be printed with support, however, since the support would only be internal this will keep the Bot look better when it has done.

I use CEL Robox 3D printer to print all parts for this project. All parts are printed with 30% fill, I use CEL PETG HD Glass Designer Gray, CEL PETG HD Glass Transparent Red.

Step 2: Microswitch

Microswitches have been around, however, it got its spotlight recently. Now we can find these microswitches in a 3D printer, robotic projects, vacuum robot, etc. One might argue that you don't need a switch for such a small project, however, I bet the different. A switch can be used for many purposes, it could be used as a representation for a sensor to test out, or a AI trainer ;D. I will talk about this AI trainer later.

At first, when I read about microswitches, I thought it would operate just like a normal on/off switch, I was wrong the microswitch require a little bit of work and not just a straight up plug and play. If you are new with all of these, do not worry I was new too if I can do it you can do it :).

From my own experience then the confusing part is that the switch has 3 legs, we only use 2, but at the end, we will have 3 wires come out from the switch. However, after many trial and error, I think I got it down and I will make sure it as straight forward as it can be. If you want to know more on how Microswitch work, I found this website to be trusted http://www.me.umn.edu/courses/me2011/arduino/technotes/microswitch/

The switch has 3 pins: C, N0, NC. We only use C and N0.

1. C for the ground wire

2. Read note before continuing: N0 will have 1 wire come out from it not 2. I have made this mistake many times and ended up with a bad signal. There is the main wire and a side wire, if you solder these 2 wire at N0, there will be a big chance that your signal will be unreadable or unstable.

3. The main wire will connect N0 to a 10K resistor, then after the 10K resistor will be the power source for the switch.

4. The side wire will be connected to the main wire which between the 10K resistor and N0. This is where we will collect our signal so that why it is important to keep the data line clean.

5. Glue the microswitch in place and make sure give it time to dry completely.

Step 3: Legs LED

This is the true power of 3D printing. The legs have an internal chamber for the wire and the LED. One of the challenges in the design is that the legs are movable. 3D printing technology provides me with a neat solution where I have an internal chamber for the wire to run through.

I use Adafruit LED Sequins for its compact where the resistor is included on the board for maximum space efficiency. All we have to do is soldering a power and ground wire to the board. Heat wrapping the LED is optional however if you plane to have this project close to a running water source then heat wrapping is highly recommended.

1. Insert the LED into the leg

2. Glue the LED down, make sure the LED facing up for maximum illumination.

3. Insert Leg panel into each leg, this part is best to be printed with material that transparent where light can travel easily.

Step 4: Installing the Leg

I got these 5mm aluminum tubes from a local hobby shop. You can also 3D printed these peg or wood peg would work just fine.

1. Run the wires from each leg to the right section where it is going to house the Arduino Nano.

2. Make sure the legs move freely

Step 5: On/off Switch

The on/off switch is a lot simpler than the microswitch. This type of switch act like a water gate we just have to connect the switch to the circuit series with the battery. The switch will then glue to the flip door.

Make sure you give it enough wire so that the flip door can be opened and close.

Please watch the assemble video for better understanding how to put the bot together.

Step 6: Coding and Testing

I would recommend uploading the PA_Calibration code on to the bot to test out the legs LED. This will make sure that we assign the correct pin number for the correct LED.

int ChestLED = 3 ;
int LLegLED  = 2 ;
int RLegLED  = 4 ;

int LED_INDEX[3]={3,2,4}; // Chest LED, Left Leg LED, Right Leg LED

The calibration code will blink the legs LED and chest LED, to test to make sure the pins are not switched, you can change HIGH to LOW to turn off the LED to double check.

void loop()
{
 digitalWrite(LED_INDEX[1], HIGH); //LOW
 digitalWrite(LED_INDEX[2], HIGH); //LOW
}

After calibration and double check, we can close the top and install the chest to the front, line up all the screws and connect the front and the back together with the 6 2mm hex screws.

The PAB_Basic code provides some more operate functions like: Blink Chest LED, Excited mode, Disco mode. You can try these modes out by uncommon one and common other. To have the bot do a different thing at a different time will require a bit more coding.

void loop()
{ 
XChestBlink(); 
//XExcited();
//XDisco();
}

The PAB_Randoaccordinglym code provides a random value where if you of the value assigned to an action the bot will react accordingly. By assign, a task with more value makes it more likely to happen.

int Randomness = random(1,600);
 if(Randomness == 150 ){XExcited();}
 if(Randomness == 250 ){XChestBlink();}
 if(Randomness == 350 ){XDisco();}
 if(Randomness == 450 ){XDisco();}
 if(Randomness == 550 ){XDisco();}

The randomness might be silly, however, it is a great representation for a random change in the environment like the sun got covered by cloud or moister change in the environment, etc. This is a key way to make this bot a testing platform for many science projects.

Step 7: Finish Putting It Together, What Next?

The Bot can be used as it is as a portable testing platform, bring it with you as a piece of your sci-fi custom.
However, you can also install more sensors to fit your project. For example, one of my other PAB I install a buzzer with a 10K Ohm potentiometer. I was able to have the bot generate a random sound pattern, use the microswitch as input to train the bot to make a better sound pattern or sometime the Bot will sing the Star War themes song.

You can also go wireless, Circuit Specialist carries the ESP 32 Wifi & Bluetooth - link. This board requires extra knowledge on how to upload code on to the board, however, this board have built-in wi-fi and Bluetooth module and has the same dimension with the Arduino Nano so you don't need to much modify with the bot housing.

Share

    Recommendations

    • Games Contest

      Games Contest
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest
    • Sew Tough Challenge

      Sew Tough Challenge

    Discussions