DIY Robot: The Most Romantic Gift of 2016

Advertisement

DIY Robot: The Most Romantic Gift of 2016

Facebook CEO Mark Zuckerberg wrote on his personal Facebook page over the weekend, announcing a significant goal for 2016: to develop artificial intelligence technology that can control the home environment.

Here is the full text of Zuckerberg’s article:

Every year, I take on personal challenges, learning new things and growing outside of my work at Facebook. In recent years, the challenges I have set include reading two books a month, learning Chinese, and meeting a new friend every day.

In 2016, my personal challenge is to develop simple artificial intelligence technology to control my home environment and assist me in my work. This is similar to the AI assistant Jarvis in Iron Man.

Initially, I will learn about the technologies available in the market. Then, I will teach the AI assistant to understand my voice to control everything in the house, including music, lighting, and temperature. I will teach it to recognize friends’ faces and let them in when they ring the doorbell. I will teach it to remind me if something happens in my daughter Max’s room when I’m not there. Regarding work, it will help visualize data through virtual reality, helping me develop better services and lead my organization more effectively.

Every challenge has a theme, and this year’s theme is invention.

At Facebook, I spend a lot of time working with engineers to develop new products. Gaining in-depth knowledge of the details of technical projects has been very beneficial. Regarding Internet.org, we discuss developing solar-powered airplanes and satellites to provide internet access; regarding Oculus, we delve into the details of the controllers or software involved; regarding Messenger, we discuss answering your questions through artificial intelligence. However, developing products on my own will bring completely different rewards. Therefore, my personal challenge this year is to do just that.

For me, writing code is an interesting intellectual challenge. I look forward to sharing with you after a year of learning.

Creating a robot like Jarvis is certainly not easy. This article is just an introduction to robot teaching and is unlikely to have “powerful” intelligence. However, exploring, being curious, and challenging yourself in 2016, just like Zuckerberg, is something we can all do.

You can also tag someone around you and ask them to make a cute robot for you; that’s the most romantic gift of 2016~

Full Tutorial

Making a robot only requires five steps: assemble the robot; wire the robot; connect the power; install Arduino software; program the robot.

Want to learn how to make your own robot? There are many types of DIY robots. Most people want to move a robot from point A to point B. You can easily create a robot using analog components or by purchasing a beginner’s kit. Building robots is a great way to self-learn electronics and computer programming.

Step 1: Assemble the Robot

DIY Robot: The Most Romantic Gift of 20161. Gather components. To make a basic robot, you will need some simple components. You can buy most of the components from a nearby hobby shop or online retailers (if not all). Some basic kits may include all the components. This robot does not require much soldering.

Arduino UNO (or another microcontroller)

2 continuous rotation servos

2 wheels suitable for the above servos

1 caster wheel

1 small solderless breadboard (look for one with two positive and negative lines on each side)

1 remote sensor (with a four-pin connector cable)

1 button switch with a 10k ohm resistor

1 set of wire-to-board connectors

1 battery holder for 6 x AA batteries, including a 9V DC socket

1 pack of jumper wires or 22 gauge wiring

Strong double-sided tape or hot glue

DIY Robot: The Most Romantic Gift of 20162. Flip the battery holder upside down. You will use this battery holder as the base of the robot’s body.

DIY Robot: The Most Romantic Gift of 20163. Align the two servos with the end of the battery holder. This should be the end of the battery holder where the wires come out. The servos should touch the bottom, and the rotating parts of each servo should be on either side of the battery holder. Proper alignment of the servos is important to ensure the wheels are placed straight. The wires from the servos should come out from the back of the battery holder.

DIY Robot: The Most Romantic Gift of 20164. Use tape or glue to secure the servos. Ensure they are firmly attached. The back of the servos should be tightly glued to the back of the battery holder.

The servos should now occupy half of the back of the battery holder.

DIY Robot: The Most Romantic Gift of 20165. Stick the breadboard parallel to the empty area on the back of the battery holder. It should be a little distance from the front end of the battery holder, with a small part exposed on both sides. Before proceeding to the next step, ensure it is firmly attached. The “A” row should be close to the servos.

