Advertisement

Quick Links

About SunFounder
SunFounder is a technology company focused on Raspberry Pi and Arduino open source
community development. Committed to the promotion of open source culture, we strive to
bring the fun of electronics making to people all around the world and enable everyone to
be a maker. Our products include learning kits, development boards, robots, sensor
modules and development tools. In addition to high quality products, SunFounder also offers
video tutorials to help you build your own project. If you have interest in open source or
making something cool, welcome to join us! Visit
About This
RollFlash Robot
The Rollflash is a four-foot quadruped robot, with a super cute tortoise appearance design.
It applies an open source Arduino Nano control board, a Servo Control Board, and a
Bluetooth Module. With an ultrasonic sensor and an infrared sensor, it can realize obstacle
avoiding and line following functions. What's more, you can control it with an App on
Android, which makes it easy and interesting to play. Through this kit, you can feel the charm
of assembling the robot from scratch and how to realize the control by programming.
Besides this user manual, you can obtain guidance on our website - download the code
needed under
LEARN
Free Support
If you have any
website and we'll reply as soon as possible.
For
NON-TECH questions
service@sunfounder.com. You're also welcomed to share your projects on FORUM.
Preface
Kit
->
Get tutorials
and watch the video under
TECHNICAL
questions, add a topic under
like order and shipment issues, please
www.sunfounder.com
VIDEO.
for more!
FORUM
section on our
send an email to

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RollFlash and is the answer not in the manual?

Questions and answers

