make your own device with script

60
MAKE YOUR OWN DEVICE Park Ki-hyeok From KOICA Hello, I am glad to see you. My name is Park Ki-hyeok. I’m a volunteer from KOICA, Korea International Cooperate Agency. I’ve work in computer engineering department since last July. I started a project from last November. It’s making a Robot project. Actually, I just take the project from the student in electronic engineering department, and the goal was just improving it. Like adding the dancing motion.[do ethiopian shoulder dance](laugh) Anyway I did the project 6 months, and unfortunately, it was not successful. But I feel something, and study something. That’s why I open the seminar today.

Post on 11-Sep-2014

284 views

Category:

Education


0 download

DESCRIPTION

The presentation in Bahir Dar University, Bahir Dar, Ethiopia. About personal project of making a robot. This version is including the script Inserted Movie Clip : An Introduction to the Arduino : http://youtu.be/CqrQmQqpHXc Detect Train and Close Window with Arduino and Webcam : http://youtu.be/aBhF_qfG4Qc Drive 10 Servos with 2 Arduino Pins : http://www.youtube.com/watch?v=FbyjNPC6SxI Arduino XBee & PS2 Controller & Servo Motor Test : http://youtu.be/BoXzik46LyI

TRANSCRIPT

Page 1: Make your own device with Script

MAKE YOUR OWN DEVICEPark Ki-hyeok From KOICA

Hello, I am glad to see you. My name is Park Ki-hyeok. I’m a volunteer from KOICA, Korea International Cooperate Agency. I’ve work in computer engineering department since last July. I started a project from last November. It’s making a Robot project. Actually, I just take the project from the student in electronic engineering department, and the goal was just improving it. Like adding the dancing motion.[do ethiopian shoulder dance](laugh)Anyway I did the project 6 months, and unfortunately, it was not successful. But I feel something, and study something. That’s why I open the seminar today.

Page 2: Make your own device with Script

CONTENTS

1.Introducing Arduino

2.Introducing Previous Project

3.My Project

4.Conclusion

The seminar will flow like this.At first I’ll introduce the Arduino. And look what the student did.After that I will show you the project what I did. This is main dish, don’t miss it.And finally conclusion with some of my suggestion.

Page 3: Make your own device with Script

ARDUINOWhat it is and what it can

Is anyone knows Arduino? Raise your hands.=>if lots : Oh, pretty much. Okay, but some are don’t know what it is. So, I introduce it.=>if less : Okay, not so much. But don’t care that’s why I introduce this.Let’s see what it is and what can we do with the arduino.

Page 4: Make your own device with Script

ARDUINO

• Open-source electronic prototyping platform

• Good at making interactive machine

• For anyone interested in creating interactive objects or environments

Arduino is an open-source electronic prototyping platform.It is open-source, so you can do anything with the arduino. Cost is only material prices.No patent cost, No license cost.And it is Good to making interactive machine. In next slide, I will show some examples of using Arduino.All over the world many people making their own objects or environments by themselves with arduino.After prototyping with arduino, you can make your own circuit board with experience of prototype.

Page 5: Make your own device with Script

EXAMPLES

Now, let’s see what can we do with arduino.I found a Video clip on youtube.produced by the magazine named “make”.So at first let’s watch the movie.

Page 6: Make your own device with Script
Page 7: Make your own device with Script

How was the video?I’m not here for selling the arduino or the magazine.Just show what can you do with arduino.This is another example of using arduino.The man live near from train rail.For that reason when train is coming, it makes loud noise.And... He make a device for automatically closing window.When train is coming, the web cam detect it and send signal to arduino.Then arduino close the window automatically.

Page 8: Make your own device with Script

PREVIOUS PROJECTPrevious project which is done with a BDU student

This is another project with arduino in this university.It is previous one of my project.The electronic engineering department student made a 2-legged walking robot with arduino and several servo motors.That is his robot. Right now, it doesn’t connected with any power and processor, but some monthes ago, it was connected with power supplies and arduino and so on.

Page 9: Make your own device with Script

WHAT HE USED

