Making a Drone in Besiege
Now i heard flying machines of a siege can be a little wonky so i’m, not too sure how this will turn out. So let’s get right into it. So i’m, just starting off in the sandbox and the first thing i’m doing is putting in a bunch of ballasts to start building the frame of this thing. Now, normally i use wood pieces instead of ballasts. I think they just look a little bit better and they come across better when i’m recording. But in this case i need to save as much weight as possible, so it’s important that i use ballasts and then set their weight to be the absolute minimum. So here we go to test it and turn on drag objects. It was interesting, so i turned on invincibility as well and after i did that everything seemed to be fine. So what i did is put in a few more bracing pieces between all of the arms and this seemed to make it perfectly stable. So the next thing i did was put in a bunch of motor wheels, so i could start putting in propellers but these wheels. I put in i couldn’t put propeller blades on and i wanted to use the thin ones since they’d be lighter and they just make the whole thing a little bit slimmer. But unfortunately, i couldn’t do that so i’d use these larger wheels, which is fine but just looks a little bit bigger. So, after putting on all those propellers as soon as i start spinning up the wheel, you can see i start gaining height and it’s flying up, which is good, but it has a few issues now.
The first one is that it’s rotating, like that. It should be able to just face one direction and stay that way and also after i flew for a while. He started tipping to the one side and just ran straight into the ground. So i need some way to fix those problems, and the first thing i was thinking was just add a second set of four blades, or, i guess four propellers, and have them spinning in the opposite direction, to cancel out the torque produced by all of these propellers. Now i thought this would be the best solution, since, if i just turned on or off a pair of propellers, it would have no effect on the net. Torque it’d still end up being. Zero should probably be the best in terms of controlling the system and all that. So if you build up a bit of a bracing frame here, you see i had a similar issue, the last time where it just started oscillating. So i added a few more bracing pieces in place and after i did that you can see it’s totally rigid, so i added those four large wheels and then just had to reverse their direction after setting all the wheels like that, i also had to put in The propeller blades, but i had to reverse their pitch, and this is because the blades are rotating the opposite direction so to push hair down. They have to be pitched to the opposite way.
But if i did that for all the propellers, i decided to take off again and see what would happen so it takes off, which is good, but you can see it’s still rotating a little bit and my theory was that it probably had to do with the Pitch the blades it’s really hard for me to get that perfect since by default they’re slightly pitched, so they get the angle perfect when i reverse, it is hard to do so, since i was gon na need some sort of other stabilization system anyway. What i decided to do is delete what i had with all those other propellers, since it was just over complicating things and i wanted to work on a different system. Instead, this one was sort of like a reaction wheel and by spinning this wheel in the same direction that the drone is rotating it’s, going to create an opposite torque and keep it stable. So my first test here seemed really bad and it’s, because i had the reaction wheel, rotating in the opposite direction that the drone was going, so it just exacerbated the rotation. But if you’re setting its direction correctly here, you can see it’s pretty good, it’s, still rotating a little bit but it’s much better than before, after just tuning its speed to get it perfect, so you can see it’s almost perfectly stable now so with that out of The way the next thing to do is start working on the tilt control.
Now this is going to keep it from tipping over and just running into the ground. So to do this, i put in a wooden beam, like you saw there and two angle meters. Now these angle meters are good because they’ll detect when something’s not in a specific angle range. So if i set it to be pretty thin so that there’s only a 20 degree range in the middle there whenever it tilts outside of that range, i know i have to turn on or off one of the propellers to be able to stabilize the drone again. So if i got that all in place, i decided to let it get in the air and at first it stays totally stable, but that’s normal. It takes a little bit of time for it to tip like it is here, and you can see those lights are coming on now, so they’re detecting there’s a problem now the way i have the setup isn’t quite going to work, though, because it detects that something’s Wrong on each of the axes, but it doesn’t detect which side it needs to lift up. So, if i add in a second angle, meter it’ll detect if i need to turn on or off either left or the right propeller to keep this thing stable. Now, in this case, what i’m going to be doing is turning off specific propellers to make this work, so i need to invert all of these signals by doing this, what it does is normally keeps all the propellers on, but only if they get outside of their Angle range will turn off the propeller which will stabilize the droning out.
So after i got that and set all the key binds to all the propeller blades you can see here they turn on and off to keep the drone kind of stable. It ends up wobbling back and forth a lot and it’s, because during my testing i actually set it to just a two degree range. So i needed to expand that just a little bit so that it doesn’t correct itself quite as frequently but after i did that you can see it’s pretty much totally stable, so adding in a second reaction wheel as well – and this is one that i can control With just my keyboards that i’m able to manually spin the drones left and right, however, i want – and you can see i’m doing that here so after i got that the next thing you do is start working on the tilt control to get this thing to fly Forwards and backwards and it’s actually pretty easy to do, if i just add in a steering, hinge and then put all of my angle meters. On top of that, the drone is going to want to turn to keep those angle meters perfectly level. So if i tilt that angle, meter it’s going to actually have the effect of tilting the drone as well it’s a little hard to show it’s tilting. So what i’m doing is putting in a few logic gates – and these are buffering the outputs from those angle meters.
So i’ll be able to manually turn on and off the drone to keep it from just immediately taking off as soon as i enter the level. So after i got that you can see, i could tilt this thing from side to side and get in the air and do that it has the effect of tilting the entire drone. Now. My next thing i wanted to focus on was getting this thing to be stable. Stop rotating from side to side. Now the reaction wheel helps with that, but all it’s doing is canceling out the torque from the top blades, which means that there’s no net angular acceleration on the drone, but it doesn’t stop there from being any angular velocity. So if there’s factors like wind or something it’s not going to have any effect of stopping that rotation, so i did is put on some speedometers and i was hoping i’d be able to use this to detect if the drone itself is moving around. So as we just spin it up on the grounds here, you can see it is detecting that there’s rotation, but as soon as it take off. It also detects that it’s moving. So these speedometers aren’t really gon na work, because they only measure total speed. They don’t measure velocity in a specific axis so since that wasn’t gon na work, my next thought was to use angle meters again, and this is actually easy enough to do. If i just put it straight on the drone like this, you can see they always stay perfectly straight, or at least the needle does and they detect.
If the drone is moving. So i was hoping i’d be able to use a whole bunch of these to figure out if the drone is rotating and if so, in which direction so i’ll know which direction. I need to add additional torque to cancel out this rotation now put in a bunch of ballasts here and i’m gon na just put the angle meters on these. So if i got that, i had to brace them to the body of the drone and then delete them from being on the center of the drone, since that part needs to be able to tilt from side to side freely. The next thing i did was lower. All the way to the ballasts after i did that it was a little bit weak, so i just braced it up a bit more and finally put on my angle meters. So originally i had 16 of these things, but i realized i was kind of in over my head and that was going to be a lot of work. So, instead, what i did is just went for eight and after i did that i set them all so that their angles turn out at very specific times, and you can see here they turn on in a specific order. As i move around, i was hoping i’d. Be able to use this to be able to detect, which angle i’m at and by using that i’d, be able to store that information and figure out what change in angle, i have to figure out what torque i need to put on this to stop that angle.
From changing so that was going to involve a lot of comparator circuits and memory circuits and honestly, i didn’t know how to simplify that. So what i did is just deleted it temporarily. I was gon na need to come back to it another day because it was just a little bit complicated, so i saved that for later and instead worked on something else. Now, what i’m doing is adding in a second wheel for all the propellers and this one’s for moving up and down the drone. So by spinning up these extra wheels i’m able to move up faster or i’m able to actually move down a little bit, and you can see that here. So it came back and this was the next day and what i was going to try to do was start working on that stabilization system. Again now i was going to use pistons to be able to control my reaction, but this just made things worse, so i deleted those put back in the ballasts, and now i had a new idea. So i could do is set two angle meters to be 90 degrees out of phase and what this does is have them turn on and off. Very specifically, so you can see here, as i rotate counter counter clockwise. If both of the angle meters are off the first one to turn on is always the top one, and similarly, as i rotate clockwise here, you can see the first one to turn on is instead the bottom one.
So i can use this information to be able to figure out which direction i need to apply a torque to be able to cancel out the rotation. This system is a lot simpler than the last one, since i could do it as four sets of two angle. Meters, instead of one set of eight angle meters like i had before so to turn what i said in the logic, what i have is a nand gate. This looks to see if both of the inputs are off. If they’re off, we need to see which meter turns on first, if it’s, the bottom one, we can run into a timer block that rotates the wheel slower to make the craft move counter clockwise if it’s the top one, though we need to do the opposite and Rotate the reaction wheel faster to move the craft clockwise each pair of the two angle meters will work once in the rotation, so i’ll add two for now to create a 180 degree stabilization, but later i’ll have four for 90 degree stabilization here. If i just do a quick test by rotating the entire drone on the ground, you can see, as it ends up getting to a specific point. It ends up rotating backwards and i didn’t hit anything there. It automatically is springing itself back to keep itself in position. So that should work. The next thing i was working on was adding in yet another wheel to these propellers.
Now what this wheel is going to do is just be a static wheel that constantly rotates up whenever the drone is on now. The reason for this is all of my thrust from before was created just by the top propellers and those were turned on and off constantly by the stabilization system, because that meant that the main thrust of my drone was being turned on and off quite often, which Meant that as soon as it started tipping, it would fall quite fast, so adding these extra wheels and just mitigates that a bit. So i also moved off all the logic from the drone. Just temporarily, though, because i wanted to replace the wood pieces with ballast since the ballasts are lighter, so i got those all in place and i just had to brace them, and i forgot that it was still able to fly and everything. So i decided back on all the logic and after i did that all still worked so, like i said before i’m going to be adding on two more sets of these angle meters, and this gives me a bit more finer control when i’m in the air. So here i’m just going for a quick test and you can see it’s pretty much holding its angle straight here. When i fall, though you can see, it actually begins to spin just a little bit, and also when i go up, you can see it also spins, and this is because, when i spin up and down it, spins the propellers faster and slower, which creates more or Less torque on the body of the drone.
I need the reaction wheel to be able to well react to this, so it did to fix this set and on a third and fourth reaction wheel, i actually only needed one of these i’ll delete the other one in a bit and what this one’s gon na Do is when i’m telling the drone to move up or down it’s gon na spin the wheel faster and slower to be able to cancel out that movement. Now there i actually said it incorrectly, so it was exacerbating the effect instead of fixing it. But i forgot it’s spinning in the right direction. Now as i fall down, you can see it can hold itself pretty much stable and it moved up. It was the same story, so i deleted the extra wheel that i put in place, and now the drone is pretty much good now. What i did is added on two more logic gates, and this is to turn on and off the entire system. I just developed before to keep it straight because, when i’m flying, i don’t actually want that system on because it makes it very difficult to turn face wherever i need to. But if i’m just trying to hover it’s great – and i do want it on so i just put that on a toggle and then i also added another ballast here and this one’s in the bottom of the drone. Now the idea of this one is i’m gon na put a grabber on it and just gives me the ability to pick up things that i see on the ground and just make the drone somewhat useful.
So after i made that i tried picking up sheep, which didn’t turn out too well, so i tried again, i was gon na pick up, one of those guys in the tents over there, so i started hovering and it was actually going pretty well and fortunately they All run towards me, which makes it easy for me to pick them up and i actually snacked one. So i just flew up pretty high and then i just released the grabber and i don’t think he made that so. The next thing i tried to pick up was one of these massive iron ores. Now this first one just didn’t go too well, because i ended up accidentally grabbing it when i wasn’t expecting and my flying was kind of garbage, but the drone was holding itself up straight, which was promising. So i got it a second time and this time i actually was expecting to grab it. So it worked out and i was able to fly up and the drone was keeping itself totally stable, and here i just dropped on the ground and it all worked out. So, just for a couple more tests here, you can see i’m able to fly basically wherever i want, and here i have a stability test where i’m just trying to keep it as straight as possible, and it ends up facing the same direction. It does drift from side to side which, maybe in the future i’ll figure out a way to be able to prevent that, but for now i’m pretty happy with how it says so guys, thanks for watching definitely quicker video but i’m glad.
I got the drone to work as well as it did, maybe in the future. I’Ll make another one that can prevent itself from sliding from side to side, but for now happy with how this turned out so make sure to subscribe.