This will read the frequency(Ethanol %) and low pulse time(C Temp) of a standard GM Ethanol content sensor, print it to USB serial, and then transmit a CANBUS message.
Uses the PIO for CANBUS, using this library: https://github.com/KevinOConnor/can2040
CANBUS message format can be set to whatever. Default is set to mirror the Zeitronix format. It will transmit 50% Ethanol, max temperature, and a faulted sensor state for any error condition. The error conditions being a disconnected or failed sensor, too low of a frequency(below 0%), and too high of a frequency(above 100%).
Tested with:
- VDO / CONTINENTAL SE1004S or GM 13577429. Connector for the sensor is a Delphi 13511132. Cheap connectors on AliExpress work great.
- Texas Instruments SN65HVD230 CANBUS transceiver. Again, cheap breakout boards on AliExpress. Depending on your application you may not may not need a 120 Ohm termination resistor. The boards I bought from AliExpress included them.
- QS-1205CME-3A buck converter, from AliExpress, to step down the vehicle 12V to 5V needed for the Pico.
Total cost was around $100.
Output Ethanol Content: % (Frequency Hz - 50)
Fuel temperature °C: [41.5 x low pulsewidth (ms)] - 81.25
Self diagnostics: Embedded (fuel contamination more likely as readings increase above 150Hz)