DIY Robot: The Most Romantic Gift of 20166. Stick the Arduino microcontroller on top of the servos. If the two servos are positioned well, there should be a flat area between their contact points. Place the Arduino microcontroller on this flat area, ensuring the Arduino’s USB and power lines are facing backwards (away from the breadboard). The front of the Arduino should just overlap with the breadboard.

DIY Robot: The Most Romantic Gift of 20167. Attach the wheels to the servos. Firmly attach the wheels to the rotating parts of the servos. This may require a lot of force, as the wheels are designed to fit snugly into the servos for maximum traction.

DIY Robot: The Most Romantic Gift of 20168. Attach the caster wheel to the bottom of the breadboard. If you flip the body over, you should see the breadboard sticking out a little. Attach the caster wheel to the exposed part, using a spacer if necessary. The caster wheel serves as the front wheel, allowing the robot to turn.

If you bought a kit, it may come with spacers that correspond to the caster wheel to ensure it touches the ground.

Step 2: Wire the Robot

DIY Robot: The Most Romantic Gift of 20161. Modify two three-pin connectors. You will use these to connect the servos to the breadboard. Move the pins so that both sides are evenly spaced.

DIY Robot: The Most Romantic Gift of 20162. Insert the two connectors into the breadboard’s E row at ports 1-3 and 6-8. Ensure they are firmly inserted.

DIY Robot: The Most Romantic Gift of 20163. Connect the servo cables to the connectors, with the black cable on the left (connected to ports 1 and 6). This will connect the servos to the breadboard. Ensure the left servo is connected to the left connector and the right servo to the right connector.

DIY Robot: The Most Romantic Gift of 20164. The red jumper wires should connect from pin C2 and pin C7 to the red rail (positive) pins. Ensure you are using the red rail pins at the back of the breadboard (near the other part of the body).

DIY Robot: The Most Romantic Gift of 20165. The black jumper wires should connect from pin B1 and pin B6 to the blue rail pins (ground). Ensure you are using the blue rail pins at the back of the breadboard. Do not connect to the red rail pins.

DIY Robot: The Most Romantic Gift of 20166. The white jumper wire connects from pin 12 and pin 13 on the Arduino to A3 and A8. This allows the Arduino to control the servos and wheels.

DIY Robot: The Most Romantic Gift of 20167. Attach the sensor to the front of the breadboard. It should not be inserted into the external power area of the breadboard but should be plugged into the first row of J. Ensure you accurately insert it into the middle area, leaving an equal number of pins on both sides.

DIY Robot: The Most Romantic Gift of 20168. The black jumper wire connects pin I14 to the first available blue pin on the left side of the sensor. This will ground the sensor.

DIY Robot: The Most Romantic Gift of 20169. The black jumper wire connects pin I17 to the first available red pin on the right side of the sensor. This will power the sensor.

DIY Robot: The Most Romantic Gift of 201610. The white jumper wire connects pin I15 to pin 9 on the Arduino, and similarly, connects pin I16 to pin 8. This will provide the sensor’s information to the microcontroller.

Step 3: Connect the Power

DIY Robot: The Most Romantic Gift of 20161. Flip the body over to see the battery in the holder. Let the cable from the battery holder extend from the lower left corner.

DIY Robot: The Most Romantic Gift of 20162. Connect the red cable to the spring in the lower left corner. Ensure the battery holder is positioned correctly.

DIY Robot: The Most Romantic Gift of 20163. Connect the black cable to the last spring in the lower right corner. These two wires will provide the correct voltage to the Arduino.

DIY Robot: The Most Romantic Gift of 20164. Connect the above red and black wires to the far right red and blue pins on the breadboard. The black wire should connect to pin 30 on the blue rail. The red wire should connect to pin 30 on the red rail.

DIY Robot: The Most Romantic Gift of 20165. The black wire connects the GND pin on the Arduino to pin 28 on the blue rail at the back of the breadboard.

