0:02 so i look very silly in this machine and
0:03 the reason i'm in here
0:05 is that the longer i go without cutting
0:07 my hair the younger i look if you base
0:09 my age on the youtube comments on my videos
0:09 videos
0:11 i'm somewhere between a 14 and 16 year
0:13 old boy and the other thing that people
0:14 are saying is that i look like the
0:16 reference model for the lego minifig i'm
0:17 not really seeing the resemblance but
0:19 it's time to cut my hair i would rather
0:21 not have someone cut my hair who's
0:22 touching 100 other people's heads all
0:23 day long
0:26 so i built this robot and it is a hair
0:27 cutting robot
0:29 it's going to cut my hair the hard way
0:31 using scissors no trimmers or any easy
0:32 mode like that
0:33 and i think it works so i don't know
0:35 because i still have all my hair i
0:36 haven't tested it yet
0:38 and i'm a little bit worried because the
0:40 initial trials with the dummy didn't go
0:41 totally smoothly but
0:43 i think i've mostly worked out those
0:45 software bugs i did a quick dry run
0:47 just a little bit before this just to
0:48 see if everything was working without
0:50 cutting and it had this other problem of
0:53 ripping my hair out wow
0:55 i've fixed it now the fingers clamp a
0:56 lot less hard than it did before i'm
0:57 glad i tested that and even if this
0:59 thing gives me a terrible haircut i
1:00 still feel like i've won
1:02 how many people have a robot made
1:03 haircut it's basically art
1:05 my prediction is that it's going to give
1:07 me somewhere between completely
1:10 terrible and a 5 haircut well i've put
1:12 this off as long as i possibly can
1:14 so this is the first haircut that it's
1:15 ever going to attempt
1:24 [Music]
1:27 so how about that weather i don't know i
1:29 mean i guess it's warm out
1:31 oh well cool you can tell from my face
1:33 that i wasn't sure if it was completely
1:34 wrecking my hair or not i honestly
1:36 was not sure if this was gonna work
1:38 because it was a hard problem
1:40 so the hard part even with the robot is
1:42 handling the hair the hair wants to go
1:43 all over the place and what you need to
1:44 do is separate out
1:47 a very local chunk of hair and you don't
1:48 want to have any other hair trapped in
1:50 that chunk and so that's what a lot of the
1:50 the
1:52 combing and finger work that stylists
1:54 are doing it's to separate out the hairs
1:56 i knew in my heart that trying to build
1:58 a robot that works like a stylist to
1:59 separate out hair was
2:01 a bad idea i still tried to do it that
2:02 way initially
2:04 before i go way off the deep end into
2:06 the details i need to take care of just
2:07 a little bit of housekeeping
2:09 so i'm 90 sure what i want to build next
2:11 i want to hit a baseball really far
2:14 like really far it just sounds like good
2:16 old-fashioned fun to me
2:18 i'm excited because i found the perfect
2:19 thing to put some extra pep into my swing
2:20 swing
2:22 this is a device which shoots nails into
2:23 concrete using
2:26 basically bullets so that's cool
2:28 i'm super aware of the safety
2:30 considerations here i'm going to do this
2:32 very carefully in a very safe way
2:33 so no need to tell me to be safe in the
2:35 comments but if you want to
2:37 you can if that sounds as awesome to you
2:39 as it does to me you should subscribe to
2:40 follow along and see how it goes
2:42 and then these videos are very time
2:44 consuming and expensive to make
2:45 if you want to help support making more
2:47 awesome things and more videos
2:48 you can check out the patreon and in
2:50 exchange i'm giving more
2:51 behind the scenes content probably the
2:53 coolest thing is the discord server
2:54 i'm having a whole lot of fun hanging
2:56 out in there with people and getting
2:57 advice on my projects
2:58 alright that's enough of that back to
3:04 how about they sports team i mean i
3:05 don't think there really are any right
3:06 now right
3:18 the first concept that i was trying to
3:20 do involved two combs and do a
3:21 complicated series of motions
3:23 to select just the hair that i want i
3:24 even designed the mechanism to do it and
3:26 it was pretty cool the problem was
3:28 i just couldn't find a way to do this
3:30 reliably without some kind of camera to
3:31 see what's going on
3:32 but ultimately trying to figure out
3:33 where the hair is with the camera is a
3:35 nightmare of phd proportions
3:37 i think to try this would be insane i
3:38 told you that's an insane design
3:40 it's way too hard you need to pull out
3:42 the essential things that it needs to do
3:42 and then
3:44 design a way to do them that's easier
3:45 for a robot the way to go here is a
3:47 vacuum it's gonna make life a lot easier
3:50 yeah so as he's so rudely interjected i
3:51 did have some alternate ideas that
3:53 at least on paper seemed a good bit
3:55 easier since when does rude dove good
3:56 ideas you know i'm really looking
3:57 forward to seeing you stick your big
3:59 head into this robot my head no
4:01 you're the one with the bad ideas anyway
4:03 i came up with another way
4:05 of grabbing hair that uses a vacuum that
4:07 is a whole lot easier than i was going
4:08 to do before
4:09 the vacuum sucks all the hair straight
4:11 up and then if i slide two fingers in i get
4:11 get
4:13 just the hair that i want and no hair
4:15 from the sides the way the cutter head
4:16 turned out to do this is pretty cool
4:18 it only takes three servos so here's the fingers
4:22 the scissors are on a little stage
4:24 driven by a servo
4:26 and then the scissors are actuated by
4:28 another servo so putting these things
4:29 together i can move the fingers grab
4:31 some hair lift up
4:33 and then cut unfortunately this wig hair
4:35 is it's like wire
4:36 so the scissors can't cut it this is
4:38 unfortunate because i wanted to test it
4:39 on a wig but it doesn't work so
4:41 i'm going to have to be the first real
4:43 haircut this explains the sense of
4:53 do anything fun this weekend it was
4:55 really sad my dog died
4:59 the other big challenge of this
5:00 haircutting attachment is how do i move
5:02 it to all the different locations on the head
5:02 head
5:05 and so what i did is rather than having
5:07 a three axis system
5:10 i have an arm that can move in and out
5:12 and up and down only
5:13 and so it can reach the face and they
5:15 can reach the head
5:17 then i rotate the entire head so i can
5:18 reach the side
5:20 i just rotate the head now i'm touching
5:21 the side and so
5:24 rotating the head is hard because i have
5:25 to rotate my whole body
5:27 i do the equivalent thing which i rotate
5:29 the entire robot around the head
5:30 i always need to be pointing at the head
5:32 when i cut so i'm cutting on the top i
5:33 need the scissors to be pointing this
5:34 way if i'm kind of on the side maybe
5:36 pointing this way
5:38 and so i added a whole extra rotational
5:39 mechanism to the
5:41 to the robot gantry to allow this one
5:43 other problem that i ran into that
5:44 really annoyed me because it just made
5:46 things way more complicated
5:47 is that depending on where you're
5:49 cutting on the head you want the
5:50 scissors to be going different directions
5:51 directions
5:54 so when i cut the bangs i want to be
5:55 cutting across the head
5:57 i don't want to be cutting vertically if
5:58 i cut vertically i'm going to end up
5:59 with a
6:02 diagonal sawtooth bangs which is going
6:03 to make me look like a complete idiot
6:05 so i added a whole new access to my
6:06 robot that allows me to rotate the
6:08 cutter head
6:10 this machine is made with a bunch of
6:11 different techniques the first is plasma
6:13 cut and folded sheet metal you can see
6:14 the plasma cutter is drawing these
6:16 marker lines and that's so i can bend
6:17 the parts very accurately so they fit
6:19 together later
6:21 some of the plasma cut parts are spot
6:22 welded together and you can see i'm
6:24 using a little access port so that i can
6:26 reach the spot welds inside this thing
6:27 there was only one machine part and that
6:29 was because i was able to 3d print
6:31 pretty much everything this is great
6:33 because they're complicated shapes which
6:34 have been very difficult to make
6:36 everything is built on top of this giant
6:38 bearing which is what my head goes through
6:38 through
6:40 and then there's a simple two axis
6:42 gantry i need to cut a hole in a sheet
6:44 of plywood which this cnc router i just
6:45 got would be perfect for
6:47 but it's not set up so i had to make a
6:49 tool to do it using your tools to make
6:51 new tools is one of life's great
6:53 pleasures anyway so it was fun
6:54 and then everything rides in this stand
6:57 i built which bolts to my workbench
6:58 so electrically there's really not that
7:00 much interesting there's
7:01 four big stepper drivers which are
7:03 responsible for controlling different motors
7:03 motors
7:06 there's a microcontroller it's a teensy
7:07 that's running the show it's
7:08 communicating with the computer
7:10 for receiving commands and all that
7:12 stuff it is a giant mess but
7:14 there's nothing like a good facade to
7:15 give the impression that everything is okay
7:16 okay
7:19 all right how you feeling i'm a mess
7:22 i mean i am good thanks how are you
7:30 when can i cut your wife's hair it's not
7:33 gonna happen trust me i tried
7:34 all right what if i give you a haircut
7:36 that is a super set of another haircut
7:37 that you want
7:39 then if something goes wrong we can cut
7:41 your hair down to another haircut
7:44 what do you mean if something goes wrong
7:45 i mean i don't plan on anything going
7:47 wrong it's just it's a prototype and
7:50 sometimes stuff happens i already like
7:51 my hair
7:52 but come on it's important it's for
7:54 humanity humanity again
7:56 yeah there's all these people stuck at
7:57 home in quarantine and they want to look
7:58 good how does getting my haircut help
8:01 it just does that doesn't make any sense
8:03 just put your head in the robot
8:05 it's that easy you just put it in and
8:07 it'll cut it my analysis is that you've
8:09 made yourself into the man who cried wolf
8:10 wolf
8:11 even if you really mean well you're not
8:14 going to be able to convince
8:18 where did that come from oh well cool
8:19 one of the big challenges of getting
8:20 this robot to work is that it needs to
8:21 know where my head is
8:23 in order to cut the right length if my
8:25 head is here it's going to cut a
8:26 different length than if my head is here
8:28 your head moves around a good bit and
8:30 i'd rather not have every little
8:31 movement that my head does
8:34 baked into my haircut i spent way too
8:35 much time trying to get this depth
8:36 camera working
8:38 so this is an intel realsense depth
8:40 camera and what i was doing
8:42 is doing facial recognition to find
8:43 where my head is
8:45 and then combining with the depth data
8:46 to figure out where my head is
8:49 in 3d space but there was a really big
8:50 problem with this switch
8:53 this camera is completely blocked by
8:54 this stand
8:55 a lot of the time even when it's not
8:57 directly in front of it it really blocks
8:58 it and
9:00 i could maybe deal with that but it
9:02 makes the software so much more
9:03 complicated i just didn't think it was
9:04 worth it
9:06 what i ended up doing is i put a little
9:07 switch on these fingers
9:09 and this allows me to move and sense
9:11 when it hits my head
9:12 and then i can use that to measure a
9:14 bunch of different points on my head
9:17 and figure out roughly where it is so
9:18 say i get a little bit too comfortable
9:19 in here and i
9:21 kind of move over to the side it knows
9:22 because it has this probe
9:26 move back move back move back go ahead
9:27 all right we're back in business how do
9:29 you tell a robot what haircut you want
9:30 the way that i solved this problem is i
9:32 took a 3d model of a head
9:34 and i painted on it the haircut that i
9:35 want basically
9:38 lighter is longer darker shorter at
9:39 first glance this looks like i want to
9:41 be a balding man but
9:43 it actually makes sense to the robot the
9:44 other thing i have to tell the robot is
9:46 what angle to cut at because i wanted to
9:47 cut my bangs horizontally and i wanted
9:49 to cut around my ears
9:50 so this isn't telling the robot that i
9:53 want a giant unibrow this time the robot
9:55 cut the bangs horizontally and then cut
9:56 around my ear
9:58 the robot will load this 3d model and
10:00 then knowing how big of an area the
10:02 scissors cut it will compute a plan
10:04 of the minimum number of locations it
10:06 needs to cut at to make my hair
10:08 the desired length and then as it's
10:10 doing that plan it'll cut one and then
10:12 go the next one in the next one
10:14 at each location it will check the
10:15 unibrow model
10:17 to see if it should cut at a specific
10:19 angle and if so it'll do that
10:21 at least that's the plan in theory i
10:23 haven't done it yet hopefully it works but
10:23 but
10:25 we're doing it live so here's the whole
10:26 haircut from start to finish
10:29 heads up i look completely insane in
10:30 this time lapse
10:32 i think it's a weird time lapse artifact
10:34 but also i was terrified of it ruining
10:35 my hair so it's
10:37 probably also a bit of fear midway
10:38 through i realized there was a bug in my
10:40 code that made it cut about
10:42 six times as many locations on my head
10:43 as it needed to
10:45 i thought it was taking a while so it
10:46 took about an hour
10:48 but it should only take more like 15
10:50 minutes every time the robot goes to cut
10:51 a location
10:53 it probes to find where my head is at
10:54 and then the length that it cuts is
10:56 relative to where it probed this is the
10:58 main reason it could maintain accurate
11:00 hair lengths even though i was moving
11:01 around so you can see the vacuum sucking
11:04 a bunch of extra hair into the tube but
11:05 the fingers that grab the hair have
11:07 little guards on them that keep hair
11:10 that they aren't grabbing from being cut
11:11 making this robot hit the desired
11:13 location on my head was pretty hard not
11:14 only does it have a bunch of joints that
11:16 are somewhat challenging to compute
11:17 where the heck the scissors are going to go
11:17 go
11:19 my head is moving and then the design of
11:20 the robot doesn't allow it to approach
11:22 my head from all possible angles
11:24 i have to find the best achievable angle
11:25 that the robot can do
11:27 i have a suspicion my math isn't always
11:29 correct but thankfully my hair all
11:31 turned out the right length
11:33 all right the cut is done what did the
11:35 salon's first customer have to say
11:37 all right two out of ten not great zero
11:39 personality i can believe that
11:42 top and sides are cut well nice nice but
11:44 it gave me a mullet what
11:46 the robot cut the hairs that it could
11:47 reach really well
11:49 but there's two problems the first is it
11:51 can't get close enough to my ear so i
11:52 have all this
11:54 hair right by my ears that's really long
11:56 that should be pretty easy and fast to
11:57 clean up
12:00 but the big problem is it gave me a
12:02 robotically perfect mullet
12:05 so it just couldn't get quite low enough
12:06 to cut the last
12:09 maybe inch of the back of my hair i had
12:11 planned to have it rotate which
12:12 dropped it by about an inch maybe an
12:13 inch and a half but the scissors
12:15 interfere with the stand and it just
12:16 couldn't do it so i said i thought it
12:18 was gonna give me a five dollar haircut
12:20 i think that was right i think even for
12:21 five dollars they don't normally give
12:22 you a mullet
12:23 man thank goodness i didn't prank my
12:25 wife with this machine because
12:26 i had to just go give her a pair of
12:28 scissors and ask her to fix my hair
12:30 i'm actually really happy it gave me the
12:31 mullet there's just something deeply
12:34 satisfying about a robot giving me a
12:36 perfect mullet all she did was cut those
12:38 off she didn't touch the top at all
12:41 and overall i'd say it's really not bad
12:42 i checked some of the lengths they seem
12:43 right on
12:44 and i'd pay five dollars for this
12:46 haircut i don't get another shot at
12:47 cutting my hair for
12:49 a month or two but i think i might try
12:50 to upgrade this to cut closer to the ears
12:51 ears
12:53 to not generate perfect mullets and then
12:55 maybe also add a trimmer or something
12:56 like that so that it can
12:59 do the neckline for me so hopefully you
13:00 enjoyed this there's a fun project