Jump to content

Recommended Posts

Posted

Finally....

 

An afternoon worth of tinkering with settings and number formats and finally ive got DCS to sync VHF AM/FM, UHF, TACAN and last but not least ILS at mission start.

 

As i plan to use LEDs only i dont need to worry about resetting dials.

Posted
Finally....

 

An afternoon worth of tinkering with settings and number formats and finally ive got DCS to sync VHF AM/FM, UHF, TACAN and last but not least ILS at mission start.

 

As i plan to use LEDs only i dont need to worry about resetting dials.

Nice work, if you are interested in interfacing with OLEDs let me know, much nicer than LCDs. and a little more flexible than LEDs

Posted (edited)

Might just be at that pete. Ive got a futaba VFD that just wont play ball. I got it working once which i think was some complete fluke.

 

I need displays for the CMSP and CMSC panels.

Edited by Devon Custard
Posted
Might just be at that pete. Ive got a futaba VFD that just wont play ball. I got it working once which i think was some complete fluke.

 

I need displays for the CMSP and CMSC panels.

Here's what I purchased, nice and compact, and the look good. There is a 16 and 20 character per line available.

 

IIC / I2C 2002 OLED Module Display For Arduino / PIC / AVR / ARM http://r.ebay.com/anOBP7

 

Getting them up and running was dead easy using I2C interface. You have a couple of choices use an Arduino per display or do a bit of work and have multiple displays off a single Arduino.

 

What I also like, is they are white, so you can change the colour by insert a piece of colored acrylic in front.

 

cheers

Peter

  • Like 1
Posted

 

IIC / I2C 2002 OLED Module Display For Arduino / PIC / AVR / ARM http://r.ebay.com/anOBP7

 

 

That is a nice display. Added to my watch list :smilewink: Thanks

 

DC when you are going for more 7-segments, then this might be interesting: http://embedded-lab.com/blog/?p=6862

At least when I get further down the road I think I will be going for this MAX7219 chip at it looks like a neat solution.

 

Cheers

Hans

MAX7219

  • 4 weeks later...
Posted

My work on this has stalled due to gremlins in the system :joystick:

 

gremlins.png

 

Hope to resume soon as was so close to getting it going

  • 2 months later...
Posted
Here's what I purchased, nice and compact, and the look good. There is a 16 and 20 character per line available.

 

IIC / I2C 2002 OLED Module Display For Arduino / PIC / AVR / ARM http://r.ebay.com/anOBP7

 

Getting them up and running was dead easy using I2C interface. You have a couple of choices use an Arduino per display or do a bit of work and have multiple displays off a single Arduino.

 

What I also like, is they are white, so you can change the colour by insert a piece of colored acrylic in front.

 

cheers

Peter

 

I'm planning to build an autopilot panel for my Dad, based on this Saitek design

http://www.saitek.com/uk/prod/multi.html

 

Whilst looking for suitable parts, I became aware of the advantage of using I2C and only 2-wires rather than 8-9 and I bought this blue LCD to experiment with:

http://www.ebay.co.uk/itm/161200022257?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

 

However, I suspect it won't be bright or big enough to be easily read, compared to the display used in the Saitek, so perhaps a white OLED like this would be better. I'm not sure it's wide enough though (the Saitek looks like 2 lines of 9 characters):

http://www.ebay.co.uk/itm/0-96-I2C-IIC-SPI-Serial-128X64-OLED-LCD-LED-Display-Module-for-Arduino-white-DE-/251499783216?pt=UK_Computing_Other_Computing_Networking&hash=item3a8e8e2430

 

So I'd be grateful for any advice or links to suitable components. I'm not opposed to using 18 7-segment LEDs (2 rows of 9) if that would be better, as long as it can be run using I2C, otherwise I might need to use a second Mega 2560, which is a possibility.

 

