Jump to content

[opensource] A-10c EMI gauge with arduino and PCB KiCad file...


overpro
 Share

Recommended Posts

Some people might have the interesting to implement their own EMI gauges, I did one in last year, I'm glad to share the source code and the PCB design.

This is the demo thread: http://forums.eagle.ru/showthread.php?t=115997

First of the first, I'm just a web developer, and have very limited experience on MCU, PCB deisgn, so my work is not beautiful, don't argue me on that :joystick:

 

License: The MIT License (MIT)

 

export.lua:

function LuaExportStart()
udpEMI = socket.udp()
   udpEMI:setpeername( "192.168.1.105", 13135)   //change the IP and port according to your env
   udpEMI:settimeout(0)

end


function LuaExportActivityNextEvent(t)
--get the value of each EMI gauge and multiply a number,
--the result is the required stepper motor's position, the driver IC is VID6606 
--and stepper motor is VID29xx it's one step equals 1/12 degree if driven by VID6606, 
--for example, apu_temp gauge, it's maximum degree is 3120 / 12 = 260 degree. 
--the factor 3120 is just a estimated number, looking at the EMI gauge panel 
--it seems that the APU_TEMP 's pointer range is [0, 260] degree

   local mainPanel = GetDevice(0)

       udpEMI:send( string.format([[%c %.0f %.0f %.0f %.0f %.0f %.0f %.0f %.0f %.0f %.0f %.0f %.0f]],
           1,
           mainPanel:get_argument_value(14) * 3120 ,    --apu_temp
           mainPanel:get_argument_value(13) * 2880 ,    --apu_rpm

           mainPanel:get_argument_value(83) * 3240 ,    --engOilPressureRight
           mainPanel:get_argument_value(82) * 3240,    --engOilPressureLeft

           mainPanel:get_argument_value(85) * 3600,    --engFuelFlowRight
           mainPanel:get_argument_value(84) * 3600,    --engFuelFlowLeft

           mainPanel:get_argument_value(80) * 3240,    --engCoreSpeedRight
           mainPanel:get_argument_value(78) * 3240,    --engCoreSpeedLeft

           mainPanel:get_argument_value(77) * 3780 ,    --engFSIRight
           mainPanel:get_argument_value(76) * 3780 ,    --engFSILeft

           mainPanel:get_argument_value(73) * 3120,    --engITTTenthRight
           mainPanel:get_argument_value(70) * 3120        --engITTTenthLeft
       )) 

arduino code is available on my github repo:

https://github.com/calltherain/Arduino_DCSW_A10C_EMI

 

detailed spec of VID6606 and VID29xx stepper motor:

http://www.vidmotion.com/product.aspx?sortid=24

http://www.vidmotion.com/product.aspx?sortid=22

 

 

The PCB Schema and Boards files are here , It's KiCAD files:

https://github.com/calltherain/VID6606_595

 

ps: I really love KiCAD, it's easy to learn and good enough, I'm using the binaries compiled by myself, you can download the source code and build it from here:

https://launchpad.net/kicad-winbuilder


Edited by overpro
  • Like 1

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Link to comment
Share on other sites

A quick question - how do you work out the zero position of the gauge? I see some of the gauges offered support a zero sense.

 

this stepper motor is tailored for gauge and has an internal block to limit the pointer to [0,315] degree, so no need to sense the zero position, just do a full range move is okay

 

void GotoZero()                                {                                   
    for( int i = 0; i < 315 * 12; i++)                                    {                                        
       sendCmdTo595_1( B00000000 );                                        
       sendCmdTo595_2( B00000000 );                                        
       sendCmdTo595_3( B00000000 );                                 
                                      
       sendCmdTo595_1( B01010101 );                                        
       sendCmdTo595_2( B01010101 );                                        
       sendCmdTo595_3( B01010101 );                                 
                                      delayMicroseconds(180);
    }                                
}

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Link to comment
Share on other sites

I did a quick search on the net but I cannot find anyone selling the driver chip 6606. The company that makes them does not list any suppliers and I don't think they would sell half a dozen of those chips to a lowly little cockpit builder.

 

Do you have a contact that we can buy from ?

 

The stepper motors, however, can be found on eBay.

Regards

John W

aka WarHog.

 

My Cockpit Build Pictures...



John Wall

 

My Arduino Sketches ... https://drive.google.com/drive/folders/1-Dc0Wd9C5l3uY-cPj1iQD3iAEHY6EuHg?usp=sharing

 

 

WIN 10 Pro, i8-8700k @ 5.0ghz, ASUS Maximus x Code, 16GB Corsair Dominator Platinum Ram,



AIO Water Cooler, M.2 512GB NVMe,

500gb SSD, EVGA GTX 1080 ti (11gb), Sony 65” 4K Display

VPC MongoosT-50, TM Warthog Throttle, TRK IR 5.0, Slaw Viper Pedals

