I'm working on planning out a project with a Mega1280. The project I want to tackle is for an engine swap in my truck. I want to take CANBUS data from my new engine into the Mega and use it to fake the engine inputs of the old ECU. This will allow the existing computer to drive all the existing things in the truck (dashboard, transmission, etc) with a different engine.
Now the tricky bit is I currently have only a basic knowledge of electronics, so I've got a big mountain of things to learn before I can build a reliable setup. I've decided to start with tackling how to power the Mega. Automotive power is "12V", but it's really more like 14-15V while the engine is running. The recommended specs say 7V-12V, but 6V-20V is allowable.
I came across this thread about powering an andruino with 12V, and it seemed to indicate that at higher voltages the voltage regulator would overheat. What's the ideal input voltage for an adruino and how many amps does it need? Can I just use the stock 14V from the car if I don't use the arduino to power anything else? Automotive sensors generally operate at 5V, so I'll have a 5V supply from the old ECU that I can use instead of the onboard power.
I hope my knowledge gaps aren't too great here and you can understand what I'm trying to figure out. Looking forward to learning and getting this project worked out. (Yes, I realize I probably have months ahead of me before I'm even close to getting this working).
You are correct, you have a big big mountain to climb. You need to expect up to 80 volts plus or minus on some of the older vehicles. It is down to 60V on some of the newer ones. These transients are known as Load Dump. You need to pre regulate with an automotive grade regulator. It is easy to say take data from the CAN bus but is the data you need available to you and is it even on that bus. Vehicles have CAN for diagnostics but most also have other buses for control etc. If you an get into the ECU you will need to know the protocol and messages it is communicating with, these are not normally published for security reasons. Look at the cold crank specifications, it is about 6V from the battery and then there is the double battery jump which is about 22V. Consider is the jumper cables are connected in reverse. The sensors are going to be a problem, they are not the same from vehicle to vehicle even though they measure the same thing. These are just a few of the things you need to consider.
Several people have talked about a 5V DC-DC converter. Do I only need to provide 5V to the Arduino for it to function correctly? Why is the minimum voltage listed as 6V then? My plan is to remove the barrel jack and solder my power supply solution directly to the arduino PCB.
gilshultz, you bring up a good point about load dump, I'd never heard of it before. After a little research I've discovered there's actually an SAE standard to build electronic supply circuits to tolerate load dump. I've built a Megasquirt standalone ECU before, I'll refer back to those schematics to figure out what they did to account for this.
For the CANBUS data, all the data I want is standard OBD-II data points. RPM, throttle position, manifold pressure, and coolant temperature. The faking of the sensors inputs to the old ECU comes back to my experience with the Megasquirt project. As my vehicle is manufactured by GM, all the sensors and their output values are well documented.
I've used a cigarette lighter USB supply, and connected to the USB port on the Arduino.
For permanent install, SteveMann's suggestion looks more appropriate. Can still use a USB cable, cut off the USB-A connector, and use the USB-B connector on the Mega. Will be sturdier than a couple of wires plugged into the Power Header.
The danger of this is if I get things wrong then I’ll toast the transmission. The 4L60e transmission uses throttle position to set appropriate line pressure. And it isn’t DIY transmission control, the whole point of this is to maintain the factory transmission control with the newer engine I want to install.
But yes, I plan to test this thoroughly on the bench before implementing it in an actual vehicle. I’ve been fiddling and modifying cars for close to 20 years now, I know a lot of things, but this project is also stretching my abilities. Without a challenge we don’t grow.