rusefi-hardware/lambda-x2
rusefillc d7686afc9f
Update readme.md
2024-04-04 00:38:53 -04:00
..
export blue & p1 2023-12-30 00:41:18 -05:00
33311-24AW-2.STEP Lambda x2 (#67) 2022-04-24 14:55:33 -04:00
33311-24AW-2.kicad_mod Lambda x2 rev1 (#180) 2023-02-25 15:00:21 -04:00
33311-24AW-2.kicad_sym Lambda x2 (#67) 2022-04-24 14:55:33 -04:00
JDY-33.STEP Lambda x2 (#67) 2022-04-24 14:55:33 -04:00
JDY-33.kicad_mod Lambda x2 (#67) 2022-04-24 14:55:33 -04:00
JDY-33.kicad_sym Lambda x2 (#67) 2022-04-24 14:55:33 -04:00
TODO.txt lambda-x2: update readme, document issue (#191) 2023-04-26 07:08:27 -04:00
egt.kicad_sch Lambda x2 rev1 (#182) 2023-02-25 17:40:59 -04:00
fp-info-cache Lambda x2 rev1 (#180) 2023-02-25 15:00:21 -04:00
fp-lib-table Lambda x2 rev1 (#180) 2023-02-25 15:00:21 -04:00
lambda-x2.kicad_pcb lambda-x2: rev1: update silkscreen (#183) 2023-02-26 08:23:24 -04:00
lambda-x2.kicad_pro Lambda x2 rev1 (#180) 2023-02-25 15:00:21 -04:00
lambda-x2.kicad_sch Lambda x2 rev1 (#182) 2023-02-25 17:40:59 -04:00
lsu.kicad_sch lambda-x2: rev1: update silkscreen (#183) 2023-02-26 08:23:24 -04:00
readme.md Update readme.md 2024-04-04 00:38:53 -04:00
wideband_controller-cache.lib Lambda x2 (#67) 2022-04-24 14:55:33 -04:00

readme.md

About

🟢 rev1 is known to work 🟢

x

  • STM32F103 dual channel wideband AFR controller supporting Bosch LSU4.9 and LSU4.2 (LSU_ADV work in progress)
  • CAN and analog output
  • x2 EGT input using MAX31855KASA or MAX31856
  • x2 auxilary analog input: 0..5V with pull-up or pull-down (configurable by soldering resistor). One can be used to source 5V to external sensor.
  • x2 2 auxilary output 0..5V. Also can be used for slow PWM signal output.
  • x2 open drain outputs: BTS3028 (5A)
  • Bluetooth or USRT TunerStudio connectivity
  • MegaSquirt compatible pass-through connection over CAN http://www.msgpio.com/manuals/mshift/cpt.html (in progress)

See interactive pinout

See wire colors for standart LSU wire collors and connectors pinouts.

For firmware see https://github.com/dron0gus/wideband (based on https://github.com/mck1117/wideband)

See rusEFI forum: F103 dual channel wideband controller + EGT + 2 x AUX In + 2 Aux out

See also https://github.com/rusefi/rusefi/wiki/WBO

Known issues

DFU mode/floating PB2

BOOT0 = 1, BOOT1 = 0 pattern is used to enter DFU bootloader on power/reset. BOOT0 is controled by jumper/button. BOOT1 (PB2) is used as bias current source for LSU4.9 and floating.

Use jumper wire to connect PB2 (through bias resistor) to GND: connect A2 pin of main connector with GND (J4 AUX connector pin 10)

20230930_110548

ESR measurement crosstalk between channels (rev0 and rev1)

HW has three different outputs for Nernst cell ESR measurement with different output resistance: 6.8K for LSU4.2, 22K for LSU4.9 and 47K for LSUADV. Idea was to allow the user to set the type of sensor from SW only.

Each ESR output is driven by one MCU GPIO. GPIOs for unused ESR measurement outputs are kept in Hi-Z (input) state and does not affect ESR measurement.

Same GPIO drivers ESR outputs for both channels. This is the root cause of problem

Problem: unused ESR output with GPIO in Hi-Z state connect Nernst cell outputs from left and right channel through two resistors. This causes crosstalk between channels and inaccurate ESR measurement. Wrong ESR measurement causes incorrect sensor temperature calculation. This can lead to inaccurate AFR measurement, overheating or underheating of the sensor.

Same issue for LSU4.9 bias resistors R22 and R70.

Solution:

Boards come with all ESR drive resistors populated. You have to remove unnecessary resistors.

If LSU4.2 sensor is used: remove R24, R25, R71, R72, R22, R70. Keep R41 and R73 - 6.8K

If LSU4.9 sensor is used: remove R25, R41, R72, R73. Keep R24 and R71 - 22K

If LSUADV sensor is used: remove R24, R41, R71, R73, R22, R70. Keep R25 and R72 - 47K

This will be (or not) solved in next revision of HW.

Pinout

Connectors pinout

Main connector interactive Pinout

J4 is AUX connector available on PCB. SPI and I2C interfaces along with 3.3V and 5V are routed to this connector. Can be used to connect some small disply (SW not implemented yet)

J3 connector is for flashing and powering board on table. Also can be used for TunerStudion connection.

J1 and J2 are JTAG connectos.

Uart pinout

J3 connector. Colors are default for cheap usb-to-uart converters based on CP2101 or FTDI232 Connect red wire if you want to power device from USB. Default baud rate is 115200.

image

Bluetooth

No extra steps needed to initialize JDY-33. Default device name is "RusEFI WBO x2" (or "RuseEFI WBO x2 BLE" for BT BLE)

Default baud rate is 115200.

TunerStudio configuration

Baudrate is 115200 .ini file for both UART and BT connection.

Both interfaces can be used simultaneously for data logging but not for settings change (from rev1).

Rev0 share same UART for both interfaces.

Firmware Upload

Two ways to program using STM32CubeProgrammer

  • recommended way: using UART connectivity. Power device up while shorting BOOT0 jumper to enter DFU mode.
  • st-link if you have tc2030 spring-loaded cable.
  • update over CAN or UART (J3) using OpenBLT (update over BT is in progress)

TL,DR: 9600 nothing connected on main connector

image

Updating over UART using DFU mode

  1. Disconnect main connector. If you are going to apply +12V power through main connector - make sure that nothing else is connected to WBO (LSU sensors, any load, etc). But I recommend flash using +5V from USB.

  2. connect USB to uart connector to J3 connector: gnd, rx and tx. Don't forget to cross Rx-`Tx (adapter's Tx goes to WBO's Rx, WBO's Tx goes to adapter's Rx). If you going to power WBO from USB port - also attach 5V line. Do not connect +5 from USB adapter if you are going to use +12V supply through main connector. 20230923_125247

  3. Download and install STM32 Flash Loader Demonstrator. (Alternative tool is stm32flash - not covered in this instruction)

  4. Figure out USB to serial serial port number: device manager

  5. Start Flash Loader Demonstrator GUI application, select correct COM port. Optional: reduce timeout to 1 second: stm32 flasher

  6. Press and hold BOOT0 button on the bottom of PCB. Or short BOOT0 PCB jumper if button is not populated on your board.

  7. Apply power (while holding BOOT0 button) to board and press Next in application. After app detects chip you should see something similar to: stm32 flasher 2

  8. Press next, select "Download to device", select wideband.bin file. Select "Jump to user application" and "Verify after download" stm32 flasher 3

  9. Press Next and wait for flash/verification ends. stm32 flasher 4

Updating using JTAG

DBD.

Update using OpenBLT

OpenBLT https://www.feaser.com/openblt/doku.php

  1. Restart device to OpenBLT mode using "Reset to OpenBLT" button under Controller -> ECU tools in TunerStudio.

  2. Close TunerStudio to release serial port

  3. Open BootCommander, select correct serial port, select wideband_update.srec file.

Changelog

rev 1

  • Switch to 64 pin STM32/GD32
  • Add 8MHz HSE oscillator (better clock stability for CAN over wide temperature range)
  • Use DAC (instead of PWM) outputs for driving Ip
  • Move BT to UART3/USART3, keep USART1 for bootloader/debug
  • Drive BT's EN signal from MCU
  • Fix RC filters on heater outputs for better voltage measurement
  • Use separate ADC input for Vbat measurement
  • Use ADC channels for AUX outputs monitoring/diagnostic
  • Use PWM noise cancelation circuit on AUX analog outputs
  • Removed useless/non-functional protection of Vm outputs
  • Fix board outline to fit two types of enclosure ("plastic top" and "alloy brick")
  • Add testpoints for TC2030 JTAG probe
  • Add buttons for Reset and Boot0
  • Add Cfg1 and jumpers
  • Replace fuse holder with resettable 0.2A 33V fuse
  • Two status LEDs for separate status indication for left and right channel
  • Silkscreen labels around testpoints
  • Silkscreen labels at uart connector on both sides of PCB
  • Un_3x_sense formula is now 0.247 + 3.15 * (Un - Vm)
  • Un_sense (not gained) is also routed to ADC input
  • Protection from possible Ip current when MCU in reset/bootloader
  • White "power on" LED replaced with green
  • Main connector pinout added to top silkscreen
  • AUX connector pinout added to top silkscreen

rev 0

Seems to work with proper C10/C35 using https://github.com/rusefi/wideband/releases/tag/20230210-does-not-match-binaris