I also need to drive a radio panel like this http://www.saitek.com/uk/prod/radio.html although I might only have one set of Active/Standby (i.e. the top half of the Saitek). So I'd also appreciate any advice on running multiple devices over I2C, what the limit is and so on.

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Posted
I'm planning to build an autopilot panel for my Dad, based on this Saitek design

http://www.saitek.com/uk/prod/multi.html

 

Whilst looking for suitable parts, I became aware of the advantage of using I2C and only 2-wires rather than 8-9 and I bought this blue LCD to experiment with:

http://www.ebay.co.uk/itm/161200022257?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

 

However, I suspect it won't be bright or big enough to be easily read, compared to the display used in the Saitek, so perhaps a white OLED like this would be better. I'm not sure it's wide enough though (the Saitek looks like 2 lines of 9 characters):

http://www.ebay.co.uk/itm/0-96-I2C-IIC-SPI-Serial-128X64-OLED-LCD-LED-Display-Module-for-Arduino-white-DE-/251499783216?pt=UK_Computing_Other_Computing_Networking&hash=item3a8e8e2430

 

So I'd be grateful for any advice or links to suitable components. I'm not opposed to using 18 7-segment LEDs (2 rows of 9) if that would be better, as long as it can be run using I2C, otherwise I might need to use a second Mega 2560, which is a possibility.

 

I also need to drive a radio panel like this http://www.saitek.com/uk/prod/radio.html although I might only have one set of Active/Standby (i.e. the top half of the Saitek). So I'd also appreciate any advice on running multiple devices over I2C, what the limit is and so on.

 

I've got a good bunch of 'stuff' hanging off the PC in my pit, so I wanted to minimise the number of additional devices, that lead me to adding an AND gate to the Arduino. The reason for that is the OLEDs have the same target address, so something is needed to differentiate between them, If you haven't got lots of devices then I'd suggest one device per Arduino for starters. If you are really keen here's the basis of the 'mux' I used, it currently drives six OLEDs in the pit.

 

I'd recommend only purchasing the displays from someone who provides a sample sketch, just so you have something to play with.

 

cheers

 

Peter

Mux_v4a.thumb.jpg.39393c9db58f9ab3237bde7e9c62b8b0.jpg

Posted
I've got a good bunch of 'stuff' hanging off the PC in my pit, so I wanted to minimise the number of additional devices, that lead me to adding an AND gate to the Arduino. The reason for that is the OLEDs have the same target address, so something is needed to differentiate between them, If you haven't got lots of devices then I'd suggest one device per Arduino for starters. If you are really keen here's the basis of the 'mux' I used, it currently drives six OLEDs in the pit.

 

I'd recommend only purchasing the displays from someone who provides a sample sketch, just so you have something to play with.

 

cheers

 

Peter

 

Thanks Peter. I'm a bit confused that your diagram shows D2-D8 on the left side. I assume that can't be referring to digital pins on the Arduino as this is an I2C circuit and so only uses SDA and SCL?

 

Is it possible to still chain Arduinos using SDA and SCL whilst also using them to drive multiple displays like this? Would the slave Arduino need to have a 'channel' added to the mux to give it a distinctive address as well or would it bypass the mux?

 

I'm not sure why I need the supplier to provide a sample sketch, as the code to drive the display is all much the same isn't it (for the same display type at least) and I'm sure there's plenty of examples floating around. I can understand I'd need specific code if using a mux like yours but I don't imagine anyone I buy a display from is likely to be able to help with that.

 

I was planning to build a panel the width of the monitor but I'm thinking I might divide it into two parts now, with the engine/power switches in one box and the radio, autopilot, transponder in another. Then, if I get into difficulty with the displays, at least I'll have the other box to give to my Dad for his birthday. It also has the advantage that he could put each box either side of the main monitor and put a second monitor between the two boxes to display instruments.

 

