Difference between revisions of "Lisa"

From PaparazziUAV
Jump to navigation Jump to search
m (→‎TODO: Added tip on STM32 blinky, gdb, gcc)
Line 1: Line 1:
Lisa ( the Lost Illusions Serendipitous Autopilot) is a [http://www.st.com/mcu/inchtml-pages-stm32.html STM32]/[http://www.gumstix.net/Setup-and-Programming/cat/Overo-Setup-and-Programming/111.html Overo] board designed to run Paparazzi
Lisa ( the Lost Illusions Serendipitous Autopilot) is a [http://www.st.com/mcu/inchtml-pages-stm32.html STM32]/[http://www.gumstix.net/Setup-and-Programming/cat/Overo-Setup-and-Programming/111.html Overo] board designed to run Paparazzi


== TODO ==
open questions
* why not have servo and rc on PC6-9 ?
* change CAN tranceiver for a  SN65HVD230 at 3V3 ?
List of files currently being edited:
*
Antoine:
* <strike>check JTAG on STM32</strike>
* <strike>work with Piotr on connecting the missing wires on the STM</strike>
* paparazzi drivers for STM32: (software )
* <strike>USB for gumstix : does 5V need to be switchable ? (to allow reset from the gumstix)</strike>
* <strike>Check's from sheet 5</strike>
* <strike>Pressure sensor instruction to gany (redo airspeed computation), so he can finish the schematic for that (or finish it directly in the schematic) ( in progress ) </strike>
* <strike>Check the routing rules below and add if planned on routing a certain part in a specific way</strike>
* write layout ideas / wishes
Esden:
* <strike>STM32 spelling and connection check</strike>
* <strike>Fix STM32 footprint pad sizes</strike>
* <strike>Routing rules that have to be followed</strike>
* <strike>Add specification of external pressure sensor ADC</strike>
* <strike>Replace all 0603 parts with versions from [http://github.com/esden/pretty-eagle-libs pretty-eagle-lib]</strike>
* <strike>Replace all molex connectors with versions from [http://github.com/esden/pretty-eagle-libs pretty-eagle-lib]</strike>
* <strike>Add a LED shift register</strike> (STP08CP05 should do the job)
* <strike>Order a STP08CP05 sample</strike>
* <strike>Test the STP08CP05 on a breadboard</strike>
* howto for STM32 gcc gdb toolchain (blinking LED or similar) (started writing one on [http://openhardwarewiki.org/wiki/Summon_ARM_Toolchain openhardwarewiki.org])
(PiMyran: Check [http://fun-tech.se/stm32/ this.]
Gany:
* <strike>Check FT2232 footprint hw/lbr/booz.lbr  qfn-64 size & pinout
** -> Changed pad size from 0.6 x 0.4  to  0.75 x 0.25  and moved pin1 indicator outside the chip. </strike> 
* <strike>Make sure STM32 can interrupt overo
** -> connected omap pin 176 with stm pin 11 via level shifter</strike>
* <strike>ADC ref and analog supply voltage on STM</strike>
* <strike>Battery voltage measurement</strike>
* <strike>make sure overo console serial port is usable when FT2232 is not powered. protect overo console with a gate to allow to connect something to it when FTDI is not powered/used.</strike>
* <strike>add led to show FT2232 is powered, since power is from USB</strike>
* <strike>pressure sensor filter and hookup for both sensors</strike>
* <strike>Bring remaining GPIO of STM to a connector</strike>
* <strike>Subtract 2V from abs sensor, 0.75 from differential</strike>
* Run simulation on filter
* Place components
* Route board
* Send for production 4pcb/pcbcard(china)/sunstone


== Hardware ==
== Hardware ==


Hardware is still in development. The current CAD files are maintained in savannah svn in the paparazzi4/trunk/hw/lisa directory.
Software development is done on a Overo/Summit + Olimex STM32-H103 dev board


[[Image:lisa_proto.jpg|thumb]]
[[Image:lisa_l_cad.jpg|thumb]]
 
=== Bill Of Material ===
 
{|border="1" cellspacing="0" style="text-align:center" cellpadding="2" valign="top"
|-style="background:LightYellow; color:black"
!''Qty''!!width="150pt"|''Schematic part name''!!width="150pt"|''Value''!!width="150pt"|''Description''!!''Package''!!''Manufacturer''!!''Manufacturer part #''!!''Digikey''!!width="150pt"|''Mouser''
|-style="background:WhiteSmoke; color:black"
|colspan="10" align="left"|''Resistors''
|-
|foo_qty||foo_schem||foo_val||foo_desc||foo_package||foo_man||foo_man#||foo_dk||foo_mouser
|-style="background:WhiteSmoke; color:black"
|colspan="10" align="left"|''LEDs''
|-
|4||LED_1 to LED_4|| N/A || LED 2x1.2mm RD/GN||foo_package||foo_man||foo_man#||754-1093-1-ND||foo_mouser
|-style="background:WhiteSmoke; color:black"
|colspan="10" align="left"|''ICs''
|-
|1||MCU||STM32F103RE||Microcontrollers (MCU) 32BIT Cortex M3 Performance LINE||LQFP64||STMicroelectronics||STM32F103RET6||497-6444-ND||511-STM32F103RET6
|-
|1||BARO_ABS||MPXH6115|| SENSOR ABS PRESS 16.7PSI MAX || 8-SSOP with Port || Freescale|| ||MPXH6115AC6T1CT-ND||foo_mouser
|-
|1||BARO_DIF||MPXV5004DP|| SENSOR PRESSURE SMD 8-SOP || 8-SOP Dual Port || Freescale|| ||MPXV5004DP-ND||foo_mouser
|-
|1||LT_1||TXS0102DCU|| C VOLT-LEVEL TRANSLATOR 8-US8|| US8 || Texas Instruments|| ||296-21931-1-ND||foo_mouser
|-
|1||LT_3||ADG3308|| IC XLATOR 8CH 1.2-5.5V 20-LFCS || 20-LFCSP || Analog Devices Inc|| ||ADG3308BCPZ-REEL7CT-ND||foo_mouser
|-
|2||LT_I2C1 LT_I2C2||PCA9306|| IC LEVEL TRANSLATOR 8TSSOP || 8-TSSOP || NXP Semiconductors|| ||568-4214-1-ND||foo_mouser
|-
|1||REG6V5A||LM317MDTX|| IC REG POS 0.5A ADJ VOLT DPAK || DPak || Fairchild Semiconductor|| ||LM317MDTXFSCT-ND||foo_mouser
|-style="background:WhiteSmoke; color:black"
|colspan="10" align="left"|''Modules''
|-
|2||REG_3V3D REG_5VD||foo_val||foo_desc||foo_package||Texas Instruments||PTH08080WAH||296-20432-ND||foo_mouser
|-style="background:WhiteSmoke; color:black"
|colspan="10" align="left"|''Crystals/Oscillators''
|-
|1||Q3||foo_val||foo_desc||foo_package||Abracom||ABM8-12.000MHz-B2-T|| foo_dk ||815-ABM8-12-B2-T
|}
 
=== STM32 ===
 
STM32-F103RE
 
==== pinout ====
{|border="1" cellspacing="0" style="text-align:center" cellpadding="2" valign="top"
|-style="background:LightYellow; color:black"
!''STM32 Pin''!!width="150pt"|''function''!!width="150pt"|''remark''!!width="150pt"|"validated"
|-style="background:WhiteSmoke; color:black"
|colspan="10" align="left"|''SPI1: IMU, MAG, BARO. STM32 is master''
|-
|21||SCK || ||
|-
|22||MISO|| ||
|-
|23||MOSI|| ||
|-
|9 ||DRDY IMU|| ||
|-
|8 ||SS IMU|| ||
|-
|24 ||DRDY MAG|| ||
|-
|10 ||SS MAG|| ||
|-
|25 ||RESET MAG|| ||
|}
 
SPI1 :  IMU/baro high speed sensor communications, STM32 is master
        pin 21 (SCK), 22(MISO), 23(MOSI) 
        accel/gyro 16bitsADC  9(DRDY)  8(SS)
        mag                  24(DRDY) 10(SS)  25(RESET)
        eeprom                        53(SS)
        baro                  40(DRDY) 39(SS)
 
SPI2 :  overo, STM is slave
        pin 33 (SS), 34(SCK), 35(MISO), 36(MOSI),  11(interrupt for OMAP)
 
I2C1 :  motorcontroller
        pin 58(SCL), 59(SDA)
 
I2C2 : extension
      pin 29(SCL), 30(SDA)
 
UART1 : GPS or IMUxsense
      pin 42(TX), 43(RX)
 
UART2 : Modem
      pin 16(TX) ,17(RX)
 
UART3 : RC24
      pin 51(TX), 52(RX)
 
CAN : motor controller
      pin 42(TX), 43(RX)
 
SERVO_out: driving 3 servos
      37(TIM3CH1), 38(TIM3CH2), 26(TIM3CH3)
 
RC_in: analog RC
      27(TIM3H4)
 
JTAG : flash and debug
      46(TMS), 49(TCK), 50(TDI), 55(TDO), 56(TRST), 7(RESET)
 
ADCs : 1 for battery 2/3 for extansion
     
LED :
      3(LED_CLK), 4(LED_DATA)
 
POWER_SWITCHES: This is switched supply, used for example to switch on and off a video transmitter or some LEDS for night flight
                Can be removed for lack of place




Line 189: Line 24:
[[Image:differential_pressure.png]]
[[Image:differential_pressure.png]]


Because of high resolution requirements in the pressure sensor circuit there is an external ADC needed with the following features:
 
* 16bit resolution minimum, 20bit would be awesome
* Two channels (multiplexed or not) each at least 100Hz sampling rate
* I2C or SPI interface (I2C preferred)
** We used the [http://www.maxim-ic.com/quick_view2.cfm/qv_pk/4950 MAX11040] as ADC for a meteo payload, some (SPI) code is there. It samples 4 channels simultaneously in 24 bits (less "in real"). Slowest conversion speed is 250.1 samples/second.


=== FT2232 ===
=== FT2232 ===
Line 235: Line 66:
=== STM32 toolchain ===
=== STM32 toolchain ===


You can use the [http://github.com/esden/summon-arm-toolchain summon-arm-toolchain] script to build the required toolchain.
Install paparazzi-stm32 package available in the ENAC karmic repository
For the default values of the Paparazzi Makefile to work, you should set
 
<code>
PREFIX=/opt/stm32/toolchain/arm-elf
</code>
and
<code>
LIBSTM32_EN=1
</code>


=== Open Embedded ===
=== Open Embedded ===
Line 250: Line 72:
Open Embedded is the linux distribution used on the overo.
Open Embedded is the linux distribution used on the overo.
You can follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html instructions] on gumstix's website to build a complete cross development environment. Paparazzi's Makefile will default to look for it in /overo-oe
You can follow the [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html instructions] on gumstix's website to build a complete cross development environment. Paparazzi's Makefile will default to look for it in /overo-oe
== Status ==
== Routing Notes ==
* Motor controller connectors in 4 corners of the board if possible
* If we are running out of space on the board we have several options:
** Only one connector for the motors
** Two connectors for the motors on each side of the board
** Two connectors for the motors on each side of the board where each connector can accomodate two motor controller wires (4 pins each connector)
** Servo connector: used to drive up to 3 small servos, for example on a small biplan, or a gimbal for a camera, can also have switched 5V to switch on and OFF the video transmitter
== Routing Rules ==
* 6mil traces/spacings for signals
* 12mil traces/spacings for power traces (this is min value, otherwise as wide as possible or even planes if possible)
* 6mil layout grid
* Layer stacking:
** Top: Signal + Ground plane
** Route2: Ground plane(s) (Separate analogue and digital ground)
** Route15: Power plane(s)
** Bottom: Signal + Ground plane
* 0.4mm vias with 0.1mm restring

Revision as of 03:27, 30 March 2010

Lisa ( the Lost Illusions Serendipitous Autopilot) is a STM32/Overo board designed to run Paparazzi


Hardware

Lisa l cad.jpg


Pressure sensors

The board is equipped with a pair of pressure sensors, one absolute to measure altitude and one differential to measure airspeed.

Absolute Pressure

The proposed absolute pressure sensor is the freescale MPXh6115 The following plot displays the output of the sensor versus altitude

Absolute pressure.png

Differential Pressure

The proposed differential sensor is the MPXV5004DP

Differential pressure.png


FT2232

This chip is used for JTAG on STM32 and SERIAL/USB convertion on overo console

datasheet: URL

mini module used for dev : URL


schematics used is from the minimodule as ft2232 and minimodule schematics are not coherent ( regarding pullups of the eeprom)


Gumstix overo

[1] mechanical drawings

Software

STM32 drivers for paparazzi

LED : done

SYS_TIME : done

UART : done without DMA, so got datalink, telemetry and RC24 working

PPMout: done, needed for servos ( 3 servos ? )

PPMin: not done, needed for analog radio control and windvane

I2C : not done, needed for motor controllers

SPI : not done, needed for IMU ( big works as we share with mag and baro) and for overo

CAN : not done, needed for motor controller and CSC

ADC: not done,


STM32 toolchain

Install paparazzi-stm32 package available in the ENAC karmic repository

Open Embedded

Open Embedded is the linux distribution used on the overo. You can follow the instructions on gumstix's website to build a complete cross development environment. Paparazzi's Makefile will default to look for it in /overo-oe