Download presentation
Presentation is loading. Please wait.
Published byLynne Holland Modified over 7 years ago
2
Introduction to robotics essentials, Registration and Orientation
Miami Valley Computer Science Circle an enrichment program focusing on Computational Thinking for high school and advanced level middle school students Introduction to robotics essentials, Registration and Orientation Mr. Ken Nelson (Senior Network Security Engineer at Wright State University, M.S. in CS., MBA) Saturday, January 14th 10:00 – 12 PM 1st and 3rd Saturday of every month Room 170, Mathematics and Microbiology (MM), Wright State University (WSU) If you have any question, please contact Dr. Munsup Seoh at and Dr. Lining Qi at
3
Helpful robotics sites
(search Arduino, raspberry pi or robot for projects) (login to wsuvpn with account then go here and search for books)
4
What is robotics? What disciplines are involved in robotics?
Mechanical Engineering Electrical Engineering Computer programming …….more….. How to robots move? wheeled tracked Legged (2,4,6,8 …) Flying (quadcopter) …….more….. (snake, fish)
5
What is robotics cont. How are robots controlled?
Remote control Phone apps Programmed by Computers (wired/wireless) (Linux/Windows/Raspberry Pi) - C/C++, Scratch, artoo, Johny-Five(javascript), python… Control board (Arduino, raspberry pi …..) Autonomous code (follow an object, track, navigate a maze, self learning-neural net)
6
What can robots do? Build cars? Explore mars?
Automate many industrial applications (welding, material handling, cutting, assembly,mining …) Pretty much any manual job that is repetitive Military? Bomb disposal, Space repairs(rov / rms) Medical? Remote surgery Fix oil spills, Environmental hazard cleanup Farming? Pruning/weeding/spraying/irrigation…. Fast food? Flip burgers, make fries, take orders (autonomous kiosk) ved=0ahUKEwiVrP_mz7fRAhUq_4MKHSzqA88QsAQIZQ&biw=1920&bih=921
7
Future Robots? Exoskeletons for the handicap, Autonomous androids?
Pets, maids, nannies ???????????????? Self driving cars? (Tesla, google ….) RPA (automation) does what you tell it vs AI (machine learning) refines itself, adaptive learning 6% of jobs by 2020 will be robotic (shows I-Robot / Human)
8
Basic Components Arudino Uno Raspberry Pi 3 Model B
Chasis/mobile platform Motor controllers and motors Sensors (IR, sonic, visual) Cameras Battery
9
Pi Car will be our introduction to robotics
This is a basic fairly cheap car. Roughly $80 + the Raspberry pi controller. We will learn how to setup Raspberry pi & program on it. We will put together the car and add a camera and a sensor The car can be controlled wirelessly from a computer and able to push video to a webpage (which we can use to control the car when not able to see it) The car also has a sensor to prevent running into obstacles.
10
Hardware components Raspberry Pi 3 4-wheel Robot smart car chassis kit
External battery power bank L298N stepper motor controller board HC-SR04 sonar module distance sensor Raspberry Pi camera module + (flex mount or glass case) 40pin male/female breadboard jumper wires External Batter power bank (usb) optional Wireless USB adapter dongle Breadboard (small 3x2) Wireless keyboard (wirelessly control the car) Software: VLC Tools: insulation tape and screwdriver
11
Preparing the Raspberry PI
You can install NOOBS (New out of box software) or Download Raspbian If purchased the PI with an SD card it should have NOOBS installed NOOBS has Raspbian and other products ready to go Attach the wireless internet and keyboard adapters to the PI usb slots Attach hdmi cable from PI to monitor You can do the updates and config now or after building the car so don’t have to redo some PI config
12
The Build Connect motors to motor driver board
Build the chasis – remember to attach a red(top)&black(bottom) wire to motors Connect motors to motor driver board Connect Raspberry Pi to Motor driver GPIO pin2 to 5v GPIO pin6 to GND GPIO pin7 to INI4(eva) GPIO pin11 to INI3 (5v) GPIO pin13 to INI2 (5v) GPIO pin15 to INI1 (EVB)
13
Build Cont. Attach the HC-SR04 ultrasonic distance sensor
Plug the sensor into the breadboard Add a 1ohm resistor the the black cable to Protect the Raspberry PI Connect wires to the PI and motor (echo)Yellow cable to Pin 16 on PI (fem-male) (trigger)Orange cable to Pin 12 on PI (fem-male) (ground)black cable to GND on the motor driver (fem-male) (power)red cable to 5V on motor driver (fem-male)
14
Build Cont. Add the camera to the PI
Position power pack in back of chasis (for PI)
15
Setup PI and the CAR Configure the PI (click expand filesystem make sure full SD in use) Click interface (ensure ssh is enable and the camera) Click localization (set language and country) OK and reboot Once reboots click NETWORK, select wifi router and enter password Sudo apt-get update && sudo apt-get upgrade Sudo apt-get install vlc (y when prompted) On the smartphone/pc Now the PI is ready and you can start coding.
16
Create files to control car
Mkdir PiCar Cd PiCar Copy the files in from a jump drive or wireless or create them. Sudo nano main.py or Sudo vi main.py Sudo nano sensory.py Sudo nano camera.sh Car is now done
17
Main.PY What are some things are car needs to be able to do?
Forward? Reverse? Turn Right? Turn Left? Stop? How do we make it do things? Autonomous? Key Input?
18
Main.PY Each task is a procedure Easier to manage and change
19
Sensor.py What is are sensor capable of doing?
Measure distance, angle, height? Track an object? Track a line? Determine weight, pressure? How does the sensor work? Light? Sound? Vision? Tactile? How many sensors do we have? .PY for each sensor? How many sensors should we have? Tasks to complete? Procedure for each task?
20
Sensor.py
21
Camera.sh #!/bin/bash raspivid -o - -t 0 -hf -w 600 -h 400 -fps 30 |cvlc -v stream:///dev/stdin -- sout '#standard{access=http,mux=ts,dst=:8554}' :demux=h264 We are just setting the camera on, its size and speed and where to send the output. This camera is not for input, but only outputting what it sees, so a pretty simple command. Some robotics use a special camera for input like a Kinect for xbox.
22
How to run the car/code 1. Power on the Pi (with HDMI cable connected to a monitor) 2. Once booted, open up Terminal 3. Change directory to PiCar (Type cd PiCar) 4. Run Car File (Type 'sudo python main.py') 5. The PiCar is now running and controllable via the wireless keyboard (Remember to remove the HDMI cable before driving the car!) The below keys will drive the car: W = Forward S = Reverse A = Turn Left D = Turn Right P = Stop The Pi will also be semi-autonomous in the sense that if anything gets within 15cm of the front sensor then the PiCar will automatically reverse for a second.
23
Stream the camera online
1. Open Terminal 2. Change directory to PiCar (Type cd PiCar) 3. Run camera.sh (Type ./camera.sh) On the Client computer/smartphone: 1. Launch VLC 2. Click 'File' and then 'Open Network Stream' 3. Type 4. Click 'Open' and after a few seconds a new window will open with the stream.(There may be a few seconds lag) (hostname –I ) to see ip
24
Our mini autonomous robot
The robot we will build is a scaled down version of this If time permits we may do both!!
25
Obstacle Avoidance For the operating mode obstacle avoidance I use Sharp infrared distance sensors, provided by Pololu, mounted on tiny boards (see photos and component list below). I attached 2 sensors that are sensing distance to 5 cm at the front edges with an angle of 45°, and a 10 cm type in the middle.
26
Line Follower The line follower is realized with the Pololu "QTR-3A Reflectance Sensor Array" with three IR emitter and receiver (phototransistor) pairs
27
Maze Solver For the maze solver I use the same sensors as for the line follower. That means I have only 3 sensors, rather than 5 or more, which seems to be usual. It spins to compensates the absence of the outer sensors that are typically used for that purpose.
28
Turn Pi-car into an autonomous car
With the addition of a second motor controller to make front and rear wheels independent and a few extra longer range sensors and much more complex code we can turn our car into this. (using a combination of the previous 3)
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.