Jump to content

WhoMadeWho

Members
  • Posts

    77
  • Joined

  • Last visited

Everything posted by WhoMadeWho

  1. Thanks Ian for the very detailed description and analysis of what was happening with the RS-485 bus. Will the official DCS-BIOS documentation be updated, or even better - a Fritzing drawing of how it all comes together? Would you like any assistance with docs? Cheers!
  2. Thanks [FSF]Ian. I checked Virustotal last night as well. The file is indeed not malicious at all and is rather old (was compiled back in 2012). You'd think Microsoft would have built a reputation on this file by now, but I suppose someone used it for evil - just like netcat can be used for good or evil.
  3. Just a note - I tried downloading the newest DCS-BIOS tonight and it seems the built-in antivirus on Windows 10 does not like a socat dll present in the archive... This was downloaded from the official github site https://github.com/dcs-bios/dcs-bios/releases/tag/v0.5.3
  4. Thanks Warhog! Hopefully you get your order. Seems like there are a lot of Chinese scammers on AliExpress. For driver boards, I'm using multiple Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Boards (see https://www.adafruit.com/products/2448). They work great with the Arduino/DCS BIOS and are fairly inexpensive. They have the added advantage of being breadboard friendly so prototyping is much faster. Here is the code I'm using for the steppers - I found this on a forum post on here. I did have to modify the MaxSpeed & Acceleration prams. If they are too high the steppers will drop steps and give inaccurate readings. #define DCSBIOS_IRQ_SERIAL #include <AccelStepper.h> #include "DcsBios.h" struct StepperConfig { unsigned int maxSteps; unsigned int acceleration; unsigned int maxSpeed; }; class Vid29Stepper : public DcsBios::Int16Buffer { private: AccelStepper& stepper; StepperConfig& stepperConfig; unsigned int (*map_function)(unsigned int); unsigned char initState; public: Vid29Stepper(unsigned int address, AccelStepper& stepper, StepperConfig& stepperConfig, unsigned int (*map_function)(unsigned int)) : Int16Buffer(address), stepper(stepper), stepperConfig(stepperConfig), map_function(map_function), initState(0) { } virtual void loop() { if (initState == 0) { // not initialized yet stepper.setMaxSpeed(stepperConfig.maxSpeed); stepper.setAcceleration(stepperConfig.acceleration); stepper.moveTo(-((long)stepperConfig.maxSteps)); initState = 1; } if (initState == 1) { // zeroing stepper.run(); if (stepper.currentPosition() <= -((long)stepperConfig.maxSteps)) { stepper.setCurrentPosition(0); initState = 2; stepper.moveTo(stepperConfig.maxSteps/2); } } if (initState == 2) { // running normally if (hasUpdatedData()) { unsigned int newPosition = map_function(getData()); newPosition = constrain(newPosition, 0, stepperConfig.maxSteps); stepper.moveTo(newPosition); } stepper.run(); } } }; /* modify below this line */ /* define stepper parameters multiple Vid29Stepper instances can share the same StepperConfig object */ struct StepperConfig stepperConfig = { 475, // maxSteps 100, // maxSpeed 100 // acceleration }; // define AccelStepper instance AccelStepper stepper; // define Vid29Stepper class that uses the AccelStepper instance defined in the line above // +-- arbitrary name // | +-- Address of stepper data (from control reference) // | | +-- name of AccelStepper instance // v v v v-- StepperConfig struct instance Vid29Stepper apu(0x106e, stepper, stepperConfig, [](unsigned int newValue) -> unsigned int { /* this function needs to map newValue to the correct number of steps */ return map(newValue, 0, 65535, 0, stepperConfig.maxSteps); }); void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); } Keep us posted of what you end up doing for the Altimeter!
  5. Update Hello, I thought I'd post some updates on my A10C cockpit work. Work has been progressing, although not as fast as I'd like. Landing Gear panel This is the landing gear handle. The wood filler is to hide the tunnel under the handle that contains two small wires to connect to a red LED in the handle wheel. Incidentally - this clear wheel is just that, an OFFICE CHAIR wheel. It works pretty well. It's attached with a long screw. The handle itself was cut out of Oak on my CNC. Side of landing gear panel. The handle will lock into either the UP or DOWN position. To move it, the pilot must PULL on the handle and push it to either DOWN or UP - hence the springs. Not sure if the real A10 is like this, but many of the complex aircraft I've flown in real life are like this. Back of panel. Front of panel. Handle is lit with single red LED drilled into the wheel. Flaps down, Gear handle down, three on the tree. The landing light switch is out of a Cessna 310. Anti-skid switch is a $5 Home Depot special. Other buttons were sourced via DigiKey. The yellow 'Downlock Override' stripes were cut out of sticky vinyl on a die cutter machine and placed carefully onto the panel after cutting. The flap indicator is a VID29 stepper motor. The needle was cut out of thick 'plastic like' paper on my die cutter machine. Air Speed Indicator w/Mach Back of the ASI. I'm using a VID28-05 two shaft stepper motor. Engine Management Panel I'm half down with this panel. It will have an Arduino Mini + stepper motor driver for each indicator. Stepper motor drivers. Just finished cutting these today. I'll need to get some gearing in the back created to drive them off a single stepper. Thanks to several folks for pointing me at the VID stepper motors (Warhog - I'm looking at you - :smilewink:) All of the motors I was able to source via eBay or Amazon. I did try using Aliexpress.com - wow, what a bunch of fraudsters on that site! I had all three of my orders end in non-delivery with all sellers posting a tracking # that didn't actually go to my address. Luckily the site refunded my money on all three transactions but it took forever. Never will I use that site again! If anyone would like to share any reputable vendors for stepper motors, I'd be grateful! Next challenge is to get a working Altitude indicator created. I've sourced a VID69 'clock' stepper motor for this. These have full 360 travel, but the problem is I need to 'zero' the indicator somehow. Another option I thought of is to allow the pilot to manually calibrate the indicator using a digital knob somehow - this would need some coding obviously. That's all for now. --WhoMadeWho--
  6. Not that I'm aware of. Here's the code of I used to debounce my CMSC panel. Note the delay function. This may need to be increased depending on your Arduino setup. This was with a Nano which is fairly slow. #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" void setup() { DcsBios::setup(); } DcsBios::Switch2Pos cmscJmr("CMSC_JMR", 2); DcsBios::Switch2Pos cmscMws("CMSC_MWS", 3); DcsBios::Switch2Pos cmscPri("CMSC_PRI", 4); DcsBios::Switch2Pos cmscSep("CMSC_SEP", 5); DcsBios::LED cmscPrio(0x1012, 0x0200, 6); DcsBios::LED cmscLaunch(0x1012, 0x0100, 7); DcsBios::LED cmscUnkn(0x1012, 0x0400, 8); void loop() { DcsBios::loop(); delay(50); }
  7. I started with a ~$400 CNC machine knowing nothing about CNC. Over time I learned how to create decent panels and figured out the electronics as I went. Every panel has been a challenge, but that to me is the fun part. Solving a problem - be it design, mechanical, electronic or programming. We are fortunate to have DCS-BIOS and its author on here. He's always been very responsive to questions or the occasional bug. Also, we have several nice folks on this board who are more talented then me designing panels that give me ideas on how I could do things based on my skillset and tools. Bottom line I guess, pick up some $4 switches at your local hardware store, an Arduino, a copy of DCS-BIOS and discover what you can create!
  8. I second getting a 3040 machine for engraving. I use mine to cut as well. I got it for about $500 or so on ebay (From China of course) but it has served me very well. These units are also a good intro to the world of CNC milling. My unit came with a pirated version of Mach3 - but the docs encouraged you to buy it if you found it useful - which I did.
  9. Looking nice sir! I'm using plastic to do my panel. The top layer is black on top which can be engraved with a V-bit. I've not tried cutting any metals yet but I believe I can do this on my CNC. It would probably not look as nice as your laser cut however.
  10. This is the code I've been using to control VID stepper motors for my cockpit. I found in the ED Forums. It works very well. Not sure if it's considered the latest code... You will need to modify prams depending on your stepper and what instrument you are targeting. It does zero the stepper at power on/DCS-BIOS init. #define DCSBIOS_IRQ_SERIAL #include <AccelStepper.h> #include "DcsBios.h" struct StepperConfig { unsigned int maxSteps; unsigned int acceleration; unsigned int maxSpeed; }; class Vid29Stepper : public DcsBios::Int16Buffer { private: AccelStepper& stepper; StepperConfig& stepperConfig; unsigned int (*map_function)(unsigned int); unsigned char initState; public: Vid29Stepper(unsigned int address, AccelStepper& stepper, StepperConfig& stepperConfig, unsigned int (*map_function)(unsigned int)) : Int16Buffer(address), stepper(stepper), stepperConfig(stepperConfig), map_function(map_function), initState(0) { } virtual void loop() { if (initState == 0) { // not initialized yet stepper.setMaxSpeed(stepperConfig.maxSpeed); stepper.setAcceleration(stepperConfig.acceleration); stepper.moveTo(-((long)stepperConfig.maxSteps)); initState = 1; } if (initState == 1) { // zeroing stepper.run(); if (stepper.currentPosition() <= -((long)stepperConfig.maxSteps)) { stepper.setCurrentPosition(0); initState = 2; stepper.moveTo(stepperConfig.maxSteps/2); } } if (initState == 2) { // running normally if (hasUpdatedData()) { unsigned int newPosition = map_function(getData()); newPosition = constrain(newPosition, 0, stepperConfig.maxSteps); stepper.moveTo(newPosition); } stepper.run(); } } }; /* modify below this line */ /* define stepper parameters multiple Vid29Stepper instances can share the same StepperConfig object */ struct StepperConfig stepperConfig = { 695, // maxSteps 100, // maxSpeed 100 // acceleration }; // define AccelStepper instance AccelStepper stepper; // define Vid29Stepper class that uses the AccelStepper instance defined in the line above // +-- arbitrary name // | +-- Address of stepper data (from control reference) // | | +-- name of AccelStepper instance // v v v v-- StepperConfig struct instance Vid29Stepper abc(0x12c0, stepper, stepperConfig, [](unsigned int newValue) -> unsigned int { /* this function needs to map newValue to the correct number of steps */ return map(newValue, 0, 65535, 0, stepperConfig.maxSteps); }); void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); }
  11. Very nice!! Wow! Thanks NickD for your work on this. Really impressive! I look forward to seeing what you do next with this. :thumbup::thumbup::thumbup: Now I have to figure out the basics of Blender... but much cheaper than the Autocad products. ;) Thanks again!
  12. RS485 I'm looking forward to seeing the RS485 tutorial. :)
  13. Try this Check this site out - they have thousands of drawings available online (It is subscription based however) http://aircorpslibrary.com/
  14. Very nice Very nice work Warhog! :thumbup: I will be digging into my ADI sometime in the future and I'm sure I'll have some of the same challenges as you. It will be fun trying to figure things out. It is amazing the engineering that goes into these things! Here's a few pictures of my ADI.
  15. DEFAULT_SERIAL vs. IRQ_SERIAL This is good info on IRQ_SERIAL! Thanks for sharing. Somewhat related, any issue with multiple Auduino or similar devices running at the same time? For example my cockpit build will utilize ~40+ Arduinos Nanos, each on it's own COM port with a dedicated instance of socat.exe hooked to each COM port. I've tested 15 Nanos simultaneously and didn't note any issues at all (performance or otherwise). Thanks!!
  16. CMSC The dimensions are a best guess based on what I have to work with, which are basically photos of a real A10C cockpit and the DCS A-10C module itself. I did have to base some sizes to work with the displays and buttons I had on hand. I'm also using a custom font on the CMSC OLED displays. It matches fairly close to the DCS A10C module. I had four major revisions before I was happy with it. Overall I think it's decent CMSC. If I were to do it again, I' think I'd try to recess the buttons. Knowing me, I'll probably make a 5th rev at some point. :music_whistling:
  17. Hi Gadroc, I would be interested to see your notes/findings on your ADI. I'll be getting to that project this winter sometime. Nice work on Helios! :thumbup:
  18. VID60 - Thanks! Thanks Warhog for the suggestion on where to get the VID60s. I placed an order from China and in 10-21 days I should have 10 of 'em! If anyone on this thread has a need for this motor, let me know - I doubt I can use the quantity of 10 they are shipping me. :) I was thinking of running the ADI via NEMA motors as well. I think my challenge will be getting the motors and gearing placed and correct, then of course the calibration. The amount of design and precision inside the ADI is very impressive.
  19. For the Master Arm switch I think I paid $90 - way too much but I wanted the look and feel of the real thing. The rest of the switches I was able to acquire online in various lots for about $100. Not all are Honeywell branded but look very similar. For some of the other switches I'm using good old $5 switches bought at a hardware store. Didn't want to fork out $$$ for magnetically held switches. Compromises I guess. :smilewink:
  20. VID motors Thanks Warhog & Boltz for the suggestions on the VID stepper motor recommendations! :thumbup: I have a x27.168 motor that I've been playing with that I believe is very similar to the VID29 series. I'm using a H-bridge chip in the middle. I'm not 100% this is needed, but I believe it doesn't hurt for safety of the Arduino and the USB port (Anyone have thoughts on H-Bridge usage?) I have two VID28 motors on order but I wasn't able to source the VID60 online. Any preferred vendors for these? I am indeed using a real attitude indicator. This is a standby indicator so it has motors inside and not gyros. This came out of a UH-60L Black Hawk helicopter. It was a 24volt instrument so I don't believe I can use any of the original motors but I for sure can use the gearing already inside. I found the real attitude indicator the A-10 uses, but it was $8000 !! That would put me over budget real quick! Warhog - your build pictures look amazing!! Thanks for posting those! I may look into getting a faster aftermarket Arduino, so thanks for the tips here as well. As for code I'm using to drive the x27.168 motor - I found the below code on the forums here. It works great! Not sure if there is a better or updated revision. Hopefully this code makes it into the official DCS-BIOS documentation at some point as I'm sure it would help out others. #define DCSBIOS_IRQ_SERIAL #include <AccelStepper.h> #include "DcsBios.h" struct StepperConfig { unsigned int maxSteps; unsigned int acceleration; unsigned int maxSpeed; }; class Vid29Stepper : public DcsBios::Int16Buffer { private: AccelStepper& stepper; StepperConfig& stepperConfig; unsigned int (*map_function)(unsigned int); unsigned char initState; public: Vid29Stepper(unsigned int address, AccelStepper& stepper, StepperConfig& stepperConfig, unsigned int (*map_function)(unsigned int)) : Int16Buffer(address), stepper(stepper), stepperConfig(stepperConfig), map_function(map_function), initState(0) { } virtual void loop() { if (initState == 0) { // not initialized yet stepper.setMaxSpeed(stepperConfig.maxSpeed); stepper.setAcceleration(stepperConfig.acceleration); stepper.moveTo(-((long)stepperConfig.maxSteps)); initState = 1; } if (initState == 1) { // zeroing stepper.run(); if (stepper.currentPosition() <= -((long)stepperConfig.maxSteps)) { stepper.setCurrentPosition(0); initState = 2; stepper.moveTo(stepperConfig.maxSteps/2); } } if (initState == 2) { // running normally if (hasUpdatedData()) { unsigned int newPosition = map_function(getData()); newPosition = constrain(newPosition, 0, stepperConfig.maxSteps); stepper.moveTo(newPosition); } stepper.run(); } } }; /* modify below this line */ /* define stepper parameters multiple Vid29Stepper instances can share the same StepperConfig object */ struct StepperConfig stepperConfig = { 120, // maxSteps 1200, // maxSpeed 10000 // acceleration }; // define AccelStepper instance AccelStepper stepper; // define Vid29Stepper class that uses the AccelStepper instance defined in the line above // +-- arbitrary name // | +-- Address of stepper data (from control reference) // | | +-- name of AccelStepper instance // v v v v-- StepperConfig struct instance Vid29Stepper vvi(0x10a0, stepper, stepperConfig, [](unsigned int newValue) -> unsigned int { /* this function needs to map newValue to the correct number of steps */ return map(newValue, 0, 65535, 0, stepperConfig.maxSteps); }); void setup() { DcsBios::setup(); } void loop() { DcsBios::loop(); }
  21. Thanks [FSF]Ian for your kind comments! The UHF display is indeed a OLED display (identical to the ones used in my CMSC panel--I put a green plastic filter over them as they only come in one color - white). I'm using a custom font for both the UHF and CMSC displays. Here's what I get when I hit the test button. I think everything is there - Regarding your question on my experience with electronics and programming ; I do have a background in electronics but never did much with it professionally or personally before I starting working on my cockpit. I'd consider myself an intermediate programmer, although I've invested heavily in Arduino related books recently!
  22. Greetings fellow DCS fans! I thought I would share my progress on my personal cockpit build. I've been working on it for about a year. During this time I've acquired two CNC machines, many woodworking tools, and lots of Arduino Nanos! A special THANK YOU to the author and contributors of DCS-BIOS. Without your work, this would have not been possible. :thumbup: Also thanks to everyone who has posted on here giving me ideas and encouragement to continue. Below is my first CNC setup - this is a China made (~$500) machine purchased off ebay. For the money, this machine has served me very well. I use it exclusively for engraving on ABS plastic as it is jack-screw driven and more precise then my other machine (X-Carve). Below is my second machine - an X-Carve. It's a good machine, but I've struggled with engraving accuracy. I've also have burnt up several bits - need to learn about feeds and speeds!! :music_whistling: And here is my cockpit work in progress. And some work with the Arduino's + DCS-BIOS. CMSC panel. Buttons work. I didn't put volume or brightness knobs on it. My displays are hard set at one brightness anyway. This setup is using 4 Arduino Nanos. UHF display. CMSP right console display. This is a hard to find 20x2 OLED display. These are MUCH better than standard LCD character displays as they are bright, easy to read at all angles and you don't need to adjust a backlight. Next comes an enclosure with the switches, etc. My next challenge is getting servos to reflect analog gauge positions. This is an area I am very new to. I'm thinking of using 'hobby servos' for this...?? I also sourced some automotive panel servos that may just do the trick. I'll be playing with these as time permits. I hope I can get this part figured out as it is critical to the build. I hope to post more pictures as I progress. If anyone would like more information, DCS-BIOS example code or CNC plans (I use Aspire & V-Carve for design, Mach3 and bCNC for CNC machine control), I would be happy to share as this is what makes this community great!
×
×
  • Create New...