IMU Guidance Servoblaster Code for the IMU Going mobile.

Slides:



Advertisements
Similar presentations
RedBot An introduction to robotics using the SparkFun RedBot Board
Advertisements

PHY 235 Robotics Workshop Day 6 DC Motors, H-Bridge Board, Simple Lego/Boe Bot.
Servos The material presented is taken from a variety of sources including:
5/13/ Assembling and Testing Your Robot. 5/13/2015 Mounting the Topside Hardware  Parts Boe-Bot Chassis (1) Standoffs (4) 1/4” 4-40 Screws (4)
Using the Board of Education Breadboard and Your Multimeter ENGR 120 Work in teams of two!
1 Boe-Bot Parts BOE-BOT Lecture #1b DE - Digital Electronics.
Servos The material presented is taken from a variety of sources including:
EET 2261 Unit 13 Controlling Stepper Motors and Servos  Read Almy, Chapter 21.  Lab #13 due next week.  Final Exam next week.
EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Robotics Day4.
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
Embedded Programming and Robotics Lesson 6 Mechanical Assembly 1.
BAE SYSTEMS PROPRIETARY – Internal Use Only Unpublished Work Copyright 2014 BAE Systems. All rights reserved. BAE Systems C2C SWAT Project Tutorial 4,
Basic Stamp Quick Start. Basic Stamp II Self contained computer –“Micro-controller” Specialized for “embedded” computing (sensing and controlling things)
Using the Gyro Sensor and Dealing with Drift
Segway Controller Notes. = connection on top layer of circuit board = connection on bottom layer of circuit board Ground Plane: Areas enclosed by the.
Computer Engineering Remote Controlled Car Project ACSE 2006 Graham Smyth Jerry Dolata.
Intro to Arduino Programming. Draw your circuits before you build them From Arduino 330 Ohm From Arduino 330 Ohm From Arduino 330 Ohm.
Electronics and Robotics Merit Badges
Advanced Digital Circuits ECET 146 Week 4 Professor Iskandar Hack ET 221G,
First, let’s review the structure and use of a breadboard.
Servos The material presented is taken from a variety of sources including:
BAE SYSTEMS PROPRIETARY – Internal Use Only Unpublished Work Copyright 2014 BAE Systems. All rights reserved. BAE Systems C2C SWAT Project - WF32 Shield.
Digital Electronics The Boe-Bot and Servo Motors.
BAE SYSTEMS PROPRIETARY – Internal Use Only Unpublished Work Copyright 2014 BAE Systems. All rights reserved. BAE Systems C2C SWAT Project – WF32 Shield.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class3/Lab 2.
ENG241/ Lab #11 ENG2410 Digital Design LAB #1 Introduction Combinational Logic Design.
Bonus EV3 Programming Lessons By Droids Robotics LEGO MINDSTORMS and Raspberry Pi IR Light controller.
Bonus EV3 Programming Lessons LEGO MINDSTORMS ev3dev and Raspberry Pi IR Light controller.
Designing a Next-Generation Surgical Robot Activity.
SAMI MAKERSPACE MAKE: AN ELECTRONICS WORKSHOP. SERVOS Precise rotations.
Vex Robotics program three: using motors and sensors together.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
MIND CONTROLLED ROBOT BY ADITHYA KUMAR EIGHTH GRADE.
Introduction to Arduino A very basic intro to Arduino, the IDE and the Servos class.
Istituto Tecnico Industriale A.Monaco EURLAB Control a Servo Motor If you want to swing an robot arm or … steer a robot you need a special motor (Servo).
Limited rotation servo basics David Hall output shaft servo horn red wire = 5V + black wire = Gnd - white wire = control signal standard servo.
Controlling an LED with a switch. 2 breadboard place where you can build electric circuits really quickly the magical breadboard.
Microcontroller basics Embedded systems for mortals.
What is your age in binary? I am is a decimal number Use this table to convert a decimal number into a binary number. To make 12 I need to add 8.
Robotics Grant Agreement No LLP UK-LEONARDO-LMP Project acronym: CLEM Project title: Cloud services for E-Learning in Mechatronics Technology.
Motors & Motor Controllers
Having fun with code, using Arduino in a middle school CS classroom
Getting started with the Arxterra software and 3DoT Firmware
Dr. Kyung Eun Park Summer 2017
If you want to swing an robot arm or …
Microcontroller basics
Raspberry Pi Hands-on Seminars
Introduction to Servos
Program the robotic arm
Diagram of the Board of Education
Wiring the Breadboard (the right way).
Servos The material presented is taken from a variety of sources including:
LAB #1 Introduction Combinational Logic Design
Servos The material presented is taken from a variety of sources including:
Gyroscopes & Accelerometers Sensor fusion Using MPU-6050
Programming Boe-Bots (Part 1)
Servos The material presented is taken from a variety of sources including:
Internet-of-Things (IoT)
Servos and Stepper Motors
Using the Gyro Sensor and Dealing with Drift
Welcome to Digital Electronics using the Arduino Board
Using the Gyro Sensor and Dealing with Drift
EET 2261 Unit 12 Controlling Stepper Motors and Servos
Robotics System Lecture 4: Gyro Reading using Arduino
Teacher training resource: Robotic Assembly
Aeroponic Engineering and Vertical Farming
UNIT 11: RC-SERVOMOTOR CONTROL
Using the Gyro Sensor and Dealing with Drift
I/O Experiments Assignment 1.
Robot and Crickit HAT © Copyright 2019 by Dr. Elizabeth I. Horvath and Dr. Eva A. Horvath 1.
Presentation transcript:

IMU Guidance Servoblaster Code for the IMU Going mobile

Build the Basic Bot Build your bot using the parallax chassis – Use a battery pack that holds 6 AA batteries – Mount your breadboard so that it’s center groove is aligned with the plane of symmetry of the chassis – Instructions for mounting the servos to the chassis can be found on page 73 of Robotics with the Boe-BotRobotics with the Boe-Bot – Mount your T-cobbler on your breadboard and connect it to the Pi Judicious (i.e., using small amounts) apply double-sticky- back tape to secure your breadboard and the Pi to the chassis

Parallax Servo Connections Servo Connector: Black – ground Red – power White – signal Image credit:

Servoblaster Setup Download Servoblaster from GitHub per instructions in your HW Install “user space” daemon – Edit init-script to set idle-timeout if desired Edit /etc/init.d/servoblaster if already installed – Command: sudo make install Causes code to always initiate at system start-up Run program to view parameter – Command: servod

Running Servoblaster Servoblaster can run 8 servos at once – Note pin assignments in output of servod – For this effort, I suggest using GPIO17 and GPIO18 Connect your servos – Connect GPIO17 to the white wire in one servo header – Connect GPIO18 to the white wire in the other servo header – Connect the black wires in the servo headers to ground – Connect the red wires in the servo headers a 5V supply Run the servos using servoblaster – E.G. command: echo 1=120 > /dev/servoblaster Servod Pin Numbers:

Mount the MPU-6050 on Your Breadboard Connecting the MPU to the Pi MPU6050 Pi Pin ID Pin ID VDD --> 3.3V on Pi GND --> GND on Pi SCL --> SCL on Pi SDA --> SDA on Pi XDA XCL ADO --> GND on Pi INT

Checkout the IMU Try the following to assure that your IMU is working: – sudo i2cdetect -y 1 –./demo_dmp –./demo_3d

Programming the IMU Object: A program to travel at a specific heading – Combine demo_dmp.cpp and our earlier line following code to program a bot that travels forward at a pre-defined angular orientationline following code Approach: – Edit and re-purpose loop() in demo_dmp.cpp to read the IMU Use just the yaw values (rotation about z) Add a return value to test for a good read Could adjust FIFO sample rate---this is done in the Makefile Recognize gyro drift when possible! Recognize occasional 180 degree angle flip.

Controlling the Servos #include int main(void) { FILE *fp; fp = fopen("/dev/servoblaster", "w"); if (fp == NULL) { printf("Unable to open file\n"); exit(0); } fprintf(fp, "2=200\n"); fflush(fp); fclose(fp); return 0; }

Putting It All Together IMUfollowing.cpp Makefile Problems: – Gryo drift – Servo control – Never properly tested

Battery Power The Pi draws a lot of current Proposed hardware: – (6) AAs (nominally 8 V) – (2) 5 Volt regulators – (4) capacitors Separate Pi from the servos – Output of one regulator is 5V input to the Pi – Output of one regulator is 5V power for servos – Input to both regulators is the battery pack – Put capacitors on both regulator inputs and outputs – Everything on a common ground

Two power supplies with a common ground