So, I'm working on an ambitious first project! I've got a background in PLC programming, so aside from a different language, I hope it will go well. ![]()
I'm upgrading the electrical system on a 1979 Honda CB650. Option 1 is to spring for $350+ worth of OEM or equivalent parts to drop in, knowing they'll work, but also knowing that the electrical system was a bit of an Achilles heel on these bikes since day one. Option two is to build my own replacement parts for around $100, using all upgraded components. I think I have the hardware down, but now it comes to programming, and I'm lost. I guess the first question would be before I purchase all this, is the Arduino Uno R3 capable of handling the processing load I intend to put on it, or will it start to lag?
First, the arduino will be running a PID loop, regulating the system voltage to 13.5VDC, by firing a PWM pulse on the gate of a MOSFET, supplying excitation current to my alternator.
Second, there will be a current limiter on my battery charging circuit, so I can limit the charge rate to a maximum of 1.5A, to avoid damaging the battery. Likely use another reverse acting PID loop firing a MOSFET here; 100% duty cycle until near 1.5A then starts to respond.
Finally, the spark units are shot. Looking at the basic diagram (Page 3 of link) http://www.jasonkent.ca/manuals/79%20CB650%20Service%20017.pdf I'm pretty sure all its doing is timing the spark signal based on the pulse from the pulse generator. I intend to have optical isolators feeding the pulse into two digital inputs, I just don't know where to begin writing the code for the processing, or if my understanding of this circuit is even correct.
As far as my first two functions go, I don't think I'll have too much trouble, just a matter of learning how to scale the analog inputs to engineering units so I can program in a real value as the setpoint. The third function, replacing the spark units is where I'm really boned. Can anyone provide some insight?
Thanks!