Let’s see what he used for the project.A arduino. I believe that now everybody knows what it is.and a bread board for connecting the wires.A test board for making servo motor socket.Multiple power supplies for supplying power to servo motors.and.... A program named ‘labView’.LabVIEW is electronic simulating program. He used it for making code and user interface.With these kinds of stuff, how he did?<click>

Page 10: Make your own device with Script

WHAT HE USED

• A arduino

Let’s see what he used for the project.A arduino. I believe that now everybody knows what it is.and a bread board for connecting the wires.A test board for making servo motor socket.Multiple power supplies for supplying power to servo motors.and.... A program named ‘labView’.LabVIEW is electronic simulating program. He used it for making code and user interface.With these kinds of stuff, how he did?<click>

Page 11: Make your own device with Script

WHAT HE USED

• A arduino

• A bread board

Let’s see what he used for the project.A arduino. I believe that now everybody knows what it is.and a bread board for connecting the wires.A test board for making servo motor socket.Multiple power supplies for supplying power to servo motors.and.... A program named ‘labView’.LabVIEW is electronic simulating program. He used it for making code and user interface.With these kinds of stuff, how he did?<click>

Page 12: Make your own device with Script

WHAT HE USED

• A arduino

• A bread board

• A test board

Let’s see what he used for the project.A arduino. I believe that now everybody knows what it is.and a bread board for connecting the wires.A test board for making servo motor socket.Multiple power supplies for supplying power to servo motors.and.... A program named ‘labView’.LabVIEW is electronic simulating program. He used it for making code and user interface.With these kinds of stuff, how he did?<click>

Page 13: Make your own device with Script

WHAT HE USED

• A arduino

• A bread board

• A test board

• Multiple Power Supplies

Let’s see what he used for the project.A arduino. I believe that now everybody knows what it is.and a bread board for connecting the wires.A test board for making servo motor socket.Multiple power supplies for supplying power to servo motors.and.... A program named ‘labView’.LabVIEW is electronic simulating program. He used it for making code and user interface.With these kinds of stuff, how he did?<click>

Page 14: Make your own device with Script

WHAT HE USED

• A arduino

• A bread board

• A test board

• Multiple Power Supplies

• A program named ‘LabVIEW’

Let’s see what he used for the project.A arduino. I believe that now everybody knows what it is.and a bread board for connecting the wires.A test board for making servo motor socket.Multiple power supplies for supplying power to servo motors.and.... A program named ‘labView’.LabVIEW is electronic simulating program. He used it for making code and user interface.With these kinds of stuff, how he did?<click>

Page 15: Make your own device with Script

*add diagram(flow chart) and drawing of the setting

Actually, when I meet him, I don’t have the idea of taking picture of the settings. For that reason, I draw it.There were many power supplies and they were connected with the robot. The robot was connected with arduino and arduino was connected with computer.The computer screen is LabView program.With the LabView, you can make your own panel. For instance, there are integer input area. When you input the degree of the servo motor’s angle and launch, The servo motor will be changed the angle.

Page 16: Make your own device with Script

PROBLEMS

• Needs many power supplies.

• Not stand alone. Wired.

• Controlled by computer.

*problem image animationI founded some problems, which can be improved.At first, it connected with many power supplies.I remember that there were about 10 power supplies for supplying power to servo motors.For that reason, the robot cannot move freely.*clickAlso there are lots of devices linked with the robot, such as power supplies, computer and so on. Because of them, the robot can not be stand alone.*clickAnd it controlled by computer. If the computer is disconnected, the robot will be dead.

Page 17: Make your own device with Script

PROBLEMS

• Needs many power supplies.

• Not stand alone. Wired.

• Controlled by computer.

*problem image animationI founded some problems, which can be improved.At first, it connected with many power supplies.I remember that there were about 10 power supplies for supplying power to servo motors.For that reason, the robot cannot move freely.*clickAlso there are lots of devices linked with the robot, such as power supplies, computer and so on. Because of them, the robot can not be stand alone.*clickAnd it controlled by computer. If the computer is disconnected, the robot will be dead.

Page 18: Make your own device with Script

PROBLEMS

• Needs many power supplies.

• Not stand alone. Wired.

• Controlled by computer.