Link to comment
Share on other sites

I did a quick search on the net but I cannot find anyone selling the driver chip 6606. The company that makes them does not list any suppliers and I don't think they would sell half a dozen of those chips to a lowly little cockpit builder.

 

Do you have a contact that we can buy from ?

 

The stepper motors, however, can be found on eBay.

Not that I've been researching..... ;)

http://www.aliexpress.com/store/product/Car-instrument-stepper-motor-driver-chip-general-vid6606-um12017/1046577_1573038281.html

Link to comment
Share on other sites

this stepper motor is tailored for gauge and has an internal block to limit the pointer to [0,315] degree, so no need to sense the zero position, just do a full range move is okay

 

void GotoZero()                                {                                   
    for( int i = 0; i < 315 * 12; i++)                                    {                                        
       sendCmdTo595_1( B00000000 );                                        
       sendCmdTo595_2( B00000000 );                                        
       sendCmdTo595_3( B00000000 );                                 
                                      
       sendCmdTo595_1( B01010101 );                                        
       sendCmdTo595_2( B01010101 );                                        
       sendCmdTo595_3( B01010101 );                                 
                                      delayMicroseconds(180);
    }                                
}

 

Thanks Overpro, just so I've got it right, you can basically tell the gauge move -315 degrees irrespective of current position, and it'll stop nicely against the hard stop without any damage?

Link to comment
Share on other sites

Thanks Overpro, just so I've got it right, you can basically tell the gauge move -315 degrees irrespective of current position, and it'll stop nicely against the hard stop without any damage?

That's correct, I attached some pics of this motor, there is an internal block to make it hard stop. Because it's designed for gauges so the torque is small and will not make any damage.

 

And if you cut one or both of the blocks and polish it carefully the gauge pointer can go 360 degree full motion but in that case you might need to add some photoreflectors to detect the zero position.

attachment.php?attachmentid=105338&stc=1&d=1412229213

 

a pair (Black and White ) of internal blocks:

attachment.php?attachmentid=105339&stc=1&d=1412229213

 

attachment.php?attachmentid=105340&stc=1&d=1412229213

IMG_20141002_132950_marked.jpg.2e41c885cf3ee8f6309987fd8b4f8c27.jpg

IMG_20141002_133350_marked.jpg.58f469da47b8f52590fa423cac309e45.jpg

IMG_20141002_133528_marked.thumb.jpg.300cbbb8d596dca90beb784077dddb48.jpg

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Link to comment
Share on other sites

Hi Overpro

 

Did you get your PCB manufactured? If so can we order the PCB from the manufacturer, my thoughts are if the silkscreen etc have already been done, might as well not reinvent the wheel.

 

Cheers

 

Peter

 

Not really, I just made one PCB by myself, it's ugly :(,

but you might want to try my shared my PCB designs on first post, it's KiCAD files. You can use KiCAD to export the PCB to Gerber files and send them to a PCB manufactures to build some sample boards.

 

And another question, any specific Ethernet shield that has been better than others?

 

cheers

 

Peter

Oh ... I didn't noticed that there are more then one models available,

Just checked my shield and the chip model is WIZnet W5100.

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Link to comment
Share on other sites

@ bnepethomas are you looking to build a replica engine cluster?

Hi Deadman - not quite the cluster, I've got the Simmeters stack which I'm happy with, but do need a couple of others like AOA, and I also noticed on the stepper motor site, one of the motors has a zero position sensor for vehicle clocks. Ever since building the F16 I've wanted a clock with hands that follows the sim time, so this could be the perfect storm.

 

Also have some quasi-evil thoughts about doing an F18 pit when that is released by DCS.

 

Having something that is open-source project helps protect me against another manufacturer going wheels-up.

 

Cheers

 

Peter

Link to comment
Share on other sites

That's correct, I attached some pics of this motor, there is an internal block to make it hard stop. Because it's designed for gauges so the torque is small and will not make any damage.

 

And if you cut one or both of the blocks and polish it carefully the gauge pointer can go 360 degree full motion but in that case you might need to add some photoreflectors to detect the zero position.

attachment.php?attachmentid=105338&stc=1&d=1412229213

 

a pair (Black and White ) of internal blocks:

attachment.php?attachmentid=105339&stc=1&d=1412229213

 

attachment.php?attachmentid=105340&stc=1&d=1412229213

 

Thanks hugely for this overpro, your sharing this is awesome.

 

cheers

 

Peter

Link to comment
Share on other sites

Not really, I just made one PCB by myself, it's ugly :(,

but you might want to try my shared my PCB designs on first post, it's KiCAD files. You can use KiCAD to export the PCB to Gerber files and send them to a PCB manufactures to build some sample boards.

 

 

Oh ... I didn't noticed that there are more then one models available,

Just checked my shield and the chip model is WIZnet W5100.

 

And thanks for this, I like the UDP idea over serial, it frames the data and offers higher throughput, time to take the leap.

 

