First off Hello, I am new here. Now that that's out of the way...
I would like to use a RPi 3 to control 2 12v vacuum solenoids on my engine. Normally closed vacuum solenoids that opens when they receive 12v... normally from the stock ECU, but some mods happened. The original engine intake had different vacuum solenoid timing. Both the intake and ecu are not stock for this car. The intake is larger and needs different timing for the solenoids, the ecu is from a newer engine and has yet a third set of numbers for the solenoid actuation. It was OBDI is now OBDII with a patch harness
It functions extremely well, all I'm trying to do is a minor tweak to open the solenoids at the correct rpm for each solenoid. Absolutely no damage can or will occur from this mod, only a minor loss of power will occur at certain rpms when the timing is off. Parts are available on the market, but I want to go this route and add more functions as I go along. There also seems to be an absolute brick wall between electronics people and automotive people. Most searches involving car/automotive, 12v, actuator/solenoid and Pi/arduino lead to carpooters. It's on my list too but secondary. I'm also not impressed with OBDII dash displays, I already do that with my phone when something goes wrong.
I've got an ELM327 Bluetooth on the way specifically for this project. I figure that will be a quick temporary way to get the RPMs for testing while I figure out a safe way to get the high voltage from spark plug no.1 to a GPIO pin. Or I may be able to just splice it off the signal to the ECU/tachometer which is already safe.
I'm going to have to experiment a little with this. The stock solenoids may operate on 5v that would be great and I think should make this a simpler project. But if there's a delay, and or they don't always flip at the correct point I'll have to go with 12v.
So here's what I've got since you're still here. Solenoid number 1 needs to open at 4000 rpms. Solenoid number 2 at 4800 rpms, and they both close at 6800 rpms.
The ECU will have dummy solenoids plugged in to prevent a check engine light, from here on out referred to as a CEL. The CEL will not cause any emissions issues or limp mode so this will not contribute to poor fuel economy or global warming if that is a concern. It passes emissions and has a catalytic convertor as well.
So what is this all about? Well, cars have a peak horsepower and torque number. The system this car came with has the ability to move the peak TQ number a little lower and a little higher, giving it more power over a wider range of rpms. There were 4 variations of this engine. I have parts from 3 of them to make more power by getting more air into the engine for combustion. 25-35% more power than stock, over a wider range.
Draw a rectangle on a piece of paper, now draw an oval inside the rectangle touching the 4 sides. The old intake and heads used to breath through the oval, the new parts, through the rectangle, they have the added area/volume of what's left in the corners, from the throttle all the way to the cylinders.
That was part 1. The other part of this is where the solenoids come in. Helmholz resonance. The long and short of it IS the long and short of it. At lower rpms an engine breaths better through a longer intake and makes more power by keeping air velocity up in a longer tube. As it climbs through the rpms the shorter the intake the better to get a larger volume of air pulled by the pistons. The solenoids operate a metal plate each that open and close a tube at the far end (far from the throttle,) and another tube midway in the intake to connect one bank of intake runners, (tubes feeding the engine air,) to the other set. At low rpms all cylinders draw from the throttle side. 4000 rpms one solenoid flips the valve and the cylinders can draw air from 2 directions, 4800 all the cylinders can pull from 3 directions.
What's this resonance thing about? You have to visualize the air as a spring. Getting pulled in by the engine, splitting into 2 chambers then to the 6 runners (yeah almost forgot 6 cylinder engine,) each taking in air at different times. So there's this pulling of the air right up until the cylinder head valve or valves close. The air traveling at speed suddenly slams to a halt on the back of the valve and compresses like a spring. Then goes back from the runner into the larger intake chamber which if timed right can be used to charge the next cylinder that opens. This is the effect this system takes advantage of. Sort of a micro supercharging the air, the air resonates at different frequencies at different rpms.
It's a 2.5l V6 from Mazda that would absolutely trash a 5.0l V8 from the same era. I wish they still made them... with more modern goodies. Anyway I've written a novel. I'm not sure what program I would be looking for. I expect there's more than one way to skin this cat. I do want to get up to controlling ignition coils later with the same Pi.