Jump to content

WhoMadeWho

Members
  • Posts

    77
  • Joined

  • Last visited

Everything posted by WhoMadeWho

  1. Sure - I got it from Adafruit. Good selection of parts and decent service. Abit high on the prices compared with the direct from China stuff via ebay, but I like to support a USA business. For this display you'll need a PC video converter (VGA to Composite is what I'm doing). Link to display - https://www.adafruit.com/product/913 Link to converter - https://www.amazon.com/gp/product/B00BZA2U7K/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1
  2. Small update Hi all, Not sure what happened to all the images I posted previously in this thread. Looks like my image host is no longer serving up the images! Here's a small update - I just completed the RWR for my cockpit. Here's a few photos. The RWR gives a visual representation of radar emitters, detected missile launches, and laser illumination around your aircraft. 3.5 inch composite display in a custom CNC made case. CNC engraved target reticle using neon acrylic plastic. CNC engraving the faceplate.
  3. Awesome Warhog! Looking great!!!!
  4. Glad to see your post Ian. We understand life can get in the way sometimes. Looking forward to see whats next in DCS-BIOS!
  5. You'll want separate instances of hardware for running that many steppers.! I'm running 1 Arduino + h-bridge for each stepper. So for my engine panel, that's twelve (12) Arduinos and (12) h-bridges. Is there a better way? Probably with a more powerful Arduino + an externally powered motor driver. I've found separate instances work best for me.
  6. This is great Ian, thanks for posting. I've never heard of SolveSpace before. I'll be downloading it for sure. My China CNC machine is still serving me well after a about two years. I use bCNC as well, but connected to a Raspberry Pi 3 + Arduino based motor controller for my X-Carve CNC. Works very well and the price is right.
  7. Thanks Hans. I'll have a look at his code. I do recall this video - now that you posted it. :)
  8. Hello all, I'm trying to get the HSI Range to display correctly via DCS-BIOS outputting to a simple OLED display. The problem is DCS-BIOS is ranging the output from 0 to 65535. According to the DCS A10C manual, this gauge can display 0 to 9999. So... If I take the output value and divide by 6.5 I get an accurate count... For example, 8 miles will read 7,991.5384. BUT I want my display to show 008. Is there a solution to this? Does some rounding need to be done? I feel like I'm missing something very obvious here. :doh: The DCS-BIOS code snip in question is - void onHsiRcDChange(unsigned int newValue) { display.clearDisplay(); display.setFont(&digital_counter_717pt7b); display.setTextColor(WHITE); display.setCursor(0,28); [color="Red"]display.print(newValue / 6.5);[/color] display.display(); } DcsBios::IntegerBuffer hsiRcDBuffer(0x1060, 0xffff, 0, onHsiRcDChange);
  9. Very cool! I've had success using DisplayLink USB adapters driving small LCDs. I plan to use these for my MFDs when the time comes. http://www.displaylink.com/products/usb-adapters
  10. Stay away from Aliexpress. Everytime I'd tried to order something on their site I've had fake tracking numbers sent and non-delivery of items. I'd recommend https://www.digikey.com/ for all your switches. These guys have been around forever and provide great service.
  11. One quick thought - I noted problems with my setup if the prams were not matching what my motors were capable of - maybe try reducing maxSpeed/acceleration? struct StepperConfig stepperConfig = { 400, // maxSteps 100, // maxSpeed 100 // acceleration };
  12. I'm using an Arduino for each gauge. (Pictured below w/six hooked up). It's a wiring mess, but at least it works reliably.
  13. Very nice! Thanks for posting. Can you share the Arduino code you used for this?
  14. Updates Hello! I thought I'd post some updates as it's been awhile. I'm currently working on the left hand side of the cockpit. Below are my latest creations. All will run based off DCS-BIOS. IFF Panel. The Reply and Test indicators are the real thing. Picture taken with the LEDs connected and powered by an Arduino. The knobs on the Code and Master are... wait for it... guitar amplifier knobs painted black. The text on the knobs was cutout on sticky vinyl and carefully put onto the knobs. To make them stick better I took possession of my wife's clear nail polish and painted over the vinyl. This works well. SAS panel. I'm using a 10K pot for the yaw trim. Left fuel panel. 10K pot again on the knob. I'm still figuring out a solution for the RCVR knob. Not sure what I could use but hopefully I'd find something close to the real thing. Aux lighting panel. 10K pots for both of the knobs. Seat position. Not sure how I'll use this. Will also need to build a box around the panel. Hoping to create more panels soon. Wish I had more time! =WhoMadeWho=
  15. Same issue I'm looking for guidance as well for motors to use on my altimeter...
  16. I'll take any motivation I can get. Good stuff and thanks for sharing!
  17. Sure. I'm using Arduino 'Mini' boards. These are very cheap to obtain from China on eBay (like $3 a piece). You will need to solder the leads on the boards, but this is pretty easy to do if you have some soldering experience. Out of the ~50 Arduino mini boards I've purchased, I've only had ONE bad board. Pretty good. Link to eBay seller I've had good luck with http://www.ebay.com/itm/5Pcs-MINI-USB-CH340G-Nano-V3-0-16M-5V-ATmega328P-Micro-Controller-Board-Arduino-/361919929243?hash=item54441bdb9b I'm also using an Adafruit H-Bridge to drive the motors. Link to the H-bridge https://www.adafruit.com/product/2448 Here are a few photos of my hardware - hopefully you can see the wiring OK. This will work with the code I posted above. I hope this is helpful to you and others.
  18. I'm using many automotive stepper motors for my A-10C cockpit build. I've had very good luck with the VID29 / X.25.168 motors. These are/were commonly used in GM vehicles. They are available on ebay and also Amazon. Here's a link - https://www.amazon.com/dp/B00LQ9AQOY/_encoding=UTF8?coliid=I3GJY1C1ABFDFS&colid=25UHEBSM29ZLZ As for code - (not my own) I've had great luck using the below reference. Just use the DCS-BIOS documentation to find the correct hex value for the instrument you want to slave to the stepper motor. I agree more docs are needed and I believe this is in work. Folks on this forum have been a big resource for me. #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(0x10be, 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(); }
  19. Very nice start! What are you using for the CAD work? I have an 1000mm X-Carve and it works quite well after some initial tweaking.
  20. Check out this site http://www.airspayce.com/mikem/arduino/AccelStepper/index.html I'm using an older version - 1.23 2016/08/09 and it works fine with the below code - #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(0x10be, 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. Thats fantastic Ian. I'm really looking forward to see what you can do with an already great project. I have already purchased a USB PCI-E expansion card and several powered 13 port hubs with the expectation I'm going to use 30+ Mini Arduino's. Would be great if I could consolidate into the mega platform using an RS-485 bus.
  22. June update Hi folks, Just thought I'd post a few updates on my cockpit build. I've begun making the cockpit shell out of MDF and Pine. Things are going together well despite my CNC machine giving me some inaccurate cuts and also my CNC design software making decisions by itself on the difference between outside and inside cuts. (Note to self - close / join your vector drawings!) My goal is to make the cockpit shell somewhat modular so it can be moved around and also adjusted so 'larger' pilots can fit in the cockpit. :pilotfly: =WhoMadeWho=
  23. Thanks Kadda for the code. What brand / model are you using for a stepper?
×
×
  • Create New...