 OK, mae'r ddysgol eich ddweud yn ddigon yw John Dingley sy'n ddim yn ddiwedd o'r debyg o ddechrau ddaeth gwneud o'r robotau neu staflu. Wel yw gwrthau, mae'n ddigon yw John Dingley. Felly mae'n gwybod yn y camp AMF ond mae'n ddweud yn gweithio ar y ddechrau. Mae hwn i amser hwnnw'n gweithio ar erbyn rhai armaeth teulu i ysgol. Mae yna yn fwy o'r spoiler. Felly rwy'n ddweud yr hwnnw, hardware or software, but my hobbies drift very much into that area and as I've learned things over the years it has actually helped me with my job. I'm actually what the Americans were called an anesthesiologist so in medical terms that means I'm a gas man. So I found this video back in 2008 when I was starting this hobby and this was a gun America who's now a Microsoft software engineer. He was trying to build a self-balancing skateboard and he summed up the pains of this experience quite succinctly here so I'll just play this short clip. Writing this device is like being on an episode of Jackass. You're bound to get hurt, it's bound to be funny, but it's bound to be painful. Yeah and I can attest to all those things so why did I start this hobby? It's something crazy well if you look at things like popular mechanics right back to the 1940s they're all these wonderful devices with one-wheel tanks motorbikes with heroic people doing heroic things on them and in fact in 2001 in a German university they'd obviously got hold of some sort of early gyro solid state digital gyro unit and they built this unicycle which had a go-kart tyre which is extremely wide which banished itself rather in the same way as a Segway which actually came later. I then found a video from Norfolk of all places this is a guy who built a skateboard called Ben Smither he was a lot of software engineers it turns out and they are the main tech employer in Norfolk after all and he put this brilliant video up on YouTube which inspired me so as you can see the balance is beautiful. Now this was before Segway was really well known and it was certainly before all these devices from China so back in the day this was quite a phenomenal thing to see and it really inspired me to build something like this. I was wanting to advance my electronics from my sort of schoolboy experiences and get into microcontroller programming so I thought I'll build one of these how hard can it be? Well actually it is quite hard so what do I need? I need a motor that's okay that's okay I understand that some sort of power controller that needs to be controlled by a computer how does the computer control the power controller? Don't know have to read up on that but we've got the internet it was going okay in 2007 so you need these sensors called accelerometers and gyros what do they do? How do you use them? Not sure but I know I need them so right okay have to look into that read up on that. How do you use the data? What maths do you do on the data from these sensors to tell the motor how fast to go to stop you falling over? Don't know but we have to look at that as well so a lot of reading required here. What software? What code? What coding language do I need? I write that on my laptop I know that and I transfer it to some sort of little computer in the board in the like microcontroller I know that how do I get it from my laptop to the microcontroller? Don't know have to read that up so that's where we were anyway I knew how to code because I'd done that when I was 14 because I built myself one of these fabulous Sinclair computers now many of you are too young to remember this but this was phenomenal you could actually build a programmable computer attached to your TV that did things for hardly any money bearing in mind the school computer at the time was from the university second hand that it filled a whole room so this was amazing stuff so well here's the microcontroller I got Arduino boards and come out yet it looks a bit like a kind of proto Arduino it is from active robots it came with almost no documentation so I knew you programmed it in C I know it had inputs from sensors and outputs that you could use to control things and a big sort of socket here which you somehow plugged it your laptop to to load the software onto it so I thought right we've got the brain so now I need to know how to program in C right well I only I know some basic so I thought we'll see must be sort of similar to basic surely so I downloaded the whole book of C and printed it out as a PDF which turned out to be about that thick like a dictionary of C so I started studying that I thought well I've got to write this program what do I write it on what environment do I use so you know the Internet's come on a bit since then and it wasn't that obvious how you did these things but I knew that the manufacturer of the chip had a program environment called AVR studio which is this thing here that you could write your program in and save it onto your hard drive great how do you get the program from your laptop on to the microcontroller again you guys to you guys that's like dead simple but if you search that at the time on the web it wasn't clear it was sort of assumed you knew so right so had about a week of surfing the web I found this old program called pony prog which would allow you to plug a parallel port leading one end and the other end of the cable into the board and you could get your program on to the microcontroller so we can program the brain of our machine great so we're making progress that's about a month of work there to get to that point now I was helped my life was saved by this guy Shane Colton he's a lecturer at MIT aren't these guys always at MIT it would seem he ran a course on getting his mechatronic students to build segways so how do you use the data from an accelerometer and a gyro in some sort of useful way to control something like a segue and he actually explained it in reasonably simple terms and reasonably simple maths that I could understand so why do you need a gyro why do you need an accelerometer a gyroscope used to be a thing I'll just show you how technology is this is a Vulcan bomber gyroscope unit for the autopilot okay so I've got a friend who's into retro aircraft got to know how many millions of pounds were used to develop that and that's the modern equivalent from spark fun it's about 10 10 dollars and it's actually better so that just shows you where things are back in 2007 things weren't to 10 dollars they were a bit more than that the gyro I used was this one from silicon sensing systems it's actually still available because it's used in segways the older ones and it's 263 dollars which is about what I paid for it so it's a bit like these cyclists you know when your wife asks you what she tells you your bike cost you always divide it by two so I didn't tell her it was that much and I also ordered an accelerometer because you need both sensors and unfortunately it didn't arrive on a little board like that it arrived as you see in the picture the size of a pinhead with no visible wire sticking out of it now when I had last done electronics things came with wires sticking out that you could solder to so I thought ah great so I actually after great struggles managed to solder tiny wires using a magnifying lens to the surface mount tabs on this little rectangle of nothing black dot nowadays they will come like this on a little board with label terminals so we've got a gyro we've got an accelerometer what do these do you power them up with five volts and these older ones will just put out an analog voltage proportional to movement so for an accelerometer you can use it to see how far you are tilted over from the vertical axis which is gravity straight down towards the centre of the earth the gyro will measure how fast you're falling over so if you're on a say a unicycle how fast you're falling over on your face it will actually measure that in degrees per second and you actually use the information from both which I'll come to in a minute so here we are we've got a kind of test rig where I'm wiggling a wooden board around with my sensors on it and look we've even got data coming out we've got an accelerometer reading and a gyro reading and I actually managed to fuse this data together and get something that was about ready to test and so we have a lovely laser cut chassis we've got a go cart wheel in the centre I was going to build a skateboard and I built the world's biggest chunkiest heaviest lead acid battery filled skateboard you see bottom right and it actually balanced there it is so 2008 after about three months of work we've got this thing that balances badly and is skateboard-esque you steer it by the way by having the tire a little bit soft and you just lean it one side or the other rather like carving with a snowboard and much hilarity insured on the internet when I put up the variant with the hot wheel name on it um I didn't get sued by Mattel so then I thought well let's make something with two wheels in the middle again like a skateboard and let's see if we can do it a bit more cheaply because some cheaper gyros had started to come on the market that weren't 260 odd dollars they were a lot less than that so that people could build so I built this sort of test platform as you can see the bracket tree is from B and Q the deck is a piece of wood there's two cheap lead acid batteries the wheels are actually the rear wheels from children's razor scooters cheap chinese electric motor chain drive and a sort of polyurethane tire so they probably wondered why their spares department was suddenly being hit for requests for rear drive units once I put this on the web um so I did put this on the web as a kind of easy build ish self-banancing skateboard way back so long before these children's hoverboards came out in 2015 um and everyone's just sick of the sight of the things this was quite unusual and um as you see I put it on instructables and got a lot of views and it's sad to say all the emails I get are either from Germany or from the US none from the UK though in the entire time I've been doing this maybe just one or two from the UK which I think's a bit sad but there we are so here's something I we're in the middle of the journey now we've got something that works it's reasonably small there's a carrying handle on the side what have you learned um I've got the battery on the top um at one end I have some caster wheels because I found that if you stop or the machine goes wrong the front end digs in to the ground and flips you off so it's best to have wheels on the front little ones so you roll to a stop gracefully which is less embarrassing also you need some sort of hand controller which has to have at least one button in it and that's the dead man button that means if you fall off the machine doesn't keep traveling along and smack you in the head when you're already lying on the ground bleeding it just makes your day even worse so if you let go of the button it cuts the power you can have other things as well for example it's useful to have the nose up because to make it move forward you push the nose down and the machine tries to correct that by moving forwards so you trick it into moving so have a look at this video now there's something odd about this machine there's no visible battery the deck is really slim and you just see the wheels and I was trying to make it sort of cool and you know I didn't like that huge battery box on the top so if you've ever wondered what's inside one of those Chinese duct tape batches that come in mock carbon fibre duct tape and not like a brick if you actually take all the duct tape off you'll see it's made of millions of little lithium cells sort of badly spot welded and glue gun together and if you can manage to dissect that out without shorting everything out and put them into the deck of the skateboard you can make a skateboard with a lovely flat deck unfortunately if you're heavy you couldn't ride it because it would bend and snap in half and everything would explode so then I thought carbon fibre now as we all know if something's made in carbon fibre it's just better isn't it it's just for no reason really don't cut carbon fibre with a riding disc and a dremel using a Dyson vacuum cleaner to hoover up the dust because your vacuum cleaner will make a sort of sound and then it will stop working forever which is what happened luckily it was an old one technical things on this apart from the fact it's lovely carbon fibre honeycomb is it's now got a wee nunchuck as the steering system a wireless one at that which Nintendo never made their rip-off made by the chinese um there's a problem with that if you use it in crowded spaces where lots of people on mobile phones and things it's disconnects so you pirouette down the road whilst trying to look as if that's what you meant to do all along and this was at a street carnival in Calais at the time and so I learned the lesson from that go to a cable system it's less exotic but it's reliable and with these things reliable is what you need I did look at other ways of steering it one was to use pressure sensors for your trailing foot so you could go onto your toe or heel and the machine would steer I also saw this design concept someone had put up as a CAD rendered CAD image of a rather nice design and tried to emulate it you know a really compact device pneumatic tyres pneumatic tyres are good because they smooth out the bumps in normal tarmac which you feel every one of if you've got polyurethane tyres and you could even run it upside down so that worked I don't know where people do this people put beautiful CAD images of things on the web all the time but they never build any of them you know if you're going to do it build it that's what I say but then I'm not an engineer so just to see if it could be done I thought well I've got this skateboard wheel hanging around sorry the go-kart tyre could you build a one-wheeled Segway so I built a one-wheeled Segway called The Thing after the film and yeah it kind of worked it was really hard to ride really slow and didn't really offer any advantage technically over anything else but it did improve so here I am at a Derby Maker fair on the left this is Nick Thatcher who's the only other person in the UK with the same hobby on the right on one of his early machines and as you can see it's it's kind of getting there it's reasonably controllable there it's good fun to ride so if we go to our next slide I was then I kind of got I work in a hospital obviously but I meet people that are disabled a lot of disabled people who don't obviously have spinal injuries can actually walk a short way people who use wheelchairs powered wheelchairs they can walk a short way but they can't walk all the way around ASDA so they hate being in these devices they hate being in powered wheelchairs if you could build something that resembles a scooter of any sort they would much prefer to ride them so I thought could you build something that's like a Segway but it's based on something like a rally chopper so I built this thing these are BMX wheels it's got fluorescent yellow tyres just just because I could and they were cheap on eBay and it did work and it got a lot of interest and the idea was that your legs actually go on the outside of the wheels rather than on the inside and in fact you can buy all these kinds of things now from China in fact so again another random event I was approached by someone who's a bit of a mover and shaker in the London design world his son is a teenager and he has a problem with his legs and he needs a powered wheelchair but he refuses to use one because they all look like horrible things your grandmother might use they have lead acid batteries in the bottom they have their giant swibily casters that take up a huge amount of room and shout disabled and bang into the door frames when you try and turn into the room so he wanted something to design that he would leave the team that not only works but would be cool because it's for a teenager it's got to look good and he specifically wanted a two wheeled wheelchair powered and he's prepared to raise the money to design this so I said there is this game called doom and there's a film of the game and it's really awful but it does have this character in it that's in a wheelchair and clearly the dimensions are wrong if you look at the width of his shoulders versus the width of the machine it's about five feet wide and it would never go through a door but he has some interesting design concepts one is the stalk that holds the control panel which means you can run all your wiring up and down and know that it's protected rather than having curly cables coming up to the seat and round on the arm and all that kind of thing so I said to him alright I'm a hobbyist I'm sort of getting known in this area I'll build you a concept demonstrator and I'll have no safety features whatsoever but it will be have a look like a chair it will self balance and you control it with a joystick not by leaning it forward and back it's not got a t-handle it's not a segway with a seat bolted to it it actually is controllable through a joystick so came up with this and if you look at the controls a bit of early 3d printing here I've got a maker bot the old plywood one at this point there is a joystick that only moves forward and back it's from a flight simulator controller and it has a rocker switch a large one on the end so forward and back is your direction steering is the rocker switch the elbow rest was nicked from the Apollo lunar rover because they had the same problem I had with this if you're bouncing around you end up nudging the joystick forward and back all the time and the machine goes crazy you have to lock your elbow somehow in place they had exactly the same problem on the lunar rover and so I got that from the Haynes manual on the lunar rover which you can buy in any good shop so here's hopefully just a quick run around of this machine it worked well enough to make this video and it allowed in to raise his first hundred grand odd which he needed to get it built so it actually has rotor casters at the rear so you can switch it off and park it without it just falling over but these retract into the fuselage at the back if you want to so when you're in balancing mode they act as your rear safety wheels but they're actually airborne and so they they half retract in fact and if we just maybe jump through this a little no maybe not kids will ask you how fast does it go mate and the answer is doesn't matter how fast it goes it's can you control the thing um so i'm just showing in this video it can be controlled and um it did everything we wanted it to um and it helped him raise the money required to take it to the next step this is another fun project this is filmed at another maker fair can you build a vesperscooter with only one wheel and paint it green and put a red star in it make it look like some secret russian technology from the cold war and this is paneled in chinese electric scooter panels that have all been repurposed and repainted um and it's just a fun machine and i um cannibalised it for parts but actually i should have kept it because it's actually a good laugh i mean that's the thing with these machines they're actually really good fun to ride and this is why i'm moving towards one wheeled motorbike type devices because they are the most fun i started with skateboards simply because if it went berserk you could jump off um nothing more than that so was on telly entered the hackaday prize in 2014 i can't even remember what the spec was but we managed to shoehorn a one-wheel motorbike into the spec and um we came up with this and it's got fairing on it from a real motorbike um twin wheels chain drive 500 watt motor brushed motor and it worked but it was incredibly dangerous because if you wanted to jump off it your legs will get tangled up in all this fairing and it would cut the inside of your legs quite badly which happened a couple of times you stared it by leaning left and right which can be done if you're a circus performer but it's actually quite difficult so uh it went but it was very dangerous we managed to get a few film shots it was um featured on discovery channel in america daily planets in american program and uh that was my first effort at a proper motorbike so things to learn no sharp pointy bits keep it really slim the fuselage watch this video closely watch it watch it watch it oh right so safety skid those of you old enough to remember gerry anderson's UFO series set in the future 1981 the aliens were invading the earth and what happened was we shot them down with these great interceptors and they didn't have wheels they had skid skids so i thought well i could put a wheel out at the front in the air but it would look really stupid oh i could have a cool sort of skid thing so that's what i did but you'll see in the video when i'm testing the skid it just grips the tarmac quite well actually and it would actually flip you over so that was no good so it just shows you have to test things and build them not just design them on computers um so there's actually some little tiny wheels embedded in the skid in fact in the actual there production version with a nice big shock absorber chromed of course because chrome is good as well as carbon fiber so this is just a short clip this is on pennine sands in south wales i live in swansey about 40 minutes from pennine sands in ors beach lovely and flat um and we've got a machine that's now kind of working uh the wheel is not from an aircraft people say oh is that a landing wheel from an aircraft no i rang out this guy who runs one of the biggest uk tire suppliers and i said i want a spherical tire like on a dyson ballbarrow that's not made anymore and he said well you can't get one but you need a kite buggy tire so that's a kite buggy tire which is a three wheel device pulled on a beach by a kite and it skims it planes on the sand so that's fab big fat tire safety skid the one on the left here actually retracts with a linear actuator and the reason for that is it looks cool because obviously when it's retracted it doesn't function anymore as a skid in any engineering sense it just looks cool so it's up to you whether you want more danger in your life or not you can retract it if you want it obviously has a mac meter because if you bought a mac meter on ebay you need to use it for something so that actually shows you the motor power from naught to 100 percent you must never get to 100 percent with a self-balancer otherwise you'll just fall off the front it can't go any faster um talk about pentine sands in a second this is sir Malcolm Campbell 1929 bluebird deliberately driving through the water to cool the tires down before his return run um at 150 odd miles an hour uh we'll come back to that in a minute so we got a concept that works it steered it stopped it had some safety features so now is the time to really go for it let's stop messing around with a 500 watt motor let's put a 3000 watt hub motor in yeah import it from china um came with home office tape all over it because they thought i was importing drugs obviously um and it's built into an alloy wheel wide alloy wheel so i can put a wide ish tire on it the power controller was a problem um you can't get high current brushless motor controllers easily um and i ended up using one from robotech and you kind of get what you pay for they're not cheap but it works and you can control it via a serial link from an arduino i'd moved on now when i'm using arduino boards by the way if the other thing i bought was the headlamp pod from a ural motorcycle they're made in russia since the war and they're still made and they're much cheaper than hardy davison ones and they're huge you can cram electronics goodies into them uh way in excess of just a light bulb at the front so next thing battery pack needed damn great big battery pack for this so it's going to have a cylindrical fuselage so we need a cylindrical battery pack so this is cnc machined plastic battery holder these are headway cells there's 20 odd of them um a battery management system and there's a giant contactor which is just like a giant relay to turn everything on and off at the front and that this slides into the fuselage from the front so we've got all the main parts built that obviously took ages to build and this is what we built which we actually brought this morning um played around with this top right one is the first one you see it's i had to give in and get rid of the skill and put a safety wheel there from machine mart fluorescent yellow um it looks awful it doesn't even work because i've mounted it too high up by the time that hit the ground you'd be going over the handlebars again so the biggest design challenge of this believe it or not was how to make the safety wheel at the front look even vaguely okay and um there's a website called deviant art where artists cgi artists put their work up a lot of its science fiction so we have this contraption here which obviously has a machine gun because all good motorbikes have machine guns on them but it does have this structure at the front which could be adapted to hide a wheel perhaps so by putting a lamp on the front of it to make it look like it's a light it distracts you from the fact that actually there's a wheel in it and that's the safety wheel and it does actually work this is a quick video with some audio it goes through the controls which have had to skip over it's dead man lever because the dead man is a lever now it's not it talks to you it has no displays you can't see the displays while you're riding this thing you're too busy trying not to die so it talks to you and it uses an 80s retro voice which you can just download off the web to run on arduino okay ready level off it won't come on until we bring it level otherwise it will fly backwards so listen now here we go american accent the balance point excellent if i change this you'll see it change telling me the speed in percentage motor power in percentage so it's saying one percent you hear it that's what it's doing you see there you can adjust the balance point the twist grip here is potentiometers for everything in the code so if you watch me turn and the twist grip is used to adjust the balance point forward or back while you're riding it so that's how you speed up or slow down i would do that to go faster i would do that and we also have an emergency brake emergency brake lever press this if you watch the angle lean back back back back and then eventually you'll slide off the tail onto your feet which is much more elegant than smashing your face in which is what happened earlier there's also a steering system people think it shifts your weight to the right or left but it doesn't it actually moves the wheel onto the left or right edge of the tyre so i'll skip this but i'll just leave you with this clip this is pendine sounds it's a very old place to ride on pendine sounds you feel the history sort of coming out of the sand of greater people than you riding on this thing and it's miles and miles of perfectly flat beach and actually very fortunate to live close to it and this is nick who you saw earlier riding the machine or not as the case may be but you can see it goes along it's controllable it does everything you want i'm over time so i'll stop there but i'll just leave you with the last slide nick went to university and he designed this as his final year project so he's as i said he's the only other person in the country with this hobby and so the next project he might do is is to get this working so you may even say this see this as a future meeting or a future make affair hopefully um but uh there you go it's a fascinating hobby thank you very much hey i think we have just enough time for one or two questions anyone ah do you actually drive can you actually ride a normal unicycle can you actually ride a unicycle a normal paddle paddle no i i'm no i'm pretty useless at riding a normal i keep thinking it's really bad i should learn to ride a normal unicycle it's on my bucket list of things to do actually yeah okay i have one quick question do you have any plans for applying for road legality um it's interesting in in the uk you cannot ride a self balance a segue on the pavement you can only ride it on private land with the landowners permission however the wheelchair project is interesting if you look at the rules for powered wheelchairs mobility scooters it doesn't say how many wheels you must have it just has a maximum weight of about 250 kilos which is very heavy and and lighting things and uh rules such as uh it must have reasonable directional control it must have a parking brake excuse me um they're the rules for mobility scooters so actually you could build a two-wheel wheelchair type device and not be in breach of the law technically this is just about okay to watch that space thank you that was uh astonishingly cool uh thank you again