Results 11 to 20 of 26
Thread: Airbus gauges for the MIP
-
04-03-2009, 05:13 AM #11
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
-
Post Thanks / Like - 2 Thanks, 0 Likes, 0 Dislikes
-
04-03-2009, 05:31 AM #12
Nice info Tobias, thank you!
Matt Olieman
-
06-18-2009, 02:21 PM #13
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.
-
06-19-2009, 03:41 AM #14
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 PeterFS9+PM+AST+opencockpits
-
06-19-2009, 04:20 AM #15
Re: Airbus gauges for the MIP
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.
-
06-19-2009, 04:38 AM #16
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 PeterFS9+PM+AST+opencockpits
-
06-19-2009, 02:06 PM #17
Re: Airbus gauges for the MIP
Would be nice if you do that based on this layout, I hope it works a second time.
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.
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.
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; } } }
-
06-20-2009, 03:32 PM #18
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 PeterFS9+PM+AST+opencockpits
-
06-21-2009, 12:39 PM #19
Re: Airbus gauges for the MIP
But you asked to questions.
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.
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.
-
06-21-2009, 01:44 PM #20
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 PeterFS9+PM+AST+opencockpits
Similar Threads
-
Gauges?
By Steve1970 in forum General Aviation (GA) Builder DisccusionReplies: 5Last Post: 12-15-2009, 03:55 PM -
Gauges CAD/DXF
By riche543 in forum Westozy's Mechanical EngineeringReplies: 3Last Post: 10-01-2009, 04:50 AM -
737-200 gauges
By roblockett in forum General Builder Questions All Aircraft TypesReplies: 11Last Post: 03-21-2009, 04:25 PM -
gauges
By Petex1 in forum Computer Hardware SetupReplies: 6Last Post: 02-21-2009, 02:33 AM
Hi...realize this has been a long time, but I'm heading down the path of building my own 777...
B777 Overhead Panel Design