Even if I only use one Arduino, it will be fairly simple to link the two boxes as the displays will only need SDA/SCL from the first box to the second (into a mux as per your design in the latter) and I can probably run most of the controls (encoders, momentary buttons, rotary switches) to a few analog inputs to minimise the cabling, so it will probably fit on a 9-pin Dsub.

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

  • 2 weeks later...
Posted
I've got a good bunch of 'stuff' hanging off the PC in my pit, so I wanted to minimise the number of additional devices, that lead me to adding an AND gate to the Arduino. The reason for that is the OLEDs have the same target address, so something is needed to differentiate between them, If you haven't got lots of devices then I'd suggest one device per Arduino for starters. If you are really keen here's the basis of the 'mux' I used, it currently drives six OLEDs in the pit.

 

@Peter,

 

I wonder if you could tell me what components I should use for this AND gate, for the Ux,x and D parts. I'd like to get this built so that it's ready for when I come to hook up the OLEDs. If you don't mind sharing your Arduino code that drives the OLEDs via the gate, that would be really great too.

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Posted
@Peter,

 

I wonder if you could tell me what components I should use for this AND gate, for the Ux,x and D parts. I'd like to get this built so that it's ready for when I come to hook up the OLEDs. If you don't mind sharing your Arduino code that drives the OLEDs via the gate, that would be really great too.

 

sure - here's the source code

https://code.google.com/p/bne-arduino-multi-oled-receiver/

The Arduino code sits under Arduino sender. The AND gate I pretty sure was a 4081.

 

Answering a couple of earlier questions, I'm just using a single Arduino, there nothing stopping using multiple which will simply the code.

 

cheers

 

Peter

  • Like 1
Posted
sure - here's the source code

https://code.google.com/p/bne-arduino-multi-oled-receiver/

The Arduino code sits under Arduino sender. The AND gate I pretty sure was a 4081.

 

Answering a couple of earlier questions, I'm just using a single Arduino, there nothing stopping using multiple which will simply the code.

 

cheers

 

Peter

 

That's great Peter, much appreciated :thumbup:

 

I looked up the 4081 and I can see I misunderstood the diagram to show individual components at the Ux,x parts, when in fact they're just pins on the 4081 (or whatever other AND gate chip) and what I thought were diodes are in fact LEDs. So I think I know what I need to get to build this now, thanks.

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Posted
That's great Peter, much appreciated :thumbup:

 

I looked up the 4081 and I can see I misunderstood the diagram to show individual components at the Ux,x parts, when in fact they're just pins on the 4081 (or whatever other AND gate chip) and what I thought were diodes are in fact LEDs. So I think I know what I need to get to build this now, thanks.

Yes siree, the LEDs are not needed, but are certainly useful for troubleshooting.

 

Cheers

 

Peter

Posted

I've seen this http://www.ebay.co.uk/itm/321321910472?_trksid=p2055119.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT and was wondering if it's something that can be driven via the I2C bus (through the AND gate circuit) or not, as it seems to use three data pins and none are labelled SDA or SCL?

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Posted

Updated tutorial on the hog wiki. That one works. Ive posted links to my github so you can download it directly from there.

 

I also include the arduino LED circuit to test the master caution lamp with accompanying sketch and a testharness so you can test it without running DCS.

 

Enjoy.

 

http://deadfrogstudios.com/warthogpit/index.php?title=Connecting_DCS_to_Arduino

 

Oh the images need a little tidying up, please excuse :)

Posted
Looks like a MAX7219 with 7 seggies glued on top. Drive it direct from a duino or anything that will drive data and a clock source.

 

Sorry, I'm too dumb to understand that ;) Does that mean it can be driven via the I2C Bus (using just SDA and SCL, via an AND gate to drive multiple displays)?

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Posted

Ask Pete, i dont know I2C, i do know however that you can drive it from Arduino. I doubt you should have any problems with I2C however, its just a driver chip.

 

With most things its just a case a case of research (google) and trial and error. I picked up my first arduino in January, im not an expert by any stretch of the imagination but i can design a shift register circuit to drive LEDs now. Dont be put off by what you dont know, just start learning....

