How Robots Use Maths to Move

James Bruton
1 Mar 202115:54

Summary

TLDRThis video script details the creation of a simple robot arm project with an inverse kinematic model, designed to move a ping pong ball through a contraption. The project uses basic servos, 3D-printed parts, and an Arduino Uno for control. It demonstrates the arm's ability to move in a straight line in 2D space and includes a gripper for ball manipulation. The script also discusses the use of potentiometers for analog input and the 'ramp' library for smooth motion interpolation. The project is part of a larger 'Great Ball Contraption' and is shared as open-source on GitHub.

Takeaways

  • πŸ€– The video discusses the application of inverse kinematics in robotics, which is essential for positioning a robot's end effector in a specific location within a known coordinate system.
  • πŸ“ The presenter has used inverse kinematics in robot dog projects to coordinate the feet for movement in three dimensions, allowing for translation and rotation.
  • πŸ”§ The project involves a simple robot arm with a basic inverse kinematic model, which is part of a larger 'Great Ball Contraption' project demonstrating science and engineering concepts.
  • πŸ› οΈ The robot's base consists of a sliding axis with V-wheels and a frame for stability, using drop-in T-nuts for easy assembly.
  • πŸ”© The robot arm uses basic servos with metal brackets for easy mounting, creating a limb with multiple joints that can be controlled via a servo PWM signal.
  • πŸ”„ The arm includes a linear axis for shoulder movement, an elbow joint, and a gripper at the end controlled by another servo, designed to pick up and move ping pong balls.
  • πŸ”‹ A 7.4-volt 2-cell LiPo battery powers the servos and a DC motor for the linear axis, managed by an L298 motor driver.
  • πŸ“Š The inverse kinematic model for the robot is simple, suitable for an 8-bit Arduino Uno, and involves calculating joint positions based on the desired end effector position.
  • πŸ“ The arm's design uses a triangle with two equal sides, simplifying the math for calculating joint angles using Pythagoras' theorem.
  • πŸ“Š The video includes a demonstration of the arm's movement in a straight line controlled by potentiometers, showing the effectiveness of the inverse kinematics model.
  • πŸ’» The project's code and CAD files are open source and available on GitHub for modification and inspiration for other projects.

Q & A

  • What is the purpose of an inverse kinematic model in robotics?

    -An inverse kinematic model in robotics is used to calculate the joint positions required to place the end effector, such as a robot's foot, at a specific point in a known coordinate system.

  • How does the inverse kinematic model enable a robot to move its feet in a coordinated manner?

    -The model allows the robot's feet to move from point A to point B in a straight line by calculating the joint positions at each waypoint between the two positions, enabling coordinated movement in three axes of translation and rotation.

  • What is the 'Great Ball Contraption' project mentioned in the script?

    -The 'Great Ball Contraption' is an ongoing project that involves creating a series of machines to pass ping pong balls from one stage to another, demonstrating various science and engineering concepts.

  • What materials and components are used for the main base of the robot in the project?

    -The main base of the robot consists of a simple sliding axis with V wheels attached to a 3D print using M5 bolts and lock nuts, with the wheels fitted with bearings and spacers for smooth rotation.

  • How are the servos used in the robot arm project mounted and connected?

    -The servos are mounted using metal brackets and connected by screwing them onto 3D prints with self-tapping screws, allowing for easy assembly of the robot arm's multiple joints.

  • What role does the servo mounted on top of the first servo play in the robot arm?

    -The servo mounted on top of the first servo provides an additional mechanical stage to the robot arm, functioning as the shoulder joint, which, along with the elbow joint, allows for a wide range of positions.

  • What is the function of the gripper's fingers and how are they constructed?

    -The gripper's fingers are 3D printed and consist of two parallel plates that are spaced apart and screwed together to grip the ping pong balls. They are actuated by a servo that pulls strings attached to the plates to open and close the gripper's jaw.

  • What is the computational requirement for the kinematic model of the robot arm?

    -The kinematic model for the robot arm is simple enough to be controlled by an 8-bit Arduino Uno, which calculates the necessary joint positions based on the desired end effector position.

  • How is the linear sliding axis of the robot arm powered and controlled?

    -The linear sliding axis is powered by a 7.4-volt 2-cell LiPo battery, which provides sufficient current to operate the servos and the DC motor. The motor is controlled using an L298 motor driver and an encoder for precise movement.

  • What modifications were made to the robot arm to ensure the gripper does not crush the ping pong balls?

    -An elastic band was used to pull the gripper fingers together for gripping the ping pong balls, and the gripper activation servo was adjusted to ensure the fingers move freely and do not apply excessive force.

  • How does the Arduino ramp library help in making the robot arm's motion smoother?

    -The Arduino ramp library allows for interpolation between positions, enabling the servos to move at a controlled speed and reach their target positions smoothly over a specified time period.

  • What is the final function of the robot arm in the 'Great Ball Contraption' project?

    -The robot arm is programmed to move through set motions using the kinematic model to pick up ping pong balls at a sensor-triggered ramp, transport them to the other end, and drop them into the next stage of the contraption.