On the PCB design, thanks for sharing that, I've installed the Kicad S/W (that pretty cool), just learning how to drive, next will be learning how to solder SMD components, which will be a mess :).

 

cheers

 

Peter

Link to comment
Share on other sites

Hi Overpro

 

I think there may be an additional file needed in the project. When I click on the .cmp file to open it in cvpcb, it is nable to find cdu.mod. Looking at the project preferences, I think its still hiding on your d:\projects\kicad\library\cdu ;)

 

cheers

 

Peter

Link to comment
Share on other sites

Hi Overpro

 

I think there may be an additional file needed in the project. When I click on the .cmp file to open it in cvpcb, it is nable to find cdu.mod. Looking at the project preferences, I think its still hiding on your d:\projects\kicad\library\cdu ;)

 

cheers

 

Peter

 

Sorry I didn't check the files carefully, now I have fixed the Kicad CvPCB symbol to footprint associations.

Please pull the files from github again, and make sure you add the default symbol footprint libraries by using this method:

 

1. copy this file

d:\kicad-winbuilder-3.4\kicad\share\template\fp-lib-table.for-github

to this place, ( remove ".for-github" from the file name )

%userprofile%\appdata\roaming\kicad\fp-lib-table

 

2. restart KiCad, and open Schema file and open CvPCB, this may take a few seconds because CvPCB will go to github to download the footprint libraries.

And you should good to go.

 

 

Please let me know if it works or not.

 

ps: I also uploaded the gerber files to github, just in case anyone who wants to have a try ASAP.

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Link to comment
Share on other sites

Hi overpro, Thank you for your share.

 

I don't understand how to connect ( CONN2 2 pin ) ( CONN3 3 pin ) to arduino pin?

and how to connect ( CONN4 4 pin ) to stepper motor pin ?

 

Can you clearly tell us the installation step?

 

 

Otherwise, i can not find the file as below

d:\kicad-winbuilder-3.4\kicad\share\template\fp-lib-table.for-github

Link to comment
Share on other sites

Hi overpro, Thank you for your share.

 

I don't understand how to connect ( CONN2 2 pin ) ( CONN3 3 pin ) to arduino pin?

and how to connect ( CONN4 4 pin ) to stepper motor pin ?

 

Can you clearly tell us the installation step?

 

 

Otherwise, i can not find the file as below

d:\kicad-winbuilder-3.4\kicad\share\template\fp-lib-table.for-github

 

Hi Marick,

 

Below is the screen shot of the PCB view, connect your 5v power source to CONN 2 pin and be aware of the +(VCC) -(GND).

For the CONN 3, connect CONN3-SER, SRCLK, RCLK to Arduino 22,23,24 or 25,26,27 or 28,29,30. Because one board controls 4 stepper motor, so 3 of this board can control 12 stepper motor which covers EMI panel. You can also attach just one board with one stepper motor to test your build.

attachment.php?attachmentid=105413&stc=1&d=1412380939

 

The CONN4 should be connect to stepper motor, if you are using the VID29xx or similar motor, the connection should be like this:

attachment.php?attachmentid=105414&stc=1&d=1412380939

 

I will post some pictures later to indicate the relationships between the 4 conn4 pins and the EMI gauges.

 

Regarding the fp-lib-table.for-github, because I'm using the latest nightly build of KiCad, the project management is quite different compared to the downloaded Windows build which was released in 2013 July, I recommend you compile the KiCad by using KiCad-Winbuilder: https://launchpad.net/kicad-winbuilder

1570891797_2014-10-0407_50_03-Pcbnew(2014-10-02BZR5162)-productD__projects_kiCad_vid6606_595_Newfolde.png.20073952d83f1d0468276f923cbde003.png

855228310_2014-10-0408_01_26-D__Cockpit_A10C_DCSWA10CCockpit_Parts_VID________001.jpg-IrfanView.png.b77f248f221bf52f26f664d13b82c45c.png


Edited by overpro

overpro = I'm not good at Nintendo Mario and always get "Game over" pretty fast, so over~~pro

Link to comment
Share on other sites

Sorry I didn't check the files carefully, now I have fixed the Kicad CvPCB symbol to footprint associations.

Please pull the files from github again, and make sure you add the default symbol footprint libraries by using this method:

 

1. copy this file

d:\kicad-winbuilder-3.4\kicad\share\template\fp-lib-table.for-github

to this place, ( remove ".for-github" from the file name )

%userprofile%\appdata\roaming\kicad\fp-lib-table

 

2. restart KiCad, and open Schema file and open CvPCB, this may take a few seconds because CvPCB will go to github to download the footprint libraries.

And you should good to go.

 

 

Please let me know if it works or not.

 

ps: I also uploaded the gerber files to github, just in case anyone who wants to have a try ASAP.

 

thanks again, I'll give it a go.

 

cheers

 

Peter

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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