Summary of Contents for SunFounder RollFlash

  • Page 1 About This RollFlash Robot The Rollflash is a four-foot quadruped robot, with a super cute tortoise appearance design. It applies an open source Arduino Nano control board, a Servo Control Board, and a Bluetooth Module. With an ultrasonic sensor and an infrared sensor, it can realize obstacle avoiding and line following functions.
  • Page 2: Table Of Contents

    Contents Introduction .......................... 1 Overview ......................1 Components List ......................... 2 2.1. Acrylic Plates ....................2 2.2. Mechanical Fasteners ..................3 2.3. Electronic Components ................. 4 2.4. Tools........................7 2.5. Self-Provided Components ................7 Get Started with Software ....................8 Download the code..................
  • Page 3: Introduction

    Arduino and robot hobbyists. Since it moves slowly just like Flash in Zootopia, it is named RollFlash - moves really like a "flash". With an open source Arduino Nano board for control, a Servo Control Board, and a Bluetooth Module, it walks slowly with eight SF servos (9g) driving four legs.
  • Page 4: Components List

    Components List 2.1. Acrylic Plates 1. Bottom Plate x 1 2. Ultrasonic Fixing Plate x 1 3. Support Plate x 2 4. Joint Connector x 8 5. U3 Plate x 4 6. Upper Plate x 1 7. U2 Plate x 4 8.
  • Page 5: Mechanical Fasteners

    Prior to assembling the RollFlash, you need to remove the residues in the holes of the plates and the stickers on the plates. Here we take the U1 plate for example. 1. Check whether there some 2. Use a tool with a pointed end to remove residues in the holes of the acrylic the residue.
  • Page 6: Electronic Components

    M2*8 Screw M2 Nut M3*8 Flat-Head Screw M3*10 Screw M3 Nut M3*6 Corn Rivet φ3*φ8*4 Flange Bearing 2.3. Electronic Components SunFounder Servo (9g) 18650*2 Battery Holder...
  • Page 7 SunFounder Nano V4.0 SunFounder Servo Control Board SunFounder Bluetooth Module SunFounder Ultrasonic Module...
  • Page 8 SunFounder Infrared Module 4-Pin Jumper Wire 6-Pin Jumper Wire Mini USB Cable Riband Heat Shrink Tubing Wire Clip...
  • Page 9: Tools

    Sponge Bag Transparent Tape Shell 2.4. Tools Philips Screw Driver 2.5. Self-Provided Components 18650 Battery...
  • Page 10: Get Started With Software

    Included are the code for the kit, schematic diagrams of the modules, the app installer for Android phones, driver for Nano board, and the 3D printer file Rollflash.stl for the shell. For related introduction and assembly videos of the Rollflash Bionic Robot Turtle for...
  • Page 11 In this kit, SunFounder Nano board is used. 3.2.3 Install Arduino IDE The code in this kit is written based on Arduino, so you need to install the IDE first. Skip it if you have done this. Step1: Go to the arduino.cc website and click Download. On the page, check the software list on the right side under Download the Arduino Software.
  • Page 12 Choose Next. Click Browse to choose the installation path or enter a directory at the Destination Folder. Click Install.
  • Page 13 The following interface will show Note: After the installing progress bar goes to the end, the Close button may be enabled for some PC. Just click it to complete the installation. Then a prompt appears. Select Always trust software for "Adafruit Industries" and click Install.
  • Page 14 If the driver is not installed, the Nano board will not be able to be recognized by your computer. Therefore, before using it, please install appropriate driver. For Windows users, run PL2303_Prolific_DriverInstaller_v1.10.0.exe in the folder Rollflash Bionic Robot Turtle for Arduino. For Mac users, refer to the folder PL2303_MacOSX_1_6_1_20160309 in the folder Rollflash Bionic Robot Turtle for Arduino.
  • Page 15: Assembly

    Assembly 4.1 Upper Plate + Riband 1. Cut the 30cm ribbon into halves. Thread the ribbon through the acrylic plate. Leave the riband with one end longer on one side of the plate (onto which to fix the battery holder). Thread the other half through the upper plate in the similar way. Upper Plate + Battery Holder 1.
  • Page 16: Upper Plate + Servo

    3. Fold the ribbons in the battery box. 4. Install the batteries. Pay attention to the anode and cathode in case of inserting inversely. 5. It should be like this after the installation: 4.3 Upper Plate + Servo 1. Align a servo with a servo slot on the Assemble the servo into the plate.
  • Page 17: Upper Plate + Pcb

    It should look like this: 3. Align two M2 nuts with the servo mounting holes, and fasten them with two M2*8 screws. 5. Mount the other three servos in the same way. Pay attention to the direction of servos’ shaft (as shown below). 4.4 Upper Plate + PCB 2.
  • Page 18 The assembly should be like this: those on the plate. 6. Insert the pin into headers. 5. Plug the SunFounder Nano onto the Servo Control Board. Pay attention to place port close aforementioned power port.
  • Page 19: U Joint-A/U Joint-B

    7. Align the pins on the Bluetooth Module 8. Insert the Bluetooth Module into the with the female headers on the Servo board. Control Board as shown below. 4.5 U Joint-A/U joint-B 1. Align the rocker arm with the mounting 2.
  • Page 20 Tighten the screw. 5. Place an M3 nut in the groove of the rocker fixing plate, and insert an M3*10 screw from below into the nut. 7. Insert the U2 plate into the connector 8. Place an M3 nut in the groove of U2, plate.
  • Page 21 11. So four type-A U joints are assembled as shown below: Small hole on the side without rocker arm - Tyep A 12. Four type-B U joints assembled: Large hole on the side without rocker arm - Type B...
  • Page 22: U Joint Unit-1/U Joint Unit-2

    4.6 U Joint Unit-1/U Joint Unit-2 1. Assemble a type-A U joint with a type-B U 2. Place them close. joint perpendicularly as shown below. Align all the 4 mounting holes in the middle of the two connector plates. 3. Insert two M3*10 screws from the type-A 4.
  • Page 23 5. Connect another unit of type-A + type-B U joint in the same way. Now we have two type-1 units. Large hole on the right 6. Connect the rest U joint units in the similar way, but remember to rotate the type-B U joints 180 degrees when connecting.
  • Page 24: Crus + Servo

    4.7 Crus + Servo 1. Align the hole of the crus plate with the Assemble the crus to the servo. servo. Pay attention to the direction of the crus and the crus (foot) as shown below. Tighten the screw. 3. Connect the two components with two M2 nuts and M2*8 screws.
  • Page 25 Now, we have two assembled crura of this type. Assemble the other two symmetric crura in the same way. Pay attention to the direction of the feet when inserting the servo into the hole.
  • Page 26: Uploading Assembly Program

    Step 1: Hook the servo wires to D2, connect the Servo Control Board to PC via a USB cable, and the PC will automatically install the driver. The COM port connected will appear. Step 2: Go to the folder Rollflash Bionic Robot Turtle for Arduino\Code\Basic\1.Servo and open the file Servo.ino.
  • Page 27 Port. Step 4: Click Upload. After the upload is completed successfully, unplug the USB cable and press the switch on the board. You may hear the sound of gear moving (or may not, if the servo shaft happens to be at 90 degrees at the beginning; but you GENTLY spin the rocker arm and you'll find it's unmovable).
  • Page 28: U Joint Unit + Crus

    4.9 U Joint Unit + Crus Align the φ3*φ8*4 flange bearing with Insert the flange bearing into the hole. the hole in the type-2 U joint unit. Make sure the crus is perpendicular to 4. Insert an M2*4 self-tapping screw into the the U1 plate as shown below.
  • Page 29 5. It should be like this. After one leg is 6. Assemble the other similar leg. DO adjust done, unplug the servo wires connected all servos by connecting to D2 before to D2 for connection of the next servo. assembling each leg. Assemble the crus to the other Type-2 U joint unit.
  • Page 30: Upper Plate + Leg

    Assemble two crura to the type-1 U joint units in the same way. 4.10 Upper Plate + Leg 1. Align the M3*6 Corn Rivet with the hole The assembly should be like this: on U2 plate from the inside of the Type-A U joint.
  • Page 31 Connect the servo to Port D2 on the Note: Remember to unplug the servo Servo Control Board for calibration. wires connected to D2 for connection Keep the leg and the servo in 45 of the next servo. degrees. Open the U1 plate a little to Align an M2*4 self-tapping screw with insert in the servo connected to the the hole of the servo rocker arm on the...
  • Page 32: Bottom Plate + Sensor

    4.11 Bottom Plate + Sensor 1. Align the ultrasonic module with the Mount the module on the plate. mounting holes on the ultrasonic fixing plate. 3. Align four M1.6*10 screws and four M1.6 4. Tighten the screws. There will have a nuts with the mounting holes as shown small gap between them because of below.
  • Page 33 Tighten the screw. 7. Place an M3 nut in the groove of the module, and insert an M3*10 screw from underneath as shown below. 9. Insert two M3*10 screws into the infrared 10. Insert the screws through two acrylic module from underneath. washers.
  • Page 34 14. Insert the support plate. 13. Align the bulges of the support plate with the holes on the bottom. 15. Place an M3 nut in the slot of the support 16. Tighten the screw. plate. Align an M3*10 screw from below. 17.
  • Page 35: Upper Plate + Bottom Plate

    19. Insert them into the bottom plate. 20. Insert the 6-pin anti-reverse cable into the port of the infrared module as shown below. 4.12 Upper Plate + Bottom Plate 1. Thread the 6-pin anti-reverse cable through the wire slot on the upper plate. Align the bulges of the support plate and the ultrasonic plate with the mounting holes on the upper plate.
  • Page 36 2. Connect the support plate to the upper plate. Before that, you need to insert the four rivets on the U joints into the flange bearings on the bottom plate. 3. Insert three M3*10 screws from the upper bottom plate through the bottom plate into M3 nuts.
  • Page 37: Wiring

    4. Fasten then screws. 4.13 Wiring The servos and pin headers on the Servo Control Board are marked number 1-8 as shown below. Connect the servos to the corresponding ports. Pay attention that the yellow wire should be toward the tail direction. Then insert the 6-pin cable into the 6-pin port.
  • Page 38: Shell

    4.14 Shell The shell provided in the kit is a paper-made one for decoration. You can assemble it if you want. Here we will show you how to assemble the shell. The unfolded shell is shown as below. 2. Fold the shell along the white lines, and use the transparent tape to stick two adjacent plates together on the inside.
  • Page 39: Experiments

    Experiments As we all know, tortoise is a reptile with four feet, so does this quadruped RollFlash. On each leg there are two servos, thus it can complete actions including moving forward and backward, turning left and right, etc. with these eight servos. What’s more, equipped with a Bluetooth module, ultrasonic module, and infrared module, it can be controlled on an Android phone by app, avoid obstacles, and follow lines.
  • Page 40 Connect in the App will become connected. The Status LED in the Bluetooth will keep constantly lighting instead of blinking. Now you can control the RollFlash to go forward, backward, turn left and right just on your phone. Have fun!
  • Page 41: Obstacle Avoidance

    Interesting, isn’t it? 5.3 Line Following when Avoiding Obstacle Under the RollFlash there is a 5-channel line following module, which enables the robot to go following a black line. In addition, in the sketch 4. Following, the part for obstacle avoiding is also included.
  • Page 42: Dance

    You can place some obstacles on the line to see the RollFlash bypass them when following the line. It's quite fun to draw the lines and figures aside. Just keep the tips in mind when playing. 5.4 Dance The code file Dance.ino under Rollflash\Rollflash Bionic Robot Turtle for Arduino\Code\5.
  • Page 43: Code Explanation

    Code Explanation 6.1 ServoWrite.ino Looking at the code folders, you may find that on matter for the app, the obstacle avoidance function or the line following, there is always a sketch ServoWrite.ino. Actually it's for servo control, so no wonder. You can check the description below for the code. Control the servo on pin 2 The program above is for control of a single servo.
  • Page 44 Control the servos on pin 5, pin 6 and pin 8...
  • Page 45 Then control three servos simultaneously. By setting seven parameters including the starting angles c5, c6, and c8, end angles s5, s6, and s8, and the rotation speed ms0, we can control the rotating angle and speed of three servos at the same time. Control the servos on pin 7, pin 2, pin 4 and pin 8...
  • Page 46: App.ino

    (starting angles), s7, s2, s4, s8 (end angles), and ms0 (rotation speed), we can control the rotating angle and speed of four servos at the same time. Movements of the RollFlash robot can be well controlled by calling those programs above. Here we just take some examples about different controlling.
  • Page 47 In the program above, the number 30, the value in the function ServoWrite() represents the pace of RollFlash. Due to its structure design (the servo installation), the moving pace is fixed. How can it move forward? It moves its feet diagonally in opposite directions:...
  • Page 48 It walks another step backward then. Therefore, it will keep walking backward by continuing these two loops. The program above is for turning right. RollFlash can realize turning right by keeping the left feet moving forward, while to do the right feet moving backward.
  • Page 49 Program above is for turning left. RollFlash can realize turning left by keeping the left feet moving backwards, while the right feet moving forwards. The above code is for the RollFlash’s basic movements. It will follow the commands received from the Bluetooth module via the serial port and take the corresponding actions.
  • Page 50: Avoidance.ino

    RollFlash to move forward and backward, turning left and right, etc. 6.3 Avoidance.ino We have learnt a lot on servo and basic control for the RollFlash and how it moves. Thus, it would be quite easy to control it for obstacle avoiding. The program can judge whether there is an obstacle in front of the RollFlash by reading data from ultrasonic module on it, and further control the robot to avoid the obstacle by corresponding programs.
  • Page 51 Then write the code that if there is an obstacle 10cm away in the front, control the RollFlash to move back to 15cm from the obstacle, then turn left or right to avoid it, and continue to move. Thus, the RollFlash can realize obstacle avoiding function.
  • Page 53: Following.ino

    The infrared line following module enables the RollFlash to detect a black line through the collected data, so that it can adjust the direction and follow the line. Meanwhile, the RollFlash will walk away from the obstacle on a black line it's following, bypass the obstacle and come back to follow the line.
  • Page 54 When the sensor detects the black line is at the centre-left, the RollFlash will turn left slightly; when it is at the centre-right, the robot should turn right a bit; when the line is in the middle, the RollFlash would move forward. That’s how it works for line following. Besides, it needs to detect whether there're obstacles and avoid them if yes.
  • Page 55: Afterword

    RollFlash So that's this cute tortoise robot ! With the assembly of the RollFlash robot, you will better learn how it works and feel the sense of satisfaction. You can start your journey now and have lots of fun with the bot. Show it to your friends and have fun! You may have encountered with assembly or code issues during the course.
  • Page 56 All contents including but not limited to texts, images, and code in this manual are owned by the SunFounder Company. You should only use it for personal study, investigation, enjoyment, or other non-commercial or nonprofit purposes, under the related regulations and copyrights laws, without infringing the legal rights of the author and relevant right holders.

Table of Contents