Jump to content

Recommended Posts

Posted

Hi,

Second attempt after the Batteries gauge, went a lot faster with this one, No1sonuk and Vince_Vega have been of great help with my poor coding skills and knowledge on microcontroller as ESP32.

 

Thanks guys !

 

Lot2Learn

  • Like 2
  • Thanks 1
Posted
15 minutes ago, Vinc_Vega said:

Looks great!

Did you use the Bodmer's TFT_eSPI library?

Regards, Vinc

Yes I did, I've learned a lot over the past two months. I'm going next on the Hydraulic pressure one and when I feel strong enough I'll go for the one that scares me ''the Attitude Indicator'' you've been great inspiration with the one you posted on Vimeo thanks

  • Thanks 1
Posted
On 4/1/2023 at 11:45 AM, No1sonuk said:

Nice. But wouldn't it have been easier (and cheaper) to use a servo?

Thanks No1sonuk, you've been great help. I've previously made an IAS with a stepper x27  and if I consider the stepper, driver, hall effect I had to use I would say the price comes close one to another.

But foremost I'm quite impressed by the quality of graphic on Oled/Lcd, and find it gets me more in line with what I see on screen with the game.   I must be masochist... in a way I had fun searching, reading and learn with these screens. The Battery gauge took me overall 1.5 to 2 months to figure out, the brake pressure I got it within a week, and for the past two days I've bee working on the radar Altimeter, which has a lot more going on and I should be able to finish in a day or two.

I for myself find it easier to work with (easier) than steppers, I didn't do much with  servos but I assume it should be similar to stepper.

Posted
8 hours ago, Lot2Learn said:

Thanks No1sonuk, you've been great help. I've previously made an IAS with a stepper x27  and if I consider the stepper, driver, hall effect I had to use I would say the price comes close one to another.

<snip>

I for myself find it easier to work with (easier) than steppers, I didn't do much with  servos but I assume it should be similar to stepper.

Servo is MUCH easier.

One wire from the Arduino plus 5V power.

The servo has a motor, drive electronics and feedback built in.

All you need to do is put the end limit times in the code line and you're done.

I'll make a demo this evening.

Posted (edited)

Yesssss, servos or X27 type steppers are easy to use with simple gauges. You may use a Nano per instrument, connected to the DcsBios RS485 bus to save USB ports. You even need no driver boards for the little steppers and cheap servos.

Round colour TFTs look better for  complex gauges like the digital clock or the G-Meter (3 pointers). I even made an ESP32 driven StbyASI display.

Unfortunately I didn't manage to connect any ESP32 to the DcsBios RS485 bus yet. So every dev board blocks an USB port for now.

Regards, Vinc

Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Posted (edited)
On 4/1/2023 at 2:11 PM, Lot2Learn said:

Yes I did, I've learned a lot over the past two months. I'm going next on the Hydraulic pressure one and when I feel strong enough I'll go for the one that scares me ''the Attitude Indicator'' you've been great inspiration with the one you posted on Vimeo thanks

As the ADI needs a wider display (e.g 1080 by 1080 px) an ESP32 definitively will not have sufficient memory to make it.

That's the reason at the time I'm experimenting with Raspberry PI and learning Python. You probably saw the first test shot for the 800x800 graphics of the HSI at Vimeo.

https://vimeo.com/VID_20230314_113217.mp4

Regards, Vinc

Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Posted
On 4/5/2023 at 5:04 PM, Vinc_Vega said:

As the ADI needs a wider display (e.g 1080 by 1080 px) an ESP32 definitively will not have sufficient memory to make it.

That's the reason at the time I'm experimenting with Raspberry PI and learning Python. You probably saw the first test shot for the 800x800 graphics of the HSI at Vimeo.

https://vimeo.com/VID_20230314_113217.mp4

Regards, Vinc

 

Wow that's a nice screen, great work looks fantastic.  I'll have to search a little more in the next few days, I'm on the FA18 Radar Altimeter right now with the same small 1.28" waveshare but will need to make one a little bigger like around 2.5". 

Posted
On 4/5/2023 at 5:14 AM, No1sonuk said:

Servo is MUCH easier.

One wire from the Arduino plus 5V power.

The servo has a motor, drive electronics and feedback built in.

All you need to do is put the end limit times in the code line and you're done.

I'll make a demo this evening.

No1sonuk did you make the demo of the servo, I bought a few but didn't went far with it, and like said on my previous post I thought x27 where pretty hard to understand and code.  

Posted
On 4/4/2023 at 9:09 PM, markom said:

Do you mind sharing which screens are you using?

The completely round one is a Waveshare 1.28 LCD with GC09A01 driver, the one with a square circuit board was bought on Amazon same driver

Posted
15 hours ago, Lot2Learn said:

No1sonuk did you make the demo of the servo, I bought a few but didn't went far with it, and like said on my previous post I thought x27 where pretty hard to understand and code.  

Something came up.  I'll do it this weekend.

  • 2 weeks later...
Posted (edited)

So maybe it slipped again... 🤪

BUT, here it is:
First I built a gauge mechanism that can travel greater than the normal 180 degree limit of the servos I used.  To do this, the needle is attached to a gear with 9 teeth, and the servo horn sits in a "socket" on a gear with 24 teeth.  This gives a ratio of approximately 1:2.66.

bridging2.jpgSG51 full 2.66_1 gauge mechanism v11.png

Next, I used my Servo Gauge Calibration Tool to determine the us times for the 0 and full travel points to put in the servo code line:
servo_gauge_test1.png

So 0 RPM is 810us and full travel (4500 rpm) is 2090us.  You can find these by trial and error, but I find the tool I made easier.

For details of the tool I made, see my thread here:
https://forum.dcs.world/topic/272571-servo-gauge-calibrator/

This is the code for the gauge.  I used the P-51 RPM gauge as it's a module everyone has access to:

 

/*
  Tell DCS-BIOS to use a serial connection and use interrupt-driven
  communication. The main program will be interrupted to prioritize
  processing incoming data.
  
  This should work on any Arduino that has an ATMega328 controller
  (Uno, Pro Mini, many others).
 */
#define DCSBIOS_IRQ_SERIAL

#include "DcsBios.h"

/* paste code snippets from the reference documentation here */

//P-51 RPM gauge servo code line:
DcsBios::ServoOutput engineRpm(0x5072, 3, 810, 2090);  // Pin 3 is a PWM pin on the Uno I used for this demo

void setup() {
  DcsBios::setup();
}

void loop() {
  DcsBios::loop();
}

And here it is working:


The main limitation of this teechnique is that it cannot be used on gauges that require continuous rotation, such as altimeters, etc.
Some people don't like the noise or jitter, but the simplicity fo the coding probably makes up for that.

You can also combine two servos in one gauge if they need less than 180 degree travel:

mruNcfL.jpgvxtLg0I.jpg

Edited by No1sonuk
  • Like 2
Posted

Thank You very much for the explanation here No1sonuk, I will definitely give it a try...Another thing to learn I'll never get over it lol.

I can't wait to be retired form work in 3 years, I need to spend more time on my many projects...People here on this forum are all really nice and helpful. I'm very impressed by the time everyone is taking to help each others.

Thanks again !

 

Lot2Learn

Posted
4 hours ago, Lot2Learn said:

I can't wait to be retired form work in 3 years, I need to spend more time on my many projects...

Be careful that you don't do it to the detriment of your relationships.  It HAS been a risk for at least one member here.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...