DIY Robot: The Most Romantic Gift of 20166. A black wire connects the blue rail pin at the back of the breadboard to the blue rail pin at the front (both at pin 29). Do not connect to the red rail, as this may damage the Arduino.

DIY Robot: The Most Romantic Gift of 20167. Connect the red rail pin at the front of the breadboard (pin 30) to the 5V pin on the Arduino. This will provide power to the Arduino.

DIY Robot: The Most Romantic Gift of 20168. Insert the button switch between the two rows at pins 24-26. This switch allows you to turn off the robot without unplugging the power.

DIY Robot: The Most Romantic Gift of 20169. Connect a red wire from H24 to the next available pin on the right side of the sensor. This will power the button.

DIY Robot: The Most Romantic Gift of 201610. Connect a resistor from H26 to the blue rail pin. Directly connect the resistor to the pin and place it next to the black wire used a few steps earlier.

DIY Robot: The Most Romantic Gift of 201611. Connect a white wire from G26 to pin 2 on the Arduino. This allows the Arduino to register the button.

Step 4: Install Arduino Software

DIY Robot: The Most Romantic Gift of 20161. Download and extract the Arduino IDE. This is the development environment for Arduino, allowing you to program instructions and upload them to your Arduino microcontroller. You can download it for free from arduino.cc/en/main/software. Unzip the downloaded file, locate the folder, and simply double-click arduino.exe to run it.

DIY Robot: The Most Romantic Gift of 20162. Connect the battery holder to the Arduino. Connect the battery pack to the Arduino’s connector to provide it with power.

DIY Robot: The Most Romantic Gift of 20163. Connect the Arduino to the computer via USB. Windows may not recognize this device.

DIY Robot: The Most Romantic Gift of 20164. Press win+R and type “devmgmt.msc”. This will bring up the device manager.

DIY Robot: The Most Romantic Gift of 20165. Right-click on the “Unknown Device” under the “Other Devices” option and select “Update Driver Software”. If you do not see this option, click “Properties”, select the “Driver” tab, and then click “Update Driver”.

DIY Robot: The Most Romantic Gift of 20166. Select “Browse my computer for driver software”. Choose the driver software that comes with the Arduino IDE.

DIY Robot: The Most Romantic Gift of 20167. Click “Browse” and locate the folder you previously downloaded and extracted. Inside the folder, you will find a folder named “drivers”.

DIY Robot: The Most Romantic Gift of 20168. Select the “drivers” folder and click “OK”. If you are warned that “this is unknown software”, confirm that you want to proceed.

Step 5: Program the Robot

DIY Robot: The Most Romantic Gift of 20161. Double-click “arduino.exe” in the IDE folder to launch the Arduino IDE. You will see a blank project.

DIY Robot: The Most Romantic Gift of 20162. Paste the following code to make your robot move in a straight line. The following code will make your Arduino move forward continuously.

DIY Robot: The Most Romantic Gift of 20163. Build and upload the code. Click the “right arrow” at the top left to build and upload the code to the Arduino connected via USB.

You may want to pick up the robot because once the code is uploaded, it will continue moving forward.

DIY Robot: The Most Romantic Gift of 20164. Add a shutdown feature. Add code to the “void loop()” section of the source code to activate the shutdown feature. Specifically, place it above the “write()” function in the “void loop()” section.

DIY Robot: The Most Romantic Gift of 20165. Upload and test your code. With the added shutdown feature, you can upload and test the robot. It should keep moving forward until you press the button, at which point it will stop.

Advertisement

About Lichuang Mall

Lichuang Mall(WWW.SZLCSC.COM) is a vertical mall under the Jia Lichuang Group, offering a wide variety of electronic components with guaranteed quality. With over 5,000 square meters of modern component warehouse, the current inventory exceeds 25,000 types. All components from Lichuang Mall are sourced through formal channels from manufacturers or agents, ensuring original and genuine products.

For component purchases, we recommend Lichuang Mall. After registration, you can receive a 15 RMB no-threshold coupon. If you need a business number, please fill in “N“, or click on Read Original to register directly.

Leave a Comment

×