sordfish / project-clematis

Ideas and test code for Engine control on an FPGA
0 stars 0 forks source link

Initial Development hardware #1

Open sordfish opened 4 years ago

sordfish commented 4 years ago

I find having affordable and easily accessible dev kits lowers the bar to entry which is probably why projects like speeduino and rusefi have taken off.

For dev hardware I've chosen a ColorLight 5A-75B PCB to experiment with the ECP5 FPGA

The only limitations with the 5A-75B or 5A-75E is they have one way logic converters so for any inputs these will need to be removed and there is no onboard programming interface so a ftdi2232h board would be required too.

For hardware stimulation I have a Jimstim available but I'd like to move away from closed hardware and possibly use another 5A-75B board for toothed wheel and cam position simulation. potentiometers can still be used for sensor simulation but I'd also like to try digital potentiometers for automation testing, ie take a log and play it back via simulation.

sordfish commented 4 years ago

My colorLight 5A-75B has arrived and I've swapped out U28 for bridge wires so I can get signals into the fpga as well.

The bridge wire process is very fiddly so I need to look at what drop in options there are for bidirectional comms. I did see some work on flexpcb adapters so I'll see if anything came of them.

In terms of jtag hardware a bluepill stm32f1 with dirtyjtag firmware is also an option as there is support for this in openfpgaloader.

sordfish commented 3 years ago

I've been able to get litex running with vexriscv using the modified fpga_101 lab004 code.

It programmed first time with OpenFPGALoader and dirtyJtag running on an ebay bluepill.

I've taken some hardware inspiration from the Qorivva ECU that B&G Were going to use so I've acquired some samples from NXP, an MC33810 and MC33816

MC33810 will be used for port injection drivers and ignition mosfet drivers.

MC33816 is a completely different beast that is designed for GDI hardware. This will handle injection and fuel pump control including the dcdc boost voltage. It also runs code so this with the timing core will probably run the engine without a CPU!

I still need to look at h Bridge options as ethrottle is important as it's needed for torque request models of control and my test engine(s) will be ford ecoboost that are dbw.

sordfish commented 3 years ago

High level standalone ecus use FPGA + Microcontroller to run everything.

Would having the power of a Teensy 4 (Cortex m7 600mhz) be beneficial to offload all the fuel modelling and just have the RISCV softcore for decoding trigger patterns and other timing critical tasks?

Teensy isn't 5v tolerant but it's a cpu that can easily be built with opensource tools.

It does add even more complexity so possibly see how the riscv performes and it bottlenecks are hit look at options then.

sordfish commented 3 years ago

Rusefi elected to use PT2001 vs the MC33816 which is a pin compatible valve driver.

NXP have a prebuilt board for the PT2001 that could speed up real world development FRDMPT2001EVM

sordfish commented 3 years ago

Brain dump: is the MC33816/PT2001 even needed?

There is the benefit of the PT2001 being certified but I'm sure the FPGA can handle the dc/dc generation as well as the peak and hold control.

This reduces bom and having to worry about writing code for the MC33816/PT2001 cores.

Edit: Needs more investigation required, lots of high voltage stuff, so it would need more in terms of discreet components to isolate the fpga, maybe source a dumber solenoid driver?

need to check L9781

sordfish commented 2 years ago

ULX4M is an ECP5 compute module which has a compatible footprint to a pi CM4.

https://twitter.com/GMahovlic/status/1452308558977150981?t=Jt9BdfPRrMoM1GwCffeerQ&s=19