View Single Post
      02-12-2019, 05:45 PM   #203
racerbruce
Brigadier General
racerbruce's Avatar
3854
Rep
3,004
Posts

Drives: 21 X3 & 13 335is E93
Join Date: Dec 2009
Location: Seattle

iTrader: (1)

Has anyone told you....

Quote:
Originally Posted by mattfwalters View Post



This is... far from my finest work. However! As a prototype, it's peachy.

Here's a circuit diagram, omitting some of the L298's pins (Vs, Vss, GND, etc.):


What this does:

The 2.6k resistor acts as a pull-up to +5V. Since the Infinity gives me a low-side switched (i.e. either ground or high-impedance) PWM signal to drive the solenoids, this will be ~4V when the Infinity's output is "high" and 0V when it is "low". This signal goes directly to In 2 / In 4.
The 1k resistor also acts as a pull-up to +5V, but it is grounded via the transistor's emitter. When the input signal is pulled high through the 2.6k resistor, the voltage present at the transistor's base allows current to flow from the collector to the emitter, effectively grounding out the 1k resistor and keeping the signal at In 1 / In 3 at around 0V. When the input signal is low, there is no voltage present at the transistor's base, so the 1k resistor is no longer grounded out and it pulls In 1 / In 3 up to around 4.5V.

This means that In 1 / In 3 always have exactly the opposite input that In 2 / In 4 have, so the single PWM input gives me a pair of high-current PWM outputs, one the exact inverse of the other. Baddabing, baddaboom, I can drive the IAC and VANOS solenoids.


Now to build two more and actually test this shit in the car.
YOUR BRAIN IS ON FIRE!

The mortals are in awe
__________________
Racerbruce
Appreciate 3