Today I had the pleasure of hosting
@NealRomeoGolf to show him the shop and the project. Hopefully I demonstrated my loyalty to Caterpillar, even if I picked him up at the airport in my Cummins-powered truck (which has the best air conditioning of the fleet currently).
We talked about some of the future aspects of the project. I'm getting some ideas on the flywheel (both with some input from a Cat group I'm on and also thinking about sources to call). The other aspect I need is a throttle input to the ECU.
The ECU on this thing looks for a PWM input from a sinking output driver (PWM that goes to ground if I understand the terminology correctly) at 500 Hz (+/- 50 Hz). The ECU provides an 8V, 100 mA power supply to go to this PWM sensor/converter, although it seems that the 8V power supply is there for convenience rather than the ECU needing the PWM sensor/box to utilize that power source. The documentation does say that the PWM source should produce an output within 150 ms of being powered on, which I suppose is the time before the ECU considers the input to be invalid. Valid ranges are 10-22% PWM for idle and 75-90% at full throttle.
While getting a device that could produce this PWM is simple enough, the catch is tying it to the throttle position, which is the real key. What I would really like to do for this would be to get some kind of device that would use the throttle position sensor that is on the current engine/throttle body as an input, and then use that to produce a PWM output. I'm not sure what would be a good device for something like this.
On my bus thread, I'd asked about devices that would be good to use/program for controlling an array of cooling fans for the engine.
@masloki and
@ElPaso Pilot had suggested NodeMCU as a stone simple option. No idea whether it could do this kind of analog input to digital output, or maybe this gets into a Raspberry Pi, or something more complicated? It seems like it requires very little in the way of computing power to do something like this. Looking at the description for the Arduino Uno Rev 3 (
https://store-usa.arduino.cc/products/arduino-uno-rev3/?selectedStore=us) it lists it has PWM outputs. And now searching, it looks like based on this:
https://www.electronicwings.com/nod...ased ESP8266 has the,is adjustable up to 1KHz.
It can do 500 Hz (max of 1 KHz). And about halfway down that page, they seem to have an example of exactly what I'm trying to do. The difference being they're using the PWM output as power to power an LED, whereas as I understand it, the output driver should be sinking (going to ground) not providing voltage.
It would be kinda nice if I can end up finding a board that can provide solutions for both this on the Cat, and then also the electronic fan control on the bus, more than anything since that way I can try to learn one sort of programming for both.