Posted
Ask Pete, i dont know I2C, i do know however that you can drive it from Arduino. I doubt you should have any problems with I2C however, its just a driver chip.

 

With most things its just a case a case of research (google) and trial and error. I picked up my first arduino in January, im not an expert by any stretch of the imagination but i can design a shift register circuit to drive LEDs now. Dont be put off by what you dont know, just start learning....

 

OK. So I guess you're saying I could drive it by using three digital pins as outputs to the DIN, CS and CLK pins? I don't think that's going to be good for me though, as I need to drive multiple displays and don't want to use up loads of digital pins, hence why I want to use the SDA/SCL I2C bus with an AND gate. Maybe I could use an AND gate with just three digital pins to do the same thing though?

 

I don't really see how I could drive it from the two I2C pins when it requires three input lines. I had a look at the datasheet but couldn't see anything that suggested that it would be possible. If I can't use an AND gate with the three digital pins though, I guess I can just buy the LED segments separately and build the circuitry to drive them via I2C myself. I just saw these and thought it would be a nice way to save myself a bit of work and have something all ready to screw into the panel. :)

 

Pete, if I'm wrong and can drive these via the I2C bus, please jump in.

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Posted

Hi, I2C is a multi drop bus, just 2 lines are used to connect to multiple devices, works like a lan. SPI is a little different with data in, data out, clock and chip select lines, you do not have to use both data lines if you only want to transmit or receive. You can connect the data out and clock lines to multiple devices on a shared bus (like !2C), and drive multiple devices with those two lines and then maybe use something like a 3 to 8 address decoder, 3 lines in which select one of 8 lines out, which would connect to the slave devices chip select pin, so you could drive eight slave devices from 5 pins of your micro controller, each one selectable. One thing you have to take note of though is that both I2C and SPI use pullups on their lines, this is something like a 10K resistor connected to the line from the power rail, with arduino that would be 5 volts I think, (I dont use arduino so you need to check) and both devices should be running at the same voltage level. I have used the MAX 7219 before so have some 'C' code to drive it, it is not difficult, the code may be compatible with arduino as I think its 'C' based, but again you would need to check.

Posted
OK. So I guess you're saying I could drive it by using three digital pins as outputs to the DIN, CS and CLK pins? I don't think that's going to be good for me though, as I need to drive multiple displays and don't want to use up loads of digital pins, hence why I want to use the SDA/SCL I2C bus with an AND gate. Maybe I could use an AND gate with just three digital pins to do the same thing though?

 

I don't really see how I could drive it from the two I2C pins when it requires three input lines. I had a look at the datasheet but couldn't see anything that suggested that it would be possible. If I can't use an AND gate with the three digital pins though, I guess I can just buy the LED segments separately and build the circuitry to drive them via I2C myself. I just saw these and thought it would be a nice way to save myself a bit of work and have something all ready to screw into the panel. :)

 

Pete, if I'm wrong and can drive these via the I2C bus, please jump in.

My approach my be a little brute force, I've added the AND gates so I can have multiple I2C devices that have a common address on the same bus. If you all if the devices have different addresses no AND gates are needed. Looks like I need to do a little read ingredients on the 3 to 8 address decoders.

 

Cheers

 

Peter

Posted (edited)

Check out the 74xx138/238. You could still possibly use multiple slaves with the same address, they would all have to send their acknowledgements together, not sure if that would cause a problem, if using an arduino then it could be a problem as you would be using their library code and you would most probably want to alter the interrupt service routine. As the bus is pulled high, are you going to be able to use logic gates.

 

EDIT: Was thinking a little last night, (it hurts, this thinking lark) and as long as your slaves are not responding to write requests, only reading data from the master then you should be ok to use the same address for

multiple slaves, may want to enable clock stretching though.

Edited by cefs
  • Recently Browsing   0 members

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