Posts

Showing posts from January, 2024

Standby Compass: StepperTest

Image
Yesterday I finally received the EasyDriver stepper driver and the X27-168 steppers(no more AliExpress orders if I can help it - took weeks to arrive).   I opened up the motor and removed the tiny plastic tab that was keeping it from spinning 360.  I soldered headers on one of the EasyDrivers for prototyping and soldered some solid core wire to the little leads on the motor.   After wiring it all up on the breadboard I used this code to see it run. For the connections: you need to put one coil's wire pair on the A pins for the EasyDriver and the other coil's on the B pins.  There is no polarity so the A coil wires can go on plus or minus.  I put the 12v power on the M+ and GND pin pair.  Then these as well: // EasyDriver -> Nano stp -> 2 dir -> 3 MS1 -> 4 MS2 -> 5 EN   -> 6 GND (by step pin) -> GND Do not connect/disconnect the motor when power is applied . Power is constantly flowing to keep motor still and changing connection when powered will kill

More Standby Compass work

Image
 Did the filling, sanding and painting of the box today.   Got the computer power supply breakout board working and tested it by powering 50 green LEDs with 12v.  These LEDs have a resistor built-in so I ran them all in parallel.  They pulled about 13 mA at steady state, which is well under the typical 20 mA limit.  They were super bright. Played with an Arduino sim here - using wrong driver board - to try to think though the wiring.

Servo responding the fuel gauge changes in DCS

Got a servo SG90 working, just powered off arduino since only running one - just needs one digital pin.  Seems to do just fine! //============ #include <Servo.h> #define DCSBIOS_DEFAULT_SERIAL #include "DcsBios.h" DcsBios::ServoOutput fuelQtyL(0x10ca, 8, 544, 2400); void setup() {   DcsBios::setup(); } void loop() {   DcsBios::loop(); }

Standby Compass - first steps

Started on a standby compass today.  Printed out the parts from TWP (Warthog Proj) and ordered electronics he mentioned in the video.  Did the same finishing of the 3d prints as he did - started the sanding.   Mounted the electric dewalt sander in the big vice upside down to act as a bench sander.  Sanded and rinsed them in water to remove the dust.  Will use spray filler and then paint to get them looking better. Used some of the black M3 screws to mount some of the parts.   Learned a bit about backlighting, TWP has some good info on that.   Ordered computer PSU breakout boards to get to power coming off that.  Also ordered 2 PWM LED dimmers to connect to that breakout.   3d prints: I like the organic/tree supports, but make sure you orient the part such that the top of the tree is minimal cross section.  If the tree ends up "spreading out" at the top it is near impossible to break loose - you want a minimal connection at the top where it supports the print.  Flexing them w

LCD, Potentiometer, LED, Rotary Encoder all working with DCS-BIOS

Image
 Learned a lot today trying to get a pot going:  DO NOT have Serial.begin() in the hardware code as that seems to disrupt the DCS BIOS comms DO NOT have a delay in the loop func - DCS BIOS can't do its thing When you run multiple-com-ports.cmd watch for errors - if you have the IDE connected to the device the script will fail to connect since it is tied up - it will errors with a message about the device (but the com number will be 1 lowered that what you put in the script itself, must be zero-indexed) Wire switches from GROUND to a digital pin, not from +5v YOU CAN stop the bios cmd, deploy new code via IDE, and then restart BIOS while the game is running, so that is helpful The BORT tool is called ...setup.exe - that is the binary itself, not a setup program BORT does not appear to update all its values shown on-demand, seems to not be 2-way comms with BIOS - though SOME vals do work 2-way The rotary encoder I was using would occasionally skip input or put out a double input. 

Heated Inserts for 3D print screws

Image
 Worked on inserting magnets and heat inserts for screws today (into 3D prints, for better strength). I paused the print for the magnet insert and let them have 2 layers printed on top after. The Prusa XL needed help clearing the nozzle upon resume, it did not do that itself. I sized the hole purely based on the magnet size and that was fine.  The magnets were fairly weak with the 2 layers on top so plan accordingly in the future. For the brass heat inserts: they worked with the dimensions I measured off the inserts - however, I needed to countersink the insert holes (made a surround that was 1 mm more in DIAMETER, 1 mm deep - should have used 2mm for both those offsets).  However the extra plastic that came out the top was easy to sand away.  Some sort of drill press setup for the soldering iron would have helped them go in perfectly straight. I used my older soldering iron ( basic Weller ) with new tips that are sized for different heat insert sizes.   Bought a very nice Hakko sold

First time trying DCS-BIOS to talk to DCS sim

Used the warthog proj video to learn how to use DCS-BIOS to control the switches.  Worked on the first try! Found the Arduino com port in Device Manager under "Ports..."  Updated the "C:\Users\vecto\Saved Games\dcs-bios-master\Programs" file multiple-com-ports (to update the com ports for my Arduinos) and then let it run - the first time it unzipped socat for me, and then I re-ran the cmd to make sure it worked.  The cmd window did not have clear messages but it was working Used Bort as well, from the same org in github (not the other fork) Don't download the code, find the latest exe in there to grab It needs to know where the json dir is within DCSBios - I had that in Saved Games so pointed it there https://www.youtube.com/watch?v=LsAnP6H9BMU used the dcs-bios and arduino lib from that same shunkworks org - did not use FlightPanels thing Based on warthog's notes, I plan to use joystick style coding for all dumb switches so they can work in other apps and