Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26
  1. #11
    75+ Posting Member TobiBS's Avatar
    Join Date
    Feb 2008
    Location
    Germany
    Posts
    82
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Quote Originally Posted by pdpo View Post
    Hi there,

    Any chance you might share with us the layout and parts list of the PCB
    and some explanationm on how this works. Seems very interseting?

    Greetz Peter
    Of course,

    if it helps you and is not for commercial purpose, here it goes.

    Here is the schematic:
    http://www-public.tu-bs.de:8080/~y00...aceplatine.pdf

    It is rather simple, a FTDI FT232R does all USB stuff, so no worry about that, it is connected with a simple RX/TX interface to the Atmel Mega 8, which is the microcontroller that does all the work. The FT232R works in bus powered configuration, so we need no external power supply.

    To get exact timing I am using an external oscillator with 8 MHz, despite that all is configured with a minimum of parts. The ISP connector is used to program the Mega 8.

    The servos are then connected to 4 outputs of the Mega 8.

    Here is the board layout, as you can see all parts are SMD, the only holes and drills are needed for the mounting and for the USB connector:
    http://www-public.tu-bs.de:8080/~y00...inenlayout.pdf

    To identify what goes where, here is the mounting scheme:
    http://www-public.tu-bs.de:8080/~y00...ckungsplan.pdf

    and of course to identify what is what, a partlist:
    Code:
    Partlist
    
    Exported from Interfaceplatine.sch at 03.04.2009 11:01:07
    
    EAGLE Version 5.2.0 Copyright (c) 1988-2008 CadSoft
    
    Part     Value                Device               Package         Library            Sheet
    
    AVR      MEGA8-AI             MEGA8-AI             TQFP32-08       atmel              1
    C1       10nF                 C-EUC0603            C0603           rcl                1
    C2       47nF                 C-EUC0805            C0805           rcl                1
    C3       100nF                C-EUC0603            C0603           rcl                1
    C4       100nF                C-EUC0603            C0603           rcl                1
    C5       100nF                C-EUC0603            C0603           rcl                1
    C6       100nF                C-EUC0603            C0603           rcl                1
    C7       4.7uF                ELKO                 ELKO            Bremsdruckanzeiger 1
    ISP      STIFTLEISTE          STIFTLEISTE          STIFTLEISTE     Bremsdruckanzeiger 1
    LED      green                LEDCHIPLED_0603      CHIPLED_0603    led                1
    OSCIL    8,0MHz               QUARZOSZILLATOR      QUARZOSZILLATOR Bremsdruckanzeiger 1
    R1       0                    R-EU_M1206           M1206           rcl                1
    R2       0                    R-EU_M1206           M1206           rcl                1
    R3       0                    R-EU_M1206           M1206           rcl                1
    R4       10k                  R-EU_R0805           R0805           rcl                1
    R5       150                  R-EU_R0805           R0805           rcl                1
    SERVO1/2 STIFTLEISTE          STIFTLEISTE          STIFTLEISTE     Bremsdruckanzeiger 1
    SERVO3/4 STIFTLEISTE          STIFTLEISTE          STIFTLEISTE     Bremsdruckanzeiger 1
    USB      USB-BUCHSEUSB-BUCHSE USB-BUCHSEUSB-BUCHSE USB-BUCHSE      Bremsdruckanzeiger 1
    USB2UART FT232RL              FT232RL              SSOP28          ftdichip           1
    The Mega8 then needs a bit of programming and you need to have some software on the FS PC to communciate with the module. That's it.

  2. Thanks dnoize, Matt Olieman thanked for this post
  3. #12
    Executive Vice President, MyCockpit


    Matt Olieman's Avatar
    Join Date
    Oct 2005
    Location
    Ocala, FL USA
    Posts
    2,884
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Nice info Tobias, thank you!

    Matt Olieman

  4. #13
    75+ Posting Member TobiBS's Avatar
    Join Date
    Feb 2008
    Location
    Germany
    Posts
    82
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airbus gauges for the MIP

    OK, here is the final result:



    As you can see it is unlighted on the picture and therefore the white areas are some kind of pink, which is the color of the sheet if it is off. If anyone likes, I can provide pictures when lighted, hope you like it already.

  5. #14
    150+ Forum Groupie pdpo's Avatar
    Join Date
    Nov 2005
    Location
    belgium
    Posts
    260
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airbus gauges for the MIP

    Hi,

    I had lost track of this post and saw it back today but I cant download any of the PDF files?

    Greetz Peter
    FS9+PM+AST+opencockpits

  6. #15
    75+ Posting Member TobiBS's Avatar
    Join Date
    Feb 2008
    Location
    Germany
    Posts
    82
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airbus gauges for the MIP

    Quote Originally Posted by pdpo View Post
    I had lost track of this post and saw it back today but I cant download any of the PDF files?
    Sorry, that was my mistake, I accidently deleted them from the server, I changed the links, it should work now, but I don't have the first pictures anymore, but I think the PDFs and the final result is enough, when I unfasten it the next time, I will take a picture from the side and upload it again, if anyone needs this.

  7. #16
    150+ Forum Groupie pdpo's Avatar
    Join Date
    Nov 2005
    Location
    belgium
    Posts
    260
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airbus gauges for the MIP

    Hi,

    thanks very much, now ive downloaded the files ... this would make it posible to build the board for me too but the software is still missing. I am trying to learn from this since it would help me to understand how a communication between pc and atmel can be done.
    I had already before taken up looking at the atmega64 and see what this can do all.
    I had also downloaded already some bascom book but time is (as always) the limiting factor.
    Anyway it would be nice if you could share that too but I would equally understand if you would not share it. I can just ask..you are free to refuse of course....

    Greetz Peter
    FS9+PM+AST+opencockpits

  8. #17
    75+ Posting Member TobiBS's Avatar
    Join Date
    Feb 2008
    Location
    Germany
    Posts
    82
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airbus gauges for the MIP

    Quote Originally Posted by pdpo View Post
    thanks very much, now ive downloaded the files ... this would make it posible to build the board for me too but the software is still missing.
    Would be nice if you do that based on this layout, I hope it works a second time.

    Quote Originally Posted by pdpo View Post
    I am trying to learn from this since it would help me to understand how a communication between pc and atmel can be done.
    Actually my concept is currently a very easy one way communication, from the computer to the µC without any confirmation of command reception or something like that.

    Quote Originally Posted by pdpo View Post
    I had already before taken up looking at the atmega64 and see what this can do all.
    I had also downloaded already some bascom book but time is (as always) the limiting factor.
    I didn't program with BASCOM but don't fear ASSEMBLER, I did it with C which is also very easy to understand compared with ASsEMBLER. The source code does nothing more than receiving and setting the servos, it has exactly 100 lines.

    Quote Originally Posted by pdpo View Post
    Anyway it would be nice if you could share that too but I would equally understand if you would not share it. I can just ask..you are free to refuse of course....
    Well I think it is okay to share the code for the firmware, but I'd like to state again that I don't want that any part of my idea is being commercialized without my knowledge and approval.

    And another thing would be great: If anyone here is programming a driver for the gauge, please also make it open source or at least send it to me, because mine is actually very worse.

    Here is the code, comments are all in German, but it should be easy to translate or you can ask here.

    Code:
    // Vordefinieren der Taktfrequenz F_CPU in Herz für delay.h
    #ifndef F_CPU
    #define F_CPU 8000000UL
    #endif
    
    // Baudrate
    #define BAUD 9600UL                           // Definition
    #define UBRR_VAL ((F_CPU+BAUD*8)/(BAUD*16)-1) // Berechnungen
    #define BAUD_REAL (F_CPU/(16*(UBRR_VAL+1)))
    #define BAUD_ERROR ((BAUD_REAL*1000)/BAUD)
    #if ((BAUD_ERROR<990) || (BAUD_ERROR>1010))   //Fehlermeldung
    #error Systematischer Fehler der Baudrate grösser 1%
    #endif
    
    //Einbinden der Bibliotheken
    #include 
    #include 
    #include 
    
    // Servoabhängige Optionen, eingestellt für CMS digital Servo
    #define basetime 0.9 // Minimalzeit eines Impulses in ms
    #define steptime 4 // Auflösung der 250 Schritte in us
    #define waittime 0 // Wartezeit zwischen Ausgabesignalen in ms
    
    // Variablendeklaration
    volatile uint8_t servo[4]={125,125,125,125}, kanal, i; // Servopositionen, Schleifen
    uint8_t buffer, bytenummer, auswahl; // Datenübertragung
    
    ISR (USART_RXC_vect) // Interruptroutine bei Zeichenempfang
    {
    	buffer=UDR;        // Zwischenspeichern
    	switch(bytenummer) // Abfrage der Bytenummer
    	{
    		case 0: // Steuerbyte (muss 255 sein)
    		if(buffer==255) bytenummer=1;
    		break;
    		
    		case 1: // Auswahlbyte (25x, x=Servonummer)
    		if( (buffer>=251) && (buffer<=254) )
    		{
    			auswahl=buffer-251;
    			bytenummer=2;
    		}
    		else
    		{
    			bytenummer=0;
    		}
    		break;
    		
    		case 2: // Datenbyte (0 bis 250)
    		if(buffer<=250)
    		{			
    			servo[auswahl]=buffer; break;
    		}
    		bytenummer=0;
    		break;
    	}
    }
    
    int main (void) // Hauptprogramm
    {	
    	// Ausgänge setzen (4 Servos an PC0-PC3)
    	DDRB=0x00;
    	DDRC=0x0F;
    	DDRD=0x00;
    	
    	// Alle Ports auf 0 setzen
    	PORTB=0;
    	PORTC=0;
    	PORTD=0;
    
    	// UART Baudrate setzen
    	UBRRH = UBRR_VAL >> 8;
      UBRRL = UBRR_VAL & 0xFF;
    
    	// UART Receive und Interrupt Enable
    	sei();
    	UCSRB |= ( 1 << RXEN );
    	UCSRB |= ( 1 << RXCIE );
    	
    	while(1)
    	{
    		cli();
    		PORTC|=(1<3)
    		{
    			kanal=0;
    		}
    	}
    }

  9. #18
    150+ Forum Groupie pdpo's Avatar
    Join Date
    Nov 2005
    Location
    belgium
    Posts
    260
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airbus gauges for the MIP

    Hi,
    again thanks fro the next part of the puzzle.
    One more auestion though. Does the FDTI chip act as a serial port for a PC
    program? How does a PC program talk to this chip?

    Greetings Peter
    FS9+PM+AST+opencockpits

  10. #19
    75+ Posting Member TobiBS's Avatar
    Join Date
    Feb 2008
    Location
    Germany
    Posts
    82
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Airbus Re: Airbus gauges for the MIP

    Quote Originally Posted by pdpo View Post
    One more auestion though.
    But you asked to questions.

    Quote Originally Posted by pdpo View Post
    Does the FDTI chip act as a serial port for a PC program?
    The driver of the FTDI chip supports two modes, one is an emulated COM port, the other one is a direct USB support, which is in my eyes easier to use, because you don't have to care for the port, only for the name of the device and you need only 4 commands from the SDK or so.

    Quote Originally Posted by pdpo View Post
    How does a PC program talk to this chip?
    As you can see in the code above, the reception of commands is done in the ISR (USART_RXC_vect) subroutine.

    And to get this thing to work, you need to transmit the control character 255, then the number of the servo which position is following plus 250 (251 for servo 1, 254 for servo 4). The third and last parameter is then the desired position from 0-250.

    What you have to do in the firmware code is adopting the values to your servo, because I recognized that several servos need different timing. These are the basetime, steptime and waittime parameters. basetime is the time that is always a logical one, steptime is multiplied with 0-250 and then added to the basetime and waittime is the time that the µC waits after sending four commands to the servos to accomodate some manufacturer specifications.

    If you use the CMS digital Servo from Carson, everything should be fine, if you choose a different one, I would recommend also a digital servo, the smallest you can find and the price should be around 10-15 Euro.

  11. #20
    150+ Forum Groupie pdpo's Avatar
    Join Date
    Nov 2005
    Location
    belgium
    Posts
    260
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airbus gauges for the MIP

    Well,
    I cannot thank you enought for the detailed info. When time permits I'll have take a look at this and see if I can accomplish something too.
    Just one more thing... out of your explanation I understand there is some driver available for this usb chip and there is an SDK to talk with it, correct?

    Greetings Peter
    FS9+PM+AST+opencockpits

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Gauges?
    By Steve1970 in forum General Aviation (GA) Builder Disccusion
    Replies: 5
    Last Post: 12-15-2009, 03:55 PM
  2. Gauges CAD/DXF
    By riche543 in forum Westozy's Mechanical Engineering
    Replies: 3
    Last Post: 10-01-2009, 04:50 AM
  3. 737-200 gauges
    By roblockett in forum General Builder Questions All Aircraft Types
    Replies: 11
    Last Post: 03-21-2009, 04:25 PM
  4. gauges
    By Petex1 in forum Computer Hardware Setup
    Replies: 6
    Last Post: 02-21-2009, 02:33 AM