*problem image animationI founded some problems, which can be improved.At first, it connected with many power supplies.I remember that there were about 10 power supplies for supplying power to servo motors.For that reason, the robot cannot move freely.*clickAlso there are lots of devices linked with the robot, such as power supplies, computer and so on. Because of them, the robot can not be stand alone.*clickAnd it controlled by computer. If the computer is disconnected, the robot will be dead.

Page 19: Make your own device with Script

PROBLEMS

• Needs many power supplies.

• Not stand alone. Wired.

• Controlled by computer.

*problem image animationI founded some problems, which can be improved.At first, it connected with many power supplies.I remember that there were about 10 power supplies for supplying power to servo motors.For that reason, the robot cannot move freely.*clickAlso there are lots of devices linked with the robot, such as power supplies, computer and so on. Because of them, the robot can not be stand alone.*clickAnd it controlled by computer. If the computer is disconnected, the robot will be dead.

Page 20: Make your own device with Script

MY PROJECTTo improve the previous project

Then, let’s see the my project.

Page 21: Make your own device with Script

PLAN•September

Order the materials

•October

Arrive the materials

•November

Design, Cutting, Assembling

•December

Programming and Finish

This is my original plan for making robot, but there were some problems.So actual process became like this.

Page 22: Make your own device with Script

PLAN

Order the materialsRobot Design SketchFinding the materialsMaking Robot Frame and AssemblingTest Plan 01 (TIP120)Test Plan 02 (Decade Counter 4017)Test Plan 03 (Master-Slave)Making ControllerTest and Trouble Shooting

2012/092012/092012/092012/09 2012/102012/102012/102012/10 2012/112012/112012/112012/11 2012/122012/122012/122012/12 2013/012013/012013/012013/01 2013/022013/022013/022013/02 2013/032013/032013/032013/03 2013/042013/042013/042013/04

This is my original plan for making robot, but there were lots of problems.So actual process became like this.

Page 23: Make your own device with Script

PLAN

Order the materialsRobot Design SketchFinding the materialsMaking Robot Frame and AssemblingTest Plan 01 (TIP120)Test Plan 02 (Decade Counter 4017)Test Plan 03 (Master-Slave)Making ControllerTest and Trouble Shooting

2013/012013/012013/012013/01 2013/022013/022013/022013/02 2013/032013/032013/032013/03 2013/042013/042013/042013/04

This is my original plan for making robot, but there were lots of problems.So actual process became like this.

Page 24: Make your own device with Script

ORDERED STUFFS

• TIP120 Transistor• Arduino Uno• Xbee Network Chips and Shields• Micro Servo Motors• Wires• Pin Sockets• Test Boards

These are what I ordered.

Page 25: Make your own device with Script

TEST PLAN 1

• Using TIP120 transistor, set up like LED matrix

*insert LED matrix diagramAt first, I thought if servos were connected like LED Matrix, it would work.However(*click) servo motor operated with PWM signal and the transistor switch can not make it.

Page 26: Make your own device with Script

TEST PLAN 1

• Using TIP120 transistor, set up like LED matrix

*insert LED matrix diagramAt first, I thought if servos were connected like LED Matrix, it would work.However(*click) servo motor operated with PWM signal and the transistor switch can not make it.

Page 27: Make your own device with Script

TEST PLAN 1

• Transistor can not be a switch with servo motor

*insert LED matrix diagramAt first, I thought if servos were connected like LED Matrix, it would work.However(*click) servo motor operated with PWM signal and the transistor switch can not make it.

Page 28: Make your own device with Script

TEST PLAN 2

• Using 4017 decade counter for controlling multiple servo

The first try was failed.So, I researched for controlling many servos with one arduino.And I found this. The 4017 Decade counter.If I can use this, that’s best. like this movie clip.But, unfortunately, I don’t have enough knowledge and experience with decade counter,.

Page 29: Make your own device with Script

TEST PLAN 2

The first try was failed.So, I researched for controlling many servos with one arduino.And I found this. The 4017 Decade counter.If I can use this, that’s best. like this movie clip.But, unfortunately, I don’t have enough knowledge and experience with decade counter,.

Page 30: Make your own device with Script

TEST PLAN 2

• I don’t have enough knowledge for using 4017 decade counter