Outlines

00:00

πŸ€– Introduction to Inverse Kinematics and Robot Arm Design

The script introduces the concept of inverse kinematics in robotics, which is essential for calculating joint positions to achieve a desired end-effector position in a known coordinate system. The speaker discusses their experience with inverse kinematics in robot dog projects and presents a new project involving a simple robot arm with an inverse kinematic model. The robot arm is part of a larger 'Great Ball Contraption' project that demonstrates various scientific and engineering concepts. The base of the robot consists of a sliding axis with V-wheels and a frame for stability. The arm itself is constructed using servos with metal brackets for easy assembly, and the project is sponsored by 3D Fuel, which provided the filament for 3D printing components.

05:01

πŸ”§ Building the Robot Arm and Writing Inverse Kinematics Code

The paragraph details the construction of the robot arm, which includes a linear sliding axis, servos for shoulder and elbow movements, and a gripper at the end controlled by another servo. The servos are connected using 3D printed parts and screws, creating a simple yet functional design. The kinematic model is kept basic, requiring only an 8-bit Arduino Uno for control. The script also describes the process of writing code for the inverse kinematics, which involves calculating joint positions based on the arm's length and desired end-effector position. The use of trigonometry and potentiometers for analog input is explained, allowing the arm to move in a straight line along one axis. The code and CAD files for the project will be open-sourced on GitHub.

10:02

πŸ“ˆ Refining Motion Control with Arduino Ramp Library

This section discusses the refinement of the robot arm's motion using the Arduino Ramp library, which provides smooth interpolation between positions. The script explains the initial jerkiness of the servos' motion and how the Ramp library helps to create a smoother movement. The library's example code is used to demonstrate a linear rise in values, which is applied to both the z and x positions of the arm. The result is a more controlled and fluid motion that can be adjusted by varying the interpolation time. The script also mentions the use of a sensor to detect the presence of balls and trigger a series of motions to pick up and pass the balls along the contraption.

15:11

πŸŽ₯ Finalizing the Robot Arm and Future Enhancements

The final paragraph wraps up the project by showing the robot arm in action, picking up balls and moving them to the next stage of the 'Great Ball Contraption'. The script describes the safeguards in the code to ensure the arm completes one cycle before being triggered again, allowing it to continue picking up balls until the ramp is empty. The speaker expresses satisfaction with the functional aspect of the project and suggests future enhancements, such as adding LED strips to visually represent the inputs to the axis as the arm moves. The script concludes by inviting viewers to like, subscribe, and support the channel through Patreon or YouTube membership, with links provided in the video description.

Mindmap

Keywords

πŸ’‘Inverse Kinematics

Inverse kinematics is a method used in robotics to determine the joint parameters required to position the end effector (like a robot's hand or foot) at a specific location in space. It's crucial for tasks that require precise movements. In the video, the creator uses inverse kinematics to control a robot arm, enabling it to move its 'feet' or end effectors to designated points in a coordinated manner, which is essential for the robot's movement in 3D space.

πŸ’‘End Effector

The end effector is the terminal component of a robot's arm that interacts with the environment to perform tasks such as grasping, moving, or manipulating objects. In the context of the video, the end effector is the gripper at the end of the robot arm designed to pick up ping pong balls, demonstrating the practical application of robotic limbs in a specific task.

πŸ’‘Coordinate System

A coordinate system is a well-ordered set of mathematical rules for assigning a pair of numbers, known as coordinates, to every point. In robotics, a known coordinate system is used to define positions for the robot to move to or interact with. The video script mentions calculating joint positions to place the end effector at specific points within a known coordinate system, which is fundamental to the operation of the robot arm.

πŸ’‘Robot Dog Projects

Robot dog projects refer to the development and construction of robotic mechanisms that mimic the movement and behavior of dogs. In the video, the creator mentions using inverse kinematic models in multiple robot dog projects, which allows the robot's legs to move in a lifelike manner, enhancing the robot's ability to navigate and perform tasks in three dimensions.

πŸ’‘Great Ball Contraption

The Great Ball Contraption is an ongoing project mentioned in the video that involves creating a series of machines to pass ping pong balls from one stage to another. Each stage demonstrates different science and engineering concepts. The robot arm designed in the video is intended to be a part of this contraption, showcasing the practical integration of robotics in a larger, interactive system.

πŸ’‘Servo PWM Signal

A servo PWM (Pulse Width Modulation) signal is a type of control signal used to command the position of a servo motor. In the video, the servos used in the robot arm operate with a servo PWM signal, which makes them easy to control for precise movements. The servos are mounted with metal brackets to facilitate the assembly of the robot's limbs with multiple joints.

πŸ’‘Gripper

A gripper is a mechanical device that is used to grasp, hold, or move objects. In the context of the video, the gripper is a crucial part of the robot arm, designed with 3D printed fingers that can open and close to pick up and hold ping pong balls. The gripper's operation is controlled by a servo, demonstrating the application of robotics in manipulating objects.

πŸ’‘Arduino Uno

The Arduino Uno is a microcontroller board based on the ATmega328P. It is widely used in robotics and other DIY projects for its ease of use and versatility. In the video, an Arduino Uno is employed to control the servos and the overall movement of the robot arm, highlighting its role in managing the inverse kinematics model.

πŸ’‘L298 Motor Driver

The L298 is a dual full-bridge driver designed to drive inductive loads, such as relays, solenoids, DC, and stepping motors. In the video, an L298 motor driver is used to power the motor for the linear axis of the robot, indicating its importance in enabling the robot's movement along a straight path.

πŸ’‘Ramp Library

The Ramp library is an Arduino library that allows for smooth motion control by ramping the speed of motors or servos over time. In the video, the creator uses the Ramp library to make the robot arm's movements smoother by interpolating between positions over a set amount of time, improving the overall functionality and visual appeal of the robot's motion.

πŸ’‘Potentiometers

Potentiometers are electronic components that provide a variable resistance that can be adjusted manually. In the video, the creator uses potentiometers as an analog input to control the movement of the robot arm along one axis, demonstrating a simple method for adjusting the position of the arm and testing the inverse kinematics model.

Highlights

Inverse kinematic models enable robots to calculate joint positions for placing end effectors at specific coordinates.

The speaker has applied inverse kinematics in robot dog projects for coordinated multi-axis movement.

A simple robot arm project with an inverse kinematic model is part of the 'Great Ball Contraption', demonstrating scientific and engineering concepts.

3D Fuel provided filament for the project, showcasing the importance of materials in 3D printing.

The robot's base consists of a sliding axis with V wheels and a sturdy frame for stability.

Basic servos with metal brackets are used for the robot arm, allowing for easy assembly and control.

The robot arm design includes a shoulder and elbow joint for a wide range of motion.

A gripper with 3D printed fingers and a servo-activated jaw is designed to pick up ping pong balls.

An 8-bit Arduino Uno is sufficient to control the simple kinematic model of the robot arm.

A 7.4V 2-cell LiPo battery powers the servos and the DC motor for the linear axis.

The L298 motor driver and an encoder are used for smooth motion control of the linear axis.

Elastic bands and strings are used for the gripper's compliant mechanism to hold ping pong balls.

Trigonometry and Pythagoras theorem are applied in the inverse kinematic calculations.

Arduino code is used to convert mathematical solutions into servo control signals.

Potentiometers provide an analog input for testing the arm's motion in a straight line.

The speaker's approach to inverse kinematics simplifies calculations for a two-link arm.

PCBWay is highlighted for their PCB manufacturing and assembly services.

The robot arm's motion is tested for smoothness using the Arduino Ramp library.

A sensor is used to detect the presence of ping pong balls and trigger the gripper.

The robot arm is programmed to move through set motions for the 'Great Ball Contraption'.

The project's code and CAD files are open source and available on GitHub for community use.

LED strips are suggested for visual representation of the robot arm's axis inputs.

The robot arm successfully demonstrates inverse kinematics in a functional and educational manner.

Transcripts

play00:00

i get many questions about inverse

play00:01

kinematics for robotics

play00:04

an inverse kinematic model gives us the

play00:05

ability to request to position the foot

play00:08

or end effector of a robot limb at a

play00:10

specific point in a known coordinate

play00:11

system

play00:12

and calculate all the joint positions in

play00:14

order to place it there

play00:16

i've used inverse kinematic models in

play00:18

multiple robot dog projects which allows

play00:20

the feet to be coordinated so that the

play00:22

robot's body can move in three axis of

play00:24

translation and three axis of rotation

play00:27

this allows us to move the robot's foot

play00:29

from point a to point b

play00:31

in a straight line by visiting all the

play00:33

waypoints between the two positions one

play00:35

after the other

play00:36

and calculating the inverse kinematics

play00:38

at each position

play00:40

so for this video i thought i'd make a

play00:42

simple robot arm project with a very

play00:44

simple inverse kinematic model and also

play00:46

make this part of the great ball

play00:48

contraption

play00:49

this is an ongoing project built in

play00:50

multiple parts which passes ping pong

play00:53

balls along from one stage to another

play00:55

by using machines which demonstrate

play00:57

science and engineering concepts

play00:59

these will eventually all be linked

play01:01

together so let's get the core parts of

play01:03

the design printed and i'll explain the

play01:10

concept

play01:22

thanks to 3d fuel for the filament for

play01:24

this project and lots of other projects

play01:26

so check out my channel for more 3d

play01:28

printing projects and check out

play01:29

3dfuel.com

play01:32

the main base for the robot is a very

play01:33

simple sliding axis

play01:35

so i've got some v wheels and i've

play01:37

attached those with the right spacing to

play01:39

a 3d print with some m5 bolts and lock

play01:41

nuts

play01:43

these v wheels came fitted with bearings

play01:46

and also spacers so you can do the bolts

play01:48

up nice and tight and they still rotate

play01:50

freely

play01:51

and that allows the carriage to run on a

play01:52

piece of v-slot extrusion that's going

play01:54

to make up the main base for the robot

play01:57

i've built a frame which goes at each

play01:59

end of the v-slot to make up four legs

play02:01

so we've got a nice sturdy base for the

play02:03

robot

play02:04

and i'm using drop-in t-nuts here so

play02:06

that we can attach all the pieces

play02:07

together

play02:08

as i have with many other projects so

play02:10

that makes one linear sliding axis which

play02:12

we can mount the robot

play02:14

arm on i'm using fairly basic servos for

play02:18

this project which work with a servo pwm

play02:21

signal so they're easy to control

play02:22

but these particular servos come with

play02:24

metal brackets so that we can mount them

play02:26

easily together to make up a limb with

play02:28

multiple joints

play02:30

they come with small screws and brackets

play02:32

so we can just screw those down to the

play02:33

3d print

play02:34

and screw the servos on each one has an

play02:37

arm which has another 3d print attached

play02:39

to it to make the next section of the

play02:41

robot

play02:41

arm and again they come with

play02:43

self-tapping screws which easily screw

play02:45

in

play02:45

and that makes it really easy to connect

play02:47

the servos together

play02:49

on top of the first servo is mounted

play02:51

another servo so i have two mechanical

play02:53

stages to my robot arm as well as the

play02:56

linear axis that everything sits on

play02:58

this gives me a shoulder and an elbow so

play03:00

we should be able to achieve quite a

play03:02

wide range of positions

play03:06

but of course we need a gripper to

play03:08

actually grip the ping pong balls to

play03:10

pick them up and move them through the

play03:11

machine so i fitted another servo

play03:13

on the very end which is going to

play03:15

control the end effector

play03:16

and that one's fitted at right angles i

play03:19

3d printed some fingers for my gripper

play03:21

which are two parallel plates

play03:23

and those are spaced apart and screw

play03:25

together with countersunk self-tapping

play03:26

screws

play03:30

i've used m4 bolts and lock nuts again

play03:33

to make sure we can tighten those up but

play03:35

not over tighten them

play03:36

so the fingers move really freely and

play03:38

the idea is that servo has two pulleys

play03:40

on

play03:41

which is simply just going to pull

play03:42

strings to open the jaw and they'll be

play03:44

sprung back together

play03:46

the kinematic model for this robot is

play03:48

going to be really simple so we don't

play03:49

need anything more than an 8-bit arduino

play03:51

uno to control

play03:53

all of it the servos i'm using need a

play03:55

minimum of 6 volts so i'm using a 7.4

play03:58

volt 2 cell lipo battery

play04:00

which has got more than enough current

play04:01

capability to power all of the servos

play04:04

as well as the dc motor on the sliding

play04:06

axis

play04:07

and to power the motor for the linear

play04:09

axis i'm using an l298 which is a fairly

play04:12

archaic motor driver but it does two

play04:14

amps and axis so that should be more

play04:16

than sufficient

play04:17

the motor itself is driven with an

play04:19

encoder hung on the back and i 3d

play04:21

printed a t5 pulley for it

play04:23

so this is just going to be a simple

play04:24

belt drive that goes all the way up and

play04:26

down the axis

play04:27

to move the carriage a bit like a 3d

play04:30

printer bed

play04:30

or tool head i've used an elastic band

play04:34

to pull the gripper fingers together so

play04:36

they can grip the ping-pong ball

play04:37

and i've also added the strings that go

play04:39

around those pulleys on the gripper

play04:41

activation

play04:42

servo so you can see the whole thing in

play04:44

operation

play04:46

obviously with the elastic band there we

play04:48

can't crush the ping pong ball

play04:50

and that makes the gripper pretty much

play04:51

compliant

play04:54

now the arm's assembled it's time to

play04:56

write some code for the inverse

play04:58

kinematic model

play04:59

and that allows to position the end

play05:00

effector where it picks up the ball

play05:02

in a known coordinate system and work

play05:04

out the joint positions

play05:06

for the other two or three joints

play05:09

my approach to this is to write some

play05:11

code that allows us to enter

play05:13

the resulting length of the arm and

play05:15

output the two joint positions

play05:17

at the shoulder and at the elbow and

play05:20

you'll have notice

play05:21

i've made this a triangle with two equal

play05:23

length sides

play05:25

for both the upper arm and the lower arm

play05:27

that makes the maths quite a lot easier

play05:31

that's a pretty easy type of triangle to

play05:33

solve but looking at the website

play05:34

mathsisfun.com we can find out how to

play05:36

solve various triangles

play05:38

in this case we know three sides and we

play05:40

want to find the missing angles

play05:42

this uses pythagoras theorem which is a

play05:44

simple piece of maths

play05:46

i converted that mass into arduino code

play05:48

which gives us the answers in radians

play05:50

which then need to be turned into

play05:52

degrees and into the milliseconds for

play05:54

the pwm that drives the servo

play05:57

of course once we've got one angle of

play05:59

the arm we can easily work out the

play06:01

others

play06:01

and since two sides of the triangle are

play06:03

equal two angles are also

play06:05

equal i took some potentiometers off a

play06:08

previous project from the junk pile i'm

play06:10

only going to use two of them but this

play06:11

allows me to have an analog

play06:13

input that allows me to sweep through a

play06:14

range of values and see if the maths

play06:16

works

play06:18

i'm only using one axis to start with

play06:20

but we should see that the arm moves in

play06:22

a straight line as i turn the pot

play06:24

and that straight line should be a 45

play06:26

degree angle with its origin at the base

play06:29

joint of the base servo

play06:31

the reason that it's at 45 degrees is

play06:33

because that was the default position

play06:35

for the servos

play06:36

basically the shoulder axis pointing

play06:38

straight up and the elbow axis at 90

play06:40

degrees

play06:41

i put that offset in the code and now

play06:43

everything is based off that offset

play06:45

and that 45 degree angle

play06:48

now we've taken care of the length of

play06:50

the arm and that's all dealt with with

play06:52

the first bit of code

play06:53

we now want to be able to enter two

play06:55

other axes to position the arm in at

play06:57

least 2d

play06:58

space that can be done with simple

play07:01

trigonometry though

play07:02

and the rest of the arm is already dealt

play07:04

with by the previous piece of code

play07:06

the trigonometry looks like this cos of

play07:09

theta the angle at the base

play07:11

equals the adjacent over the hypotenuse

play07:14

and so the hypotenuse simply equals the

play07:16

adjacent

play07:17

over cos theta that's just one line of

play07:20

code so that we can work out the arm

play07:22

length from the two other coordinates

play07:24

we do need one more piece of simple

play07:25

trigonometry though so that we can

play07:27

modify the shoulder angle based on its

play07:29

new angle

play07:30

i converted that to degrees and taken

play07:32

away the existing 45 degree offset

play07:35

and i've also converted that to servo

play07:37

pwm which is roughly 11 milliseconds

play07:40

per degree but before we look at that

play07:43

it's time for a quick ad from the

play07:45

video's sponsor

play07:46

which is pcbway pcby provide both pcb

play07:50

manufacture

play07:51

and pcb assembly under the same roof so

play07:53

you can get them to solder the

play07:54

components onto your pcb

play07:56

as well as make the board and they'll do

play07:58

surface mount and through-hole assembly

play08:01

pcbway have also launched new cnc

play08:03

services including online cnc

play08:06

machining sheet metal fabrication 3d

play08:08

printing and injection molding

play08:10

pcb way cnc machining services include a

play08:13

wide range of materials including

play08:15

aluminium stainless steel and various

play08:17

plastics

play08:18

if you don't see the material you like

play08:20

you can also choose from custom

play08:21

materials

play08:22

check out the pcb way website to browse

play08:24

through a variety of finishes

play08:26

and get a quote pcb way manufacture all

play08:29

sorts of boards including standard

play08:31

fiberglass pcbs

play08:32

but also aluminium pcbs flexible pcbs

play08:35

and rigid flex pcbs which are part rigid

play08:38

and part flexible

play08:39

prices start at five dollars for ten

play08:41

standard pcbs and thirty dollars for ten

play08:44

pcbs with assembly

play08:45

but new customers can get five dollars

play08:47

credit so you can get ten pcbs for free

play08:50

the first time you order

play08:51

find out more now at pcbway.com and i'll

play08:54

put that link in the description to this

play08:56

video

play08:58

so now i'm using two potentiometers to

play09:00

control the arm one of them moves the

play09:02

arm

play09:02

up and down in a pretty much perfectly

play09:04

straight line there will be some issues

play09:06

with servo calibration

play09:08

here because the pots are probably low

play09:09

tolerance inside the servo itself that

play09:11

gives it feedback

play09:13

so it may not run perfectly linearly but

play09:15

that looks pretty good for cheap hobby

play09:17

servos

play09:17

and some code i wrote on an 8-bit

play09:20

arduino

play09:24

the other part causes the arm's reach to

play09:26

move in another

play09:27

almost perfectly straight line given the

play09:30

servo's tolerances

play09:32

and we can see that both joints are

play09:33

working together there to move that arm

play09:36

pretty much in a perfectly straight line

play09:37

horizontally and vertically

play09:41

all the code as well as the cad for this

play09:43

project will be published and you can

play09:45

find that on github and the link is in

play09:47

the description to this video

play09:49

it's open source so feel free to modify

play09:51

it and do what you like with it or use

play09:53

it for inspiration in your own projects

play09:56

the last axis in this project is very

play09:58

simple because it moves in a straight

play10:00

line anyway so we don't really need to

play10:02

do

play10:02

any math to control it but check out my

play10:04

previous robot dog projects if you want

play10:06

to see something more complicated

play10:09

i've programmed the rover arm to move

play10:10

through some set motions

play10:12

using the kinematic model so it moves in

play10:14

x and z positions

play10:16

in order and there's three positions in

play10:18

this sequence

play10:20

however you'll notice that it's very

play10:21

jerky because the servos move at full

play10:23

speed

play10:24

and also for some moves one servo

play10:26

doesn't need to move as far

play10:27

so it gets there first that means we

play10:30

don't have a very smooth motion

play10:32

so i'm going to be using the arduino

play10:34

ramp library from site swap juggler

play10:36

which is open source and you can find it

play10:38

on github

play10:39

it has various parameters but ultimately

play10:41

allows us to interpolate through

play10:42

positions from one point to another

play10:45

and make our motion really smooth the

play10:47

example code that ships with the ramp

play10:49

library is pretty simple all we need to

play10:51

do is my ramp go

play10:52

give it a value to interpolate 2 and a

play10:55

time we want to interpolate over

play10:57

so if we now open the serial plotter we

play10:59

can see we get a linear rise here

play11:02

straight from one value to the other

play11:04

without a step

play11:05

there are various other responses in

play11:07

this library as well but for now we're

play11:08

just going to use the linear one

play11:11

so now i'm feeding both the z and the x

play11:13

positions over the ramp library and i'm

play11:16

feeding them

play11:16

over the same amount of time so now my

play11:19

step sequence is allowing those joints

play11:21

to move over the same amount of time

play11:23

and the end effector of the robot should

play11:25

be moving in a perfectly straight line

play11:27

between them

play11:28

so this is a much smoother motion and

play11:30

also we can control how fast it moves by

play11:33

interpolating each move

play11:34

over a longer or shorter time if we wish

play11:36

to do so

play11:39

but now we need to pick up some balls

play11:41

and pass them along so the arm can be

play11:42

part of the great ball contraption

play11:45

i'm using one of these sensors that i've

play11:46

used in the past so we can sense when

play11:48

balls are present and trigger a series

play11:50

of motions

play11:56

i made a short ramp to feed the arm

play11:58

which has the sensor on eventually this

play12:00

will be fed by a reservoir and a longer

play12:02

ramp

play12:02

and that means we can throttle the

play12:03

amount of balls pass through this stage

play12:06

and the rest of the great ball

play12:07

contraption

play12:08

when it sees a ball present it picks it

play12:10

up takes it to the other end and drops

play12:12

it which will take it on to the next

play12:14

stage

play12:14

perhaps into the high voltage ball

play12:16

accelerator that i made last time

play12:32

if i stack multiple balls in the ramp

play12:34

i've put various safeguards in the code

play12:36

that means it finishes one cycle before

play12:38

being triggered again

play12:39

so this means it will keep coming round

play12:41

picking up the balls taking them to the

play12:43

other end and dropping them

play12:44

until the ramp is empty in which case it

play12:50

stops

play13:04

this

play13:57

i'm pretty happy with this from a

play13:58

functional point of view to demonstrate

play14:00

inverse kinematics what would be great

play14:02

from an educational and visual point of

play14:03

view would be to have perhaps two led

play14:05

strips one vertical

play14:07

and one horizontal that show the inputs

play14:09

to the axis

play14:10

as the robot arm moves so we can show

play14:12

that what goes in is lines in a straight

play14:14

line

play14:15

and what comes out is the rotation of

play14:16

these joints but for now this is a great

play14:18

addition to my great ball contraption

play14:21

look at the other parts in my channel

play14:22

i'm going to be building a few more and

play14:24

then stringing them all together

play14:25

so that balls get passed all the way

play14:27

around and hopefully back to the

play14:29

beginning again

play14:30

if you liked the video don't forget to

play14:31

like and subscribe for more pieces of

play14:33

this

play14:34

more robotics and more open source

play14:36

designs and you can find all my designs

play14:37

which are open source on github the

play14:39

links in the description to this video

play14:41

so if you'd like to support me through

play14:42

patreon or youtube channel membership

play14:44

then those links are in the description

play14:46

as well and patrons and youtube channel

play14:48

members get access to all the videos up

play14:49

to a week early

play14:50

and sneak peeks and pictures of what's

play14:52

coming up so you can be involved in all

play14:54

of that discussion

play14:55

alright that's all for now

play15:10

[Music]

play15:53

you

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
RoboticsInverse KinematicsArduino3D PrintingServosMechanical DesignEngineering ConceptsDIY ProjectBall ContraptionOpen Source