Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Principle Engineer

Jack Greenwood @mahir Yuchen Lin

Forced to Review

Christopher Chung Anthony Luo

Dragged Along

Uplifted

Daniel Puratich Sahil Kale (Deactivated) Ethan Abraham Aidan Bowers (Deactivated)

Objective

To creates a system that feeds simulated signals directly into pilots to verify the behaviour of zero pilots is correct.

Due date

Key outcomes

Capture as many potential errors in the code before the actual test flight.

Status

Status
titlenot started
/
Status
colourYellow
titlein progress
/
Status
colourGreen
titlecomplete

\uD83E\uDD14 Problem Statement

Determine the necessary requirements & future expansion for a HIL Controller for verifying ZP. The HIL should allow for The art of code testing.

code analysis → unit testing → simulator in a loop(test high level manager behavior) → Hardware in a loop(HIL)

The HIL allows mocking of sensors, peripherals, and “environment” while verifying that outputs from ZP are as expected.

will this ever interface with the simulator?

possible but as an extention of current system.

What is HIL?

a test suite → ecu → hardware → output

HIL uses plant, a mathmatical representation, to test the embedded system. The plant first generate a situation of input and corresponding signal is emulated and send to the embedded test. The input will affect the output signal and then change plant input again. Test suite are prepared which is a collection of test cases.

🎯 Scope

Current Must Haves:

  • PPM Output to emulate controller signal

  • Hardware ARM/Disarm signal → ZP (button emulation)

  • Send/Receive Telemetry Data

  • Passthrough Telemetry to Ground Station

  • Interfaces over USB

  • Analog ↔︎ Digital conversion up to 6s VBatt.

    • monitor battery [status]

  • Mock IMU, GPS

    • by extension, mocked interfaces (spi/i2c/uart).

  • Remote access incl. remote flashing.

  • Test suites (small regressions for now).

  • Ability to reset ZP (toggle reset line on ZP) (or remote flashing).

Future Expansion:

  • Add-on with analog components for user-input to HIL

  • Mock more sensors (Airspeed, Barometer, OFS, etc).

  • Future expansion for more complete test suites.

  • Actuator output checking? (in a safe way)

  • hardware monitoring (temperature / current / power / etc)

Not in scope:

tasks break down:

To-do:

PPM data: (emulating controller signal)

Hardware ARM/ Disarm signal:(emulate a safe to start signal):

Output verifying? Hooking up scope/DDM ← safe thing to do?

solution proposing: reduce the voltage to 5v analog and send the actuator signal back to the stm board to verify the input and anticipated output.

under research:

Send/ Receive telemetry data: (mocking UART data stream)

Interfaces over usb: (emulate Serial communication)

Analog ↔︎ digital conversion: (adc singal?)

Mocking IMU, FPS/ other peripherials: (Mainly i2c and spi)

future to-do list:

Remote access and remote flashing: hardware power-cycle

testing suites: (regression testing)

Having a custom HIL system and custom hardware

Hardware monitoring.

comms emulator. Portable ground station

\uD83D\uDDD3 Timeline

The current short term goal to the mid-march will be to create the designed signal and to finish coding and unit testing the code. After all testing is carefully done try to run it on zp carefully and see correct output are generated. Think about how to check the signal output and verify the signal.(safe and automated)

Roadmap Planner
maplinks
timelinetrue
source%7B%22title%22%3A%22Roadmap%20Planner%22%2C%22timeline%22%3A%7B%22startDate%22%3A%222023-01-23%2000%3A00%3A00%22%2C%22endDate%22%3A%222023-03-23%2000%3A00%3A00%22%2C%22displayOption%22%3A%22WEEK%22%7D%2C%22lanes%22%3A%5B%7B%22title%22%3A%22architecture%20planning%22%2C%22color%22%3A%7B%22lane%22%3A%22%238eb021%22%2C%22bar%22%3A%22%23aac459%22%2C%22text%22%3A%22%23ffffff%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22rowIndex%22%3A0%2C%22startDate%22%3A%222023-01-23%2001%3A01%3A25%22%2C%22id%22%3A%225252a106-3a12-43af-b663-829cb5f0485b%22%2C%22title%22%3A%22understand%20ppm%20frame%22%2C%22description%22%3A%22%22%2C%22duration%22%3A2.4653465346534653%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A1%2C%22startDate%22%3A%222023-01-23%2001%3A01%3A25%22%2C%22id%22%3A%2256f370d3-2910-4729-8cd6-11eeb0b26590%22%2C%22title%22%3A%22understanding%20disarm%20button%20signal%22%2C%22description%22%3A%22%22%2C%22duration%22%3A2.4554455445544554%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A2%2C%22startDate%22%3A%222023-01-28%2012%3A25%3A24%22%2C%22id%22%3A%227eb8ad8e-6996-4ad1-82bf-15b9bc61e6f3%22%2C%22title%22%3A%22purposing%20interfaces%20and%20arch%22%2C%22description%22%3A%22%22%2C%22duration%22%3A2.277227722772277%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A3%2C%22startDate%22%3A%222023-03-13%2012%3A00%3A14%22%2C%22id%22%3A%222d0cd004-ff4f-42bd-96b1-5d23713bde36%22%2C%22title%22%3A%22automating%20the%20zp%20output%20testing%22%2C%22description%22%3A%22%22%2C%22duration%22%3A1.881188118811881%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%2C%7B%22title%22%3A%22coding%22%2C%22color%22%3A%7B%22lane%22%3A%22%23f6c342%22%2C%22bar%22%3A%22%23fadb8e%22%2C%22text%22%3A%22%23594300%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22rowIndex%22%3A0%2C%22startDate%22%3A%222023-02-13%2012%3A40%3A02%22%2C%22id%22%3A%22a7cac00e-c864-4af3-b801-f032fdd2fd74%22%2C%22title%22%3A%22finish%20the%20code%22%2C%22description%22%3A%22%22%2C%22duration%22%3A1.3366336633663367%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%2C%7B%22title%22%3A%22unit%20testing%22%2C%22color%22%3A%7B%22lane%22%3A%22%233b7fc4%22%2C%22bar%22%3A%22%236c9fd3%22%2C%22text%22%3A%22%23ffffff%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22rowIndex%22%3A0%2C%22startDate%22%3A%222023-02-19%2023%3A21%3A37%22%2C%22id%22%3A%22d6f4d76d-ecfd-4e14-a082-4bd6ad4c17aa%22%2C%22title%22%3A%22unit%20testing%20each%20output%22%2C%22description%22%3A%22%22%2C%22duration%22%3A1.9306930693069306%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22rowIndex%22%3A1%2C%22startDate%22%3A%222023-03-03%2019%3A47%3A46%22%2C%22id%22%3A%22996862e9-260a-484c-a92d-78074b3fa90e%22%2C%22title%22%3A%22zp%20integration%20test%22%2C%22description%22%3A%22%22%2C%22duration%22%3A1.396039603960396%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%5D%2C%22markers%22%3A%5B%7B%22title%22%3A%22Marker%201%22%2C%22markerDate%22%3A%222018-10-05%2007%3A07%3A43%22%7D%2C%7B%22markerDate%22%3A%222019-03-15%2000%3A00%3A00%22%2C%22title%22%3A%22Marker%22%7D%2C%7B%22markerDate%22%3A%222022-11-28%2001%3A39%3A48%22%2C%22title%22%3A%22Marker%22%7D%2C%7B%22markerDate%22%3A%222022-12-12%2000%3A00%3A00%22%2C%22title%22%3A%22Marker%22%7D%2C%7B%22markerDate%22%3A%222022-11-11%2010%3A27%3A19%22%2C%22title%22%3A%22Marker%22%7D%5D%7D
pagelinks
titleRoadmap%20Planner
hash902058fe54827da96d89fa1cdbb16157