The first try was failed.So, I researched for controlling many servos with one arduino.And I found this. The 4017 Decade counter.If I can use this, that’s best. like this movie clip.But, unfortunately, I don’t have enough knowledge and experience with decade counter,.

Page 31: Make your own device with Script

TEST PLAN 3

• Using two arduino and making master & slave system

*insert master and slave conceptSo, I should use the final plan, Master-N-Slave.The controller send the command to this xbee chip, then xbee send it to master arduino.The master arduino is connected with upper part servos, arm joints. So, arms are moving.At the same time, the master arduino send the command to the slave arduino.And the slave one is connected with lower part servos, leg joints. So, legs are moving.

Page 32: Make your own device with Script

DESIGN

•Paper Sketch•CAD•Making Blueprint•Drawing on the sheet•Cutting•Folding and Assembling

And now let’s see how did I design the robot.This is my process of the designing robot and assembling it.First of all, sketching on paper.Based on that sketch, make the CAD model.From the CAD model, get blueprint.Copying the blueprint on the material sheet. In this project, aluminum sheet.Cut it and fold it and assemble it.

Page 33: Make your own device with Script

These are my paper sketches.That one is related with the construction of robot.And those are for programming. What degree will be need to the robot operating.

Page 34: Make your own device with Script

CAD

• Computer Aided Design

• Solidworks 2010

• Making 3D Model

• Blue Print Available

And CADIt stands for Computer Aided Design.Many field use the CAD. Such as mechanical engineering, building construction, industrial engineering and etc.There are many CAD software like Solidworks, CATIA, AutoCAD...And I used Solidworks 2010.With the CAD you can make 3D model of the product and also from the model you can get the blue print.In Korea, there are many commercial mechanical cutting shops.If I send the CAD Blue prints to them, then I can get cut materials easily.But, unfortunately, not in here, Ethiopia.

Page 35: Make your own device with Script

This is my CAD model of the robot.

Page 36: Make your own device with Script

And from the CAD model, I can get the blueprints.

Page 37: Make your own device with Script

And from the CAD model, I can get the blueprints.

Page 38: Make your own device with Script

MATERIALS

• No material shop

• Need to find alternatives

• Hard to handle the materials

• No CNC cutting shop

Materials.It was also one of the hard part of the project.There is no professional material shop. Meaning for small and sensitive devices.For example, for assembling the robot, I needed 2mm bolts and nuts. However, it’s hard to find. So, I should find alternative materials. I used screws of old cassette tapes.And I already said, there is no cutting shop.

Page 39: Make your own device with Script

This is the aluminum sheet with the blueprints.I manually copied the blueprints on the sheet, and cut it.

Page 40: Make your own device with Script

From that cut blueprints, bended and assembled.This is figure of the robot.

Page 41: Make your own device with Script

From that cut blueprints, bended and assembled.This is figure of the robot.

Page 42: Make your own device with Script

PROGRAMING

• Using Arduino

• Using 3rd Party Library

• Rough Code : 31,692 bytes

• Final Code : 11,222 bytes

• Optimize is important

I used the arduino software.And using some libraries.Arduino uno has limited memory space. Almost 32kb.At first time I wrote the code, It was almost 32kb. It was too tight.So I try to reduce the code with using array list instead of multiple variables.In the end, the final code became 11kb.When you using the micro controller, optimizing and reducing code is importance.

Page 43: Make your own device with Script

USED LIBRARIES

• Servo.h

• SoftwareSerial.h

• GPSXClass.h (3rd Party Library)

Then, let’s see the libraries that i used.Servo.h for controlling servo motors.SoftwareSerial.h for communicate between arduinoes and xbee chips.And GPSXClass.h for using play station 2 game pad as a controller.

Page 44: Make your own device with Script

SERVO.H

<simple servo.h example code and explanation>These all things are just sample code.The arduino code is basically consist of the setup function and the loop function.When the arduino start up, setup function is executed.after that loop function loops.In this code, first of all, in setup function, attaching servo motor on arduino’s digital pin number 9.And, in loop function, change the servo motor angle from 0 to 180 degree and back to 0 degree.

Page 45: Make your own device with Script

SERVO.H

<simple servo.h example code and explanation>These all things are just sample code.The arduino code is basically consist of the setup function and the loop function.When the arduino start up, setup function is executed.after that loop function loops.In this code, first of all, in setup function, attaching servo motor on arduino’s digital pin number 9.And, in loop function, change the servo motor angle from 0 to 180 degree and back to 0 degree.

Page 46: Make your own device with Script

SOFTWARESERIAL.H

<simple SoftwareSerial.h example code and explanation>This is SoftwareSerial example.On arduino, there are native serial ports, tx and rx. They are used at communication with the computer.But if you use this library, you can make your own serial port with any other devices.In my project, I connected 2 arduinoes and XBee network chip.

Page 47: Make your own device with Script

SOFTWARESERIAL.H

<simple SoftwareSerial.h example code and explanation>This is SoftwareSerial example.On arduino, there are native serial ports, tx and rx. They are used at communication with the computer.But if you use this library, you can make your own serial port with any other devices.In my project, I connected 2 arduinoes and XBee network chip.

Page 48: Make your own device with Script

GPSXCLASS.H

<simple GPSXClass.h example code and explanation>This is for using play station 2 game pad as controller.In setup function, this is setting of the game pad.And in loop function, when you press the button, if functions are detecting it and execute the commands.

Page 49: Make your own device with Script

GPSXCLASS.H

<simple GPSXClass.h example code and explanation>This is for using play station 2 game pad as controller.In setup function, this is setting of the game pad.And in loop function, when you press the button, if functions are detecting it and execute the commands.

Page 50: Make your own device with Script

GPSXCLASS.H

<simple GPSXClass.h example code and explanation>This is for using play station 2 game pad as controller.In setup function, this is setting of the game pad.And in loop function, when you press the button, if functions are detecting it and execute the commands.

Page 51: Make your own device with Script

GPSXCLASS.H

<simple GPSXClass.h example code and explanation>This is for using play station 2 game pad as controller.In setup function, this is setting of the game pad.And in loop function, when you press the button, if functions are detecting it and execute the commands.

Page 52: Make your own device with Script

CONTROLLER

• Control with wireless network: Xbee

• PlayStation Controller

• Making own shield

• Using 3rd Party Library[GPSX]for controller program

This is the controller that I made.For using wireless network, Setup the xbee chip.Hacking the play station 2 game pad for attaching it on the arduino.For easy to using, make own shield for arduino.And use the 3rd parth library, that you already watched one.

Page 53: Make your own device with Script

This is the game pad.connected with the arduino and this is the xbee network chip.And.. it communicate with other side's one. And this arduino is connected with servo motor.When use the controller, servo motor is moving.

Page 54: Make your own device with Script

TEST AND TROUBLES

• When power is on, servo motors work like DC motors

• Arduino reset problem

• Lack of expert knowledge

• Hard to find specific things for making

But when I connected all thing, there were some problems.At first, when power is on, servo motors work like DC motors.Just rotate one way, not controlled.And sometimes, arduino get reset.

My major is not electronic engineering. For that reason, I don’t have enough knowledge.And the last thing is already I said in material session.

Page 55: Make your own device with Script

CONCLUSIONWhat I get and Suggestion

So, let’s see what I get on this project.

Page 56: Make your own device with Script

CONCLUSION

• No commercial machine cutting place

• Hard to find materials and items

• People do alternative way

• Can be improve with developing this kind of environments

In Bahir dar, there is no commercial machine cutting shop. Or, it hard to find.And also no material shop for the small devices.In Korea, when you order the machine cutting, you can get it afternoon.If one of you open this kind of store or shop, it will be good to improvement of Ethiopia.

Page 57: Make your own device with Script

SUGGESTION

• Make your own device for better life and environment

• Show your idea for everybody

• Make a team with experts of different fields

Finally, I want to suggest some opinions.Like this.Make your own device what ever you think for better life and environment.Share your idea and do it.Making team is important. Gathering different fields’ persons.

Page 58: Make your own device with Script

You are the ONE

who make the BETTER WORLD

You are the One who make the better world.Cheer up, and make your own device for the world.

Page 59: Make your own device with Script

ኣመስግናለሁ።

Thank you.

Page 60: Make your own device with Script

Q & A