This has got to be one of the best tech resumes in the World. Smart, skilled, knowledgeable, motivated, attention to detail, quality workmanship, helpful and honest.
Well, if you put in the effort I am convinced that you can fly any plane which is simulated in high detail, like the 737 and such from PMDG or the F-16 from Falcon 4 BMS or an A-10 from DCS.
@@ferrari2k One probably can, as long as everything is running as planned. Trouble can very easy be brewing. A great example is one doesn't get spatially disoriented in a sim.
@@thefreedomguyuk Absolutely right. But look at it this way, if the pilots are both (!) unable to fly and a simulator guy is your best bet.... that plane already has little chance to make it ;)
When the video first started, I was like “HOLY MOTHER OF GOD! His sim looks more and more lifelike every day!!!” 🤣 Seriously though, it’s just more and more epic with every video update. CHEERS MATE!
You are a genius! We are lucky that you are prepared to give a show-and-tell on how you make the parts. I only have a beginnings of a Spitfire SIM but I am going to look at making a real panel now thanks to your encouraging videos. Thank you.
it isn't just for dcs, he's really talented with all of the computer engineering stuff related to this and it's probably a combination of multiple hobbies. If you think about how much people will spend on cars or getting boats for hobbies, it isn't that hard to justify spending the same amount on flight sims. Hobbies are hobbies man
Hi, flight instructor here. The game is apparently doing a pretty good job of simulating real magnetic compass errors. A real magnetic compass is pointing directly at the Earth's magnetic pole. Here in the Northern hemisphere, that means the North needle is pointing North/Down. So that the compass scroll floats level in the binnacle, the south pole of the magnet is weighted. The intertia of this weight means that the needle will indicate (in the Northern hemisphere) a turn to the North when accelerating on an East or West heading, and a turn to the South when decelerating. It will also lead or lag the actual heading when you bank into a turn, depending on which direction you're starting from/going. That's called dip error. That "It looks like it's not quite there but then you roll out and the compass suddenly spins" is something real aircraft compasses do. It can be pretty fun trying to turn to a heading with the compass sloshing all over the place. That's why the invented gyroscopic heading indicators. I imagine it would be difficult to build a simulated magnetic compass without resorting to an LCD screen, with all the bobbing around a magnetic compass does. Also, that white line is called the "lubber line." "Famous video when it just goes to water" Aviation magnetic compasses are filled with a fluid, commonly a spirit like kerosene. This is to dampen oscillations; if the compass body was full of air the compass would bounce around so much it would be impossible to read. The vibration of the gun seems to have quite an effect on that liquid, cavitating it heavily.
"I imagine it would be difficult to build a simulated magnetic compass without resorting to an LCD screen, with all the bobbing around a magnetic compass does." It should be doable electronically by grabbing a real compass and setting up electromagnets around it in three axes to get the magnetic field vector along any desired direction. Idk if there's enough info coming out of dcs to reproduce the behavior correctly, though -- it might have to be modeled again using the bank angle and acceleration vector or something.
If you look hard enough you’ll find dual axis ones. You could probably do elevation with some gearing/levers off the second one while rotating of the primary.
Minor correction, due to the way the X27s are driven, they can be driven directly from the GPIO pins of an Arduino. As an inductive load, normally there'd be back EMF to worry about however due the way they're driven in practice the backemf won't hurt the logic level pins on the arduino. The GPIO pins can also provide enough current to drive them adequately.
15:30 All you're missing are some actuators underneath your desk legs, so they would spin it back and forth and to the sides. Hi, hi, hi, hi... So great project to implement!
I took a quick glance at the code you used. The issue with the "lag" when you pass through zero seems to be that the code tries to re-calibrate every time you pass though the zero, as you can see in the comment "// recalibrate when passing through zero position", but the state machine the author uses (called initState) doesn't differentiate between being at zero because you're passing through vs. being at zero because you are calibrating. I obviously didn't debug this in depth but I'm sure there's a way around this. After the re-calibration is done, then the code proceeds to see where it needs to move based off of DCS data. I think the time spent during that re-calibration is what you perceive as a bit of motor lag, since the code tells the servo library to reset to "0" and this is a blocking call according to the documentation of the Arduino servo code.
Part of the problem seems to me that the nail doesn't have "zero width". There is a range of pulse positions where the nail would be detected. So if the initial zeroing is done when the clockwise edge is found, it'll cause problems going anticlockwise because the edge is in a different place. That looks to me why the card "jumps" in the video. The idea I'm working on would detect both edges and zero to the mid point.
I'm glad you guys arr around, because i have a very limited undertstanding of the code! I just cut and pasted it. Would be awesome if we could make it better!
@@thewarthogproject you can safely remove the lines 81 to 94. The servo is already calibrated; no need to recalibrate it while it's running. If you are affraid that the data might overflow , don't worry , normalizeStepperPosition is already called inside updateCurrentStepperPosition. The only thing is that it might eventually be drifting in the long term. Now how much it will drift ? Probably not enough to care , but if you really want to be able to recalibrate on the fly , you could probably use the test light button to start a recalibration process.
Thanks for still making these man 👍 I started watching your channel about a year and a half ago. Man oh man what a thing cockpit building is and I'm so damn hooked building now. Looking back I knew nothing about stepper motors, the types of motors, switches, servos, building a HUD, 3D printing or even using a laser CNC. I had no idea where to start and got scared off a few times... but I kept coming back to your videos man. When Covid 1.0 came around I finally got a laser cutter, upgraded it and went to town. Start with a basic panel and then move up. Now looking back on my first simple switch and LED to building complex guages for my F16 pit. Learning and researching systems to build a fully working and combining HUD. Going to town wiring LED's and switches. Now I can follow a video and know exactly what code types will be needed and follow along. Best of all, it's addictingly fun. My god expensive, but so much fun. But for real, thanks for showing and teaching people.
Compass errors aren't just about the jumpyness due to the compass not being upright. There are a whole host of naviational quirks you have to be aware of when using a normal compass. A compass will do weird things like twisting under acceleration that make navigating with it a challenge, and the primary reason we use gyroscopic instruments. The standard list taught to pilots is Variation, Deviation, Magnetic dip, Oscilation, Northerly turning error and Acceleration errors (the acronmy is VD-MONA)
I've enjoyed every video I took time to watch. We value so much the Documentation, Time to film and edit, Honest review of your thoughts, Project Tips and Insights of Development of Items Hand Made. It's a joy from start to current development state of your project. I'll never use any of this to build anything but I can see the true value of it all. Thanks for sharing. I would like to ask you this if I may. What are the Things, looking Back that you did not know then but do now that stand out the most to you now as I never thought I would be doing this kind of technology or have the ability to Do this kind in my own home for this project. It's very obvious you have the ability.
Thanks heaps! Ill do a bit of a montage at the end of the year showing how much this thing has changed, from a single button box to where it's at now. A lot has changed this year alone. To answer your question, looking back the thing that stands out most is learning the design process. It went from simply drawing out 2D panels to cut them on my laser, then evolved into pretty detailed CAD design for printing STLs. Manually cutting things and just making it up as i go along was what i used to do. I've learned alot about design!
I couldn't have said it better. The audience that will make use of this information is small but I'm learning just from watching and truly appreciate the effort that has gone into it
you are very cool, because you teach how to assemble, make your projects open source, there are people who don't share their projects, I'm building a home cockipit of the F-16, Block 52, I'm having huge difficulties in assembling, I write asking us build forums, but no one responds, don't share projects! Thank you so much for your videos!
FYI, compass lead/lag is real. When turning north to south or vise versa. It looks like the in-sim version attempts to model this, but it’s probably pretty difficult. The whiskey compass also probably has pitch/roll limitations where it will stop rotation outside of this envelope. Might be very difficult to accurately model this in your cockpit, but nice job regardless. 👍🏼
Yep I know. DCS does output it as a variable in all axis of the Compass (pitch, roll and yaw) I just didn't personally like it. If I had all three axis moving it would probably look OK, but with only yaw it just looks broken.
Dude, you have to just make these parts and sell them for a premium. Granted, they won't sell like diet cokes ... but you deserve it. And some people just cannot do this. Personally..? I love it and if only I were more into DCS (I haven't even played it) I would absolutely follow your plans. Hell, I want to follow your tutorial for other ideas.
That weird lag is called magnetic dip. Basically as you turn it will induce a torque with the turn rate of your aircraft. This cause is to lag or jump ahead based on if your making a right turn or left turn in reference to north.
I have just started using hellos on a touch screen this is definitely way beyond what I could do, I have a 3d printer on order a will be making my first control box and trim controls
I would suggest printing a tab under the compass so the nail protrudes radial and the ir sensor below sideways as well. If you want to include balance, switch the nail with cylindrical magnets on the 4 spokes with the 4 magnets with all orientation north and a hall effect sensor.
I'd like the green a deeper green which can easily be done with doubling up the card and I have found that a good diffuser is the plastic milk carton material. In real life they are so dull it's only just visible at night.
Very nice work. Interesting. When I did my compass I as well set it up to read the HSI data. However, after 185 hours of use I had an in-sim electrical fault and realized that when my HSI died in the sim, so did my compass, thus I couldn't even use it as backup as intended. lol So I had to switch it to another yaw data in the shared memory and now it works as it should. Not sure if this would be an issue in DCS, but it was in BMS. When the HSI stopped working so did the data from it. Just an FYI in case that is an issue for you.
I have never used it but the mission editor in DCS has a tab for attributing a random chance of failure to different systems after a selected amount of time.
Yeah i did consider that, but most of the time my jet is that damaged I dont really need a compass because all i have left of it is a seat and a parachute haha! I originally tried using the general raw DCS heading data for it, so in theory it would work for any jet in the game, but for some reason i couldnt get it to respond correctly. I'll re visit it later on.
@@thewarthogproject I've not looked at the code for the compass yet, but there is a way that could make it respond to multiple aircraft in DCS-BIOS. I've recently discovered that you can use "onChange" functions from different aircraft modules to refer to the same subroutine, and it just ignores the modules you're not using. So in context, you set up the routine that drives the compass to respond to a generic value (e.g. "compassHeading"). Then you put in "onChange" code that converts the A-10 HSI numbers to "compassHeading", then calls the output routine. Then add another "onChange" conversion for (in my case) the P-51 directional gyro to "compassHeading" and call the same output routine. That will only respond to a limited number of modules, but it should work. Check out my post here for an example: forums.eagle.ru/topic/269903-dcs-bios-arduino-code-for-switching-between-modules/?do=findComment&comment=4762421
wow, overly impressed, A10 being my favorite aircraft ever, c130 after XD i know im wierd but damm, your rig is mighty fine sir, cant help but be envious
That’s sick I am doing the same thing but multiple planes and helis I really like your cockpit mate given me a lot of inspiration to help me with my training but I am debating if I go into a bed room
Nice job! That’s how I finish 3D prints too, only I wet sand. That way I don’t inhale the dust and the sanding paper doesn’t clog. Can really recommend wet sanding!
I am so Jealous of your setup. You had to have put a lot of time into making all of those panels, gauges, cockpit, and everything else. Spot on with your masterpiece. I spent 10+ yrs working on the A10C. It was an awesome aircraft to work on. Very very simple systems to troubleshoot and maintain.
Thanks for everything that you have done and continue to do for us in the DCS Sim Cockpit community. I have my Standby compass assembled and ready for the wiring. What pins connect to what? The video shows some, but not great.
Have you ever considered showing off the FreeCAD modeling and assembling process in more realtime (or honestly even recorded and sped up)? Conceptually I understand each operation but watching a full start-to-finish task accomplished would be invaluable.
I'm certainly no expert at CAD modeling, so I'm sure I'd get plenty of haters in the comments on that one! All I do is use the parts workbench to generate basic shapes. Then cut and slice them using other basic shapes. It's not pretty, but it does the job haha.
Awesome job, all sounds easy but just for a well talented guy like you, it's abut years and years long I'm trying to look how it can be done to building it and place on my simulator dash, still I'm not succeed, I'm using "simwim programming" for rest of my gauges and knobs which running very well with x- plane 11, but that program doesn't cove Compass. Thanks for sharing I learned alot 😊♥️👍👍👍
The task of making it move left to right like the real one doesn't seem out of reach. You could use a hall effect sensor for the calibration (with a magnet embedded in the wheel instead of sitting on top) to gain lots of vertical space and use a micro servo or a couple of them to move the axis of rotation of the compas
For the compass label try printing it in reverse on A4 transparency film. Cut it out, flip it over and glue it in place. The glossy transparency film makes a nice finish.
WOW! I would line up to buy one of these. What a great job! I am looking at the rest of your videos and will be subscribing to your superb channel. Keep up the awesome work. :)
Instead of that paper look at getting yourself a sample of Cinefoil. It's made by Rosco who also makes gels for movies and television. Cinefoil is a really thick anodized aluminum foil. you can easily cut it with scizzors and bend it into various shapes. It's used to block light in various ways, but because it's aluminum stands up to heat. You can wrinkle it up and re-flatten it and the black anodizing comes off, which is a technique you could use for a worn metal look.
Surely you could simulate the compass fluid shake by sandwiching some fluid between two sheets of acrylic and simply mounting a couple of vibration motors to that?
Very cool project and nice mix of 3D printing and electronics. Regarding the jump at the zero point, when i've had to do something similar with a continuously rotating server that zeros when it returns to that point, the way I have fixed the obvious jump (which really is an accumulation of all the errors) it to pick a number, lets say 15 and when you zero you create a 15 point list of errors (so the totalError/15 in each list item). Then on each subsequent position update you lose one of the 15 errors into the new position calculation. If your 15 updates don't move the position then you gradually creep to the correct location over 15 time units but it can be so slow that is just like a deviation to the actual point but if the rotation is constantly moving then you don't even notice any error correction... I know you didn't write the code though so it may be difficult to figure out how to loses these errors within the existing code but basically that is how I would do it. Every time you zero you need to take whatever error is still left in the 15 point list, lets say 8, total them back up (8*individuaError), add that to the new error calculation and split it back to 15. You can also reduce some of the error in the first place by counting +1/-1 steps to get back to the zero point, work out the error, divide by total number of steps and add that as an adjustment error for every update. That should reduce the larger error when you reach the zero point again. I'ts kind of like integrating when you have a PID controller but simpler to implement...
An idea (possibly): Buy a real (boat) compass, and when playing use electromagnets around compass to manipulate into position. Can it be done this way?
I see two possible ways to make this work with a real compass: use several electromagnets and some clever analog circuitry to create a magnetic field that can effectively point any direction, or use a mechanism like what he's built here to turn a permanent bar magnet in the base of the instrument that the compass would then chase with realistic lag.
I will say one thing: regarding the "not realistic" behavior of the magnetic compass, these things are indeed rat shit in real life and you basically have to be straight and level for a moment to get a worthwhile heading from them. Its a real nightmare to have a gyro/vacuum failure and have to fall back to mag compass especially when IMC
Yeah that's true they are only vague unless you've been straight and level for a while otherwise they overshoot or undershoot or they point towards your headset. They are also usually faded to a light brown on black with bits of crap floating about.
If you drive them directly from the Arduino, you have to keep track of the output combination for the step. With a stepper driver, you just give it a step pulse and direction.
@@toxaq Number of pins isn't really an issue if you're using the Nano just for the stepper and a few LEDs. What COULD BE an issue is the amount of current drawn from the Arduino's 5V regulator with everything running at once.
@@No1sonuk you don't need a lot of holding torque so might be ok to just limit with appropriate resistance but you'll need a snubber because you're driving an inductor.
Nice Video, but better use a AS5045 Magnetic Rotary Sensor for closed loop control of the Motor. Then you can also switch to a dc motor and simulate the vibration by switch fast between direction of rotation.
Really like what you have done with your cockpit. For your compass you could try using this stepper motor. NEMA17 Pancake Stepper 22mm with this stepper driver a4988.
The X27 168 draw only a very small amount of current, I connect them directly to the ports of the Arduino via 1 Ohm resistors, you do not need a driver circuit. With that method, I built a traditional looking weather glass with an Arduino and a BMP180. I think you used a stepper driver to use 12V because the rotor is quite heavy, isn‘t it? A direct connection can be used if you only want to drive a light clockhand (btw.: a good clockhand is a seconds hand from a cheap clockwork, it fits perfectly on the axis of the motor)
IF you use a stepper driver board, you don't need to keep track of output combinations and micro-stepping is easier. All the arduino needs to do is send a step pulse and direction signal.
@@No1sonuk For this small steppers the Arduino subroutine is very short because this stepper is not capable of microstepping. Only a few lines of code make the stepper move.
Just a heads up the way compass turns in the jet is real - the standby is terrible during turns - you get pre and pro cession based on if you're noprth or south of the equator etc. Id let it do the real thing :) (PPL Pilot)
I just want to say you have been a HUGE inspiration to me! I have started doing panels for an F/A 18C build including PCB's which I intend to make myself, and I have a ton of questions for you! The first one I want to ask is why are you only doing 3 LED's in series when you are using +12V? With a 2V forward voltage loss (Vf) shouldn't you be able to wire up at least 5 LED's per series?
The relationship between voltage and current for an LED is not linear. For example an LED with 20mA at 2V might draw 40mA at 2.1V. So any small voltage increase significantly increases the current, possibly above the rated maximum. A current limiting resistor greatly reduces the effect (For a random LED on the internet: having 6 in series, no resistor, a voltage increase of 10% would increase current by 200% from 20mA@12V to 60mA@13.2V. That would likely kill the LEDs. Having 4 in series with a 200 ohm resistor would mean a 10% voltage increase would only increase the current from 20mA@12V to about 26mA@13.2V, or by 30%)
@@JakubKraus0 according to Ohm's law, the relationship between voltage and current is linear with respect to resistance. ie. V=IR. I was not trying to advocate not using a resistor at all. My point was on a +12V circuit using 5 LED's, with 10V combined forward voltage and 20mA of forward current, a 100ohm current limiting resistor should be sufficiant. If you use only 3 LED's with a 2V forward voltage each, then a 300ohm resistor should do the trick. What is wrong with having 5 LED's on a +12V circuit?
Beautiful engineering , its a pity that it does not show normal indications, compass turning and accelleration errors. This is really an HSI in a magnetic compass indicator. I just brought an HSI that weighs 5 lb, uses 28vac supply, , thats a load of weight. All this could come out of a 3D printer and weigh a few ounces.
I wonder if using a Cambuí would not make it easier, automotive connections and carry 12v to power the entire thing. You could also make all devices listen to the turn on and off backlight.
oh wow dcs doesn't have a compass data variable you can access? I've done a lot of hardware for an x-plane sim, and x-plane has a compass heading dataref/output. a few things to consider: Could have it read bank angle to approximate the northerly turning error which is the most significant compass error. Wouldn't be hard to come up with a table of headings and bank angles to approximate the compass behaviour without getting too complicated. As for the stutter on north, I would consider separating the current calibration from a fresh calibration into two variables. So for examplethe current calibration thinks the compass is at 006°, and a new calibration signal comes in to indicate it's actually at 000°. The compass should keep operating normally under the current calibration and not jump. Slowly the current calibration would drift torwards the new calibration, over lets say 30 seconds. This would allow good accuracy while preventing jumpy readings.
Nice, but by using HSI data you lose the point of the whisky compass: it works after your HSI goes pop :D Why not use the mag compass data with an Arduino-side smoothing function? Could be really simple - just display the average of the last X hundred values - so no abrupt movements and also not completely reliable unless flying level?
Hello TWP, thanks for the video and all the other resources you make available for free. With much help from another genius friend, I have ever build such a compass. In that compass, we also used a lightbridge to determine the '0' point. However, we used a very small hole in a further closed disk. Is the pin you use not to wide to make it enough precise?