✈️  Implementation Details

ZP input outputs

  • 1 RFD900x

    • PPM & Telemetry

  • 1 Mateksys 3901 L0x Optical Flow sensor

  • 1 VN-300 Inertial Sensor

  • 1 Neo M.8 GPS Sensor

  • 1 BMX160 Inertial Measurement Unit

  • 1 digital airspeed sensor

  • 4 lift motors + ESC’s + Props

  • 1 push motor + ESC’s

  • 7-8 Servos

  • Jetson TX2

  • PX5

Central controller raspberry pi. Attach nucleos to this which run proper firmware.

✅  Actions Items

  •  Yuchen Lin Finish reading all the document about ppm and disarm button and sketch a basic data frame for the ppm and output and the disarm button output

PPM Output Implementation

HIL Controller Current State

  •  @mahir Catch up on the speed of reading all the document. We want to by the end of this week, we are clear about what is ppm and disarm mode
  •  Anthony Luo Christopher Chung Yuchen Lin @mahir architecture meeting for HIL about 1. interface, 2. data structure, 3 test suite for controller and disarm button.

\uD83D\

...

uDEA9 Milestones and deadlines

Milestone

Owner

Deadline

Status

Finish understand ppm output and disarm mode

Yuchen Lin

@mahir

in progress

finish designing the arch

Anthony Luo Christopher Chung Yuchen Lin @mahir

finish coding

unit testing done

Open Questions

...

Milestone

...

Owner

...

Deadline

...

  • Do we want this to be a nucleo shield? I know this was mentioned throughout the meeting, but I don't remember if we came to a conclusion.

    • As it currently stands, when we refer to the “HIL controller,” we’re talking about the nucleo + the computer it interacts with. For the first revisions, we’ll design on a f401 F401. (L5) In the future, this might turn into a nucleo shield, but we’re more likely to have a central controller (refer to below).

  • "Analog ↔︎ Digital conversion up to 6s VBatt" How do we want to do the analog to digital conversion? Where is the analog input coming from ?

    • We want to measure the analog voltage from our power distribution board. When the HIL reads this value, it then sends a signal to ZP indicating that our board is receiving a certain voltage. This voltage is “forwarded” to ZP which then determines which flight mode we’re in.

  • By "remote flashing" do we mean having the ability to flash when the programmer is not in physical contact with the device? Would the HIL then be under the view of a camera?

    • Due to the fact that the HIL controller is the nucleo AND the computer, we should be able to SSH into the system.

  • Will this ever interface with the simulator? I feel like this is more of a future expansion thing, especially because the simulator hasn't been started.

    • Yes, this should easily interface with the simulator because we are using a nucleo.

  • "Central controller raspberry pi" I'm not familiar with the pi, so how would this change the flow? Would the nucleo interact with the pi, which then interacts with ZP?

    • Long term scope for this project is to have one central controller, such as the raspberry pi, and several peripherals (decided to be nucleos as of now) that route through said central controller. For example, one nucleo might be dedicated to mocking an IMU, and another might be dedicated to mocking GPS. The use of a central controller would allow us to break the project up into smaller parts, and have dedicated modules for certain things.

  • Do I need to write a UART driver? Or can I use the HAL UART driver?

    • HAL UART driver is fine for now. If we have issues with the HAL UART, this will likely be a bigger issue.

✅  Actions Items

  •  Jack Greenwood create architecture diagram, documentation, & open questions!

\uD83D\uDEA9 Milestones and deadlines

  • I2C issues, and working with hardware that doesn’t exist. More direction on this would be nice.

\uD83D\uDD17 Reference materials