Cockpitbuilders.com

sign up .

April 08, 2020, 03:37:45 am

Login with username, password and session length
33 Guests, 0 Users
Members
Stats
  • Total Posts: 54485
  • Total Topics: 7276
  • Online Today: 32
  • Online Ever: 582
  • (January 22, 2020, 08:44:01 am)
Users Online
Users: 0
Guests: 33
Total: 33

COUNTDOWN TO WF2020


WORLDFLIGHT TEAM USA

Will Depart in...

Recent

Davtron MB800

Started by ame, February 23, 2020, 11:29:44 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ame

Anyone interested in a simulated Davtron MB800 (as found in King Air yoke)?

I just got this working:
https://www.aliexpress.com/item/32924015493.html

It would be very easy to drive it with the current simulator time, and show the three decimal points at the bottom for GMT, LT, and ET. And have two switches hooked up.

Andrew

Trevor Hale

Quote from: ame on February 23, 2020, 11:29:44 pmAnyone interested in a simulated Davtron MB800 (as found in King Air yoke)?

I just got this working:
https://www.aliexpress.com/item/32924015493.html

It would be very easy to drive it with the current simulator time, and show the three decimal points at the bottom for GMT, LT, and ET. And have two switches hooked up.

Andrew
I might be. Like to put something like that in my yoke one day
Trevor Hale

Owner
http://www.cockpitbuilders.com

Director of Operations
Worldflight Team USA
http://www.worldflightusa.com

VATSIM:

ame

Here's my draft outline for the panel. I don't know how accurate it is as I couldn't get a fully dimensioned drawing, however, it's as close as I can get for now.

The two countersunk mounting holes are in the right place, and the buttons are in the right place. The centre of the LCD module is in the right place and I have moved the four small screws from the original to new positions which match the mounting holes on the LCD PCB.

The LCD aperture is not as wide as the original, but it is about the same height. Note that this LCD does not have the UT, LT, and ET indicators on the left, but instead will use the decimal points to indicate GMT, LT, and ET on the bezel.

ame

Here's a picture of the first assembly. The panel is 3mm MDF cut by hand (we don't need no stinkin' CNC), and the decal is just printed paper.
IMG_20200226_151049_1582687453282.jpg
I have to move the LCD up by 1mm to stop the top edge of the buttons touching the bottom edge of the PCB.

To hold the buttons (not shown) I have designed a 3D-printed bracket that is attached to the lower fixing screws of the PCB.

Other items things to do:
Make a mask with black paper around the plate aperture, to stop the LED backlight shining through the decal.
Try a layer of yellow cellophane to make the LCD look like the original. I think it would be too hard to install an amber LED.
Finish the code for the LCD driver.

It looks quite smart!
IMG_20200226_153504.jpg

ame

Ok. Here's the (probably) final version.

I moved the aperture and surrounding text up by 1mm, and I modified the 3D-printed switch housing for the new dimensions. I also 3D-printed some switch caps, but I'll order some 'real' ones from China when AliExpress opens again.

I added two layers of yellow cellophane to the display, to give it an amber look, but in the photo it looks a bit green. I also glued a layer of black paper behind the decal to prevent light shining around the decal aperture.

I will post instructions on how to make one, and put the files on my GitLab later.

IMG_20200229_164158.jpg

n4208t


ame

Quote from: n4208t on February 29, 2020, 04:03:13 amNicely done!

Thanks.

It's sort of an experiment because I want to make an I2C slave device. In this case I can make a device with writable registers for the segment pattern of the display, and readable registers for the switch status.

So far, as you can see, I can write any pattern to the display. This morning I soldered some wires onto the buttons and started looking at I2C slave code.

Fundamentally you could interface to this module using almost any communication method. I have chosen I2C as I am convinced it is adequate for local data distribution within the confines of a cockpit.

Once that is going then I'll look at picking out some datarefs from XPlane to send to the module, then the clock can show simulator time instead of actual time.

ame

Ok. I've given up with making an Arduino I2C slave (connected to a Raspberry Pi). I have had to slow down the I2C bus, so other peripherals would have to slow down too, but it's still unreliable.

Instead, I shall look at bit-banging the LCD controller with an I2C GPIO expander (probably MCP23017) and do the smarts in a Python script. I have had no trouble driving these chips for other purposes (3D printed stepper motor gauge, for example). If I do that however it will be hard to do variable backlight brightness.

Anyway, the panel looks nice. The LCD looks nice. The button support is nice and solid (no PCB or protoboard needed). Even a failure yields some positive data. :)

Attached is a rear view of the panel, showing the LCD module and switch support. The Arduino is stuck on the back and fed with a 4-pin cable (power, ground, SCL, SDA).
MB800_rear.jpg

ame

I may have spoken too soon. Depending on the order in which I send requests to the Arduino to read its I2C registers I either get expected data or garbage data. If I do a simple read of 8 bytes I get 7 zeros and 0x85 (0x85 is my marker). If I try to read register 7 (which should contain the marker) I get 0xFF. If I then do my simple 8 byte read I get 4 bytes of fixed data and 4 bytes of variable garbage. If I reset the Arduino I get my 8 stable bytes again. Repeatably.

So, it's, er, working. After a fashion. I think I'll continue and see if I can get any further.

I want to make a device where I can set the four digits to any value (0-9), turn any decimal point and the colon on or off, set the backlight brightness percentage, and query the state of two buttons.

Everything else is gravy.

ame

Well, then. Gravy is next.

:)

It works!

I still get some odd results when I query the registers occasionally, but I get correct results when I write to the registers, and I can send a command that fixes the next register read.

So, Arduino cockpit instruments, hung off the I2C bus, with custom firmware- check!

ame

So, purists (and pedants, such as myself) are going to say "It doesn't have the four screws around the bezel", "It doesn't have the cable exit in the right place", "It doesn't have a buzzer".

Well, fret not. Version 2 (or is it 3?) has all of these things. In the front view you can see the classic four mounting holes. These have a practical use as they clamp the circuit box to the back. Eagle-eyed viewers will spot that those are hex-drive screws, not Phillips. Oh well.
MB800_v2_front.jpg
I've also replaced the 3.3V Arduino with a 5V Arduino, so I can hang it off a 5V I2C bus instead of having two buses at different voltages (5V and 3.3V). The LCD is a 3.3V device, which is why I used a 3.3V Arduino initially, so I do level shifting between the Arduino and the LCD instead of running everything at 3.3V.

And there is a buzzer. The original Davtron MB800 has an optional buzzer, so I do too.

You can see on the back the 3D-printed enclosure, with the 4-pin I2C connector where the real wire outlet would be. There is also a hole for accessing the reset button on the Arduino if necessary, a hole for the buzzer sound output, and a rectangular hole for an FTDI programming header.

I am using an Arduino Pro Mini for this, which does not have the one-board USB interface for programming.
MB800_v2_rear.jpg

ame

Well, good news. Packages from China are still appearing.

I had ordered some button caps and they arrived this morning. They are baby blue, not powder blue, but that's fine. They are shorter than the 3D printed ones I made and also sit a little bit lower on the button actuator, so I will have to make the button support taller.

I've also ordered some tiny cross-head screws for around the bezel, and they are in the country, so I will be able to install them and finish the look. Then I'll document everything and put it on Gitlab for anyone else to see.

Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate