Portable Arduino Bot

Posted on 14/06/2019 by bipescoutk
Modified on: 18/06/2019
Steps completed / 7
Press to mark a step as
completed or click here to complete all
Components you will need
Select missing items to add them
to the cart or select all
Other requirements
Introduction

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.

 


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.v

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.

C for the ground wire

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.

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

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.

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

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.

Insert the LED into the leg

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

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

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.

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

Make sure the legs move freely

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.

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.

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. This is the video of the robot singing its “national anthem” 

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.

LikedLike this to see more

Spread the word

Flag this post

Thanks for helping to keep our community civil!


Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post