Arduino TCI

Jan_P

XS650 Guru
Top Contributor
Messages
1,254
Reaction score
1,995
Points
163
Location
Sweden
Yes, it's easy to add. Set up about a 1 sec counter or timer. Vector it to a routine that turns the wire to the coil off when it overflows or times out. Anytime the wire to the coil goes low, clear the timer. In normal operation it'll never turn it off


Here is the first version of it. The comments might be helpful because I wrote them in a way that would tell me two years later what I had done :)
https://github.com/hwm1/electronic-ignition/blob/master/tci.c

I have checked that evaluation board costs about $ 15
Question -How would that perform as a plug in board on an XS 650
putting it in a box. As an ignition system.
I have not read the specs.
But i am assuming ports and scaling and so already there
The code is on the way .
Wonder if that board with some Shielding and Electronics .. Can do it
 

Team Junk

XS650 Guru
Top Contributor
XS650.com Supporter
Messages
1,701
Reaction score
4,639
Points
263
Location
Central Texas
I have seen Arduino projects used in some pretty harsh environments. Are there higher grade Arduino chips . The Pamco style ignitions including the Boyer I would think be composed of auto grade silicon components.

Has anyone looked at Mips. That seems to be the processor I've seen in the auto fuel injector controllers that I've opened up.

I was really hoping by now there would be a open source fuel injection computer.
 

sleddog83

XS650 Addict
Messages
160
Reaction score
289
Points
63
Location
Vancouver Island, British Columbia
Just to throw a wrench in the thread. For testing my prototype on the bike, I just wrapped it in a antistatic bag and stuffed it into the toolbox cubby hole. Not ideal shielded conditions. The occasional misfire, ... I have interpreted as not enough transient suppression, bodgy prototype build and lastly, noise from bike electrics. The bike is mostly original, so I don't have a lot of space to install extra stuff. The next version should be smaller and I will look for a shielded box to put it in.
Thanks for the curve information. Will chew on that for a while.
 

sleddog83

XS650 Addict
Messages
160
Reaction score
289
Points
63
Location
Vancouver Island, British Columbia
Here is a cleaned up version of the code saved in txt format. I have only run this version on a breadboard on the bench. Works ok on the bench. I have not included a schematic for this stripped down code. My board is heavily inspired by the 3rd version Hitachi ignitor(12-03), using the input and output circuitry without the sidestand relay connection. I believe there may be a copy of that schematic on the forum somewhere. If you can't find it, I can supply that as well. I used general purpose 2n3904 bjt's and a ST901 for the darlington driver transistor.
The program is similar to the old style TCI boards in that the timing begins with the P2 pulse. In the old ignitor board, an integrator (analog) signal is started by the P2 pulse and latched by the P1 pulse. The slower the rpm, the higher the analog voltage. In this digital design a count is made from P2 to P1. Based on this count(speed) an ignition delay is determined using an algorithm. The ignition fires after P1. At P2 the same speed value is used to determine a delay to energize the coil (dwell delay).
 

Attachments

  • ignitor82.txt
    6.4 KB · Views: 51
Last edited:

sleddog83

XS650 Addict
Messages
160
Reaction score
289
Points
63
Location
Vancouver Island, British Columbia
The latest version of arduino tci is working great. Took it out for a couple of test rides... no hiccups or hesitation....ran flawlessly. Will leave it on the bike for the next month and watch for any issues. The current proto-board version eliminated some of the extra unnecessary circuitry and has some minor tweaks to the code. The arduino tci is a straight swap over from the original tci. Don't need to make any changes to pickup coils or wiring. My original tci is still bolted to the frame but disconnected (now a backup module) and the arduino tci is wrapped in an antistatic bag and stuffed in the tool cubby hole. I will start making a printed circuit board later this summer as long as the current design keeps working. I will likely make a handful of boards, but if there is any interest I will produce more. I promised a Beta tester already. Will post a video or two later.
 

Jan_P

XS650 Guru
Top Contributor
Messages
1,254
Reaction score
1,995
Points
163
Location
Sweden
The latest version of arduino tci is working great. Took it out for a couple of test rides... no hiccups or hesitation....ran flawlessly. Will leave it on the bike for the next month and watch for any issues. The current proto-board version eliminated some of the extra unnecessary circuitry and has some minor tweaks to the code. The arduino tci is a straight swap over from the original tci. Don't need to make any changes to pickup coils or wiring. My original tci is still bolted to the frame but disconnected (now a backup module) and the arduino tci is wrapped in an antistatic bag and stuffed in the tool cubby hole. I will start making a printed circuit board later this summer as long as the current design keeps working. I will likely make a handful of boards, but if there is any interest I will produce more. I promised a Beta tester already. Will post a video or two later.


Yes Sir Congratulations
Sounds very promising. Depending on further development ..( if working ) price and so this is something I would be interested in
Hardware and Software
If you want money up front that can perhaps be possible I think..
 

sleddog83

XS650 Addict
Messages
160
Reaction score
289
Points
63
Location
Vancouver Island, British Columbia
Yes Sir Congratulations
Sounds very promising. Depending on further development ..( if working ) price and so this is something I would be interested in
Hardware and Software
If you want money up front that can perhaps be possible I think..
Jan
Sorry, I should have replied sooner. At this stage I was only thinking of providing the blank pcb. The cost of making a few extra printed circuit boards would be negligible and I would make them if I can. It would be up to you to buy your own parts and populate the board. I would also supply the latest version of code. Incidently, I ran into a couple of problems with the current design after my last post, which resulted in some changes and hopefully improvement to the code. I am currently trying design some different tools for monitoring the ignitor while in use.
I have not failed. I have only found 10,000 ways that won't work. T.A. Edison
 

xjwmx

It's just the unknown.
Top Contributor
Messages
7,662
Reaction score
3,752
Points
313
Location
U.S.A.
I have checked that evaluation board costs about $ 15
Question -How would that perform as a plug in board on an XS 650
putting it in a box. As an ignition system.
I have not read the specs.
But i am assuming ports and scaling and so already there
The code is on the way .
Wonder if that board with some Shielding and Electronics .. Can do it
Sorry, just now noticed this. It should work. You could swipe Pamco's output transistor, check its data sheet and look up info for biasing it appropriately. But I used that board because I took a class on it five or six years ago. It's outdated now, relatively hard to use, and also a bit of overkill. I'd probably look into Arduinos, which is what people tend to work with in general these days. I have two TCIs, two pickups, two rotors with magnets, and like how it works, personally. I have too many hobbies to get involved in it. That speeduino site looks very interesting if you could get in with them
 

sleddog83

XS650 Addict
Messages
160
Reaction score
289
Points
63
Location
Vancouver Island, British Columbia
Here is the latest version of the arduino TCI. After my initial successes it stopped working. It ran flawlessly for about four bike runs, then became mostly intermittent if not dead. One of the main issues was that it would not run below a certain RPM. If the battery was a bit run down, the engine would not turn over quickly enough, and the ignitor would not kick in. at least that was what I think was happening. The other contributing problem was that my test jig would not function down in the low rpms. I had to rewrite the test jig software a few times. I have also reduced the chip count on the board. I went down a rabbit hole for a while trying to integrate a tach with the ignitor. I was trying to figure out how to measure the rpm of the engine at startup. My regular automotive meter wasn't helping much with engine speed measurement. Gave up on the tach project for now. Eventually I had all of the software bugs worked out(hopefully), but it was still intermittent. Tried swapping out the output transistor (ST901T) with a oem output transistor. No difference. I think the solution was in the selection of components i had for the inputs. They weren't quite right, but since my test jig was pushing in really strong simulated pickup pulses, it worked well on the bench. As soon as I plugged the board into the bike, it would only work maybe 10% of the tries. I replaced some crappy capacitors and refined some of the resistances at the input and it started working better. Like the 3rd version of the hitachi ignitor, the input transistor are on all the time. When the negative half of the pickup waveform comes into the board, the transistors shut off. If you don't have the biasing quite right on the input transistors, you run into problems. I still think I could do a better job of writing the code. I will continue to work on it. Don't pay attention to the audio on this recording. My bike actually sounds better than that. Here is the link to the video.

 

313-Matt

XS650 Member
Messages
12
Reaction score
31
Points
13
Location
Dearborn, MI
@sleddog83

I really think an arduino is a great idea to replace the stock ignition box. I fooled with it a bit in 2020, but never got a circuit that I was happy with. The short version is that my EE isn't strong enough to build a curcuit that could collapse the coil and be reliable. Then I was able to get one of the stock boxes fixed, so didn't need to. Still, it is kicking around in the back of my mind.

Would you mind sharing your circuit? (I did see the code, but - at least for me - the code is the easy part.)

Thanks!

(I was one of the ones that the GN250 did not work for. I tried 2 different boxes with no luck.)
 

sleddog83

XS650 Addict
Messages
160
Reaction score
289
Points
63
Location
Vancouver Island, British Columbia
I have been thinking of posting an update including schematics. Will get around to it later today or tomorrow. I will try to sum up what I have done. I was experiencing some reliability issues on the bike, mostly with starting it. Once it was started it seemed run okay. Also it ran perfectly on the test jig. I discovered a number of flaws(some which were flaws in the test jig software). The test jig rpm range was from about 800 to 6000 rpm. When I altered the jig code to run at lower rpms, I discovered some flaws in the ignitor code. The ignitor had issues at really low rpms. I spent a lot of time in a rabbit hole trying to figure out, just exactly what rpm the engine is turning over at when you are starting it. Never did figure that out. If anyone knows that, let me know. I have since altered the ignitor code so that it will work at extremely low rpms.
Also discovered some issues with the transistors I was using on the input of the board. I was using 2n3904 bjt s. These are an all purpose switching transistor. They worked...mostly. I could never quite get the biasing right on them. If I used the same biasing resistors that the Hitachi boards used, then the transistors were oversaturated and it would require a more negative pickup pulse to switch it. I could go into more electronic detail, but the end result was I started looking for an exact replacement for the transistors used on the Hitachi ignitor. You cannot get the originals anymore. The closest I could find was ksc1845. For anyone repairing a Hitachi tci board, these should work for replacements on the inputs for all versions of the Hitachi boards. Also had issues with cheap capacitors on the inputs.
For a while this summer I was using the ignitor wrapped up in a anti-static bag and bubble wrap jammed into the tool box cubby hole. It was perfect for about three weeks, and the acceleration between 1900 and 3100 rpm was smooth. It started every time. I then decided to rearrange the perfboard circuitry so that I could stuff it into a box. I also added a couple of refinements. It hasn't worked reliably since then. The perf board is pretty ugly now, since I have done so much desoldering and soldering on it. The atmel chip is also missing a couple of unused pins on it. It has been in and out of the socket to many times. I need to make a proper board and get a new atmel chip.
I am currently struggling with the kicad design software so that I can produce a pcb. I intend to solder the atmel chip to the board. Thinking about different ideas to enable programming of the chip after it is soldered to the board.
 

Attachments

  • new ignitor schematic.jpeg
    new ignitor schematic.jpeg
    180 KB · Views: 9
Last edited:

sleddog83

XS650 Addict
Messages
160
Reaction score
289
Points
63
Location
Vancouver Island, British Columbia
I am including some captures from my oscilloscope. Use the schematic from the previous post as a reference. I added a couple of refinements to the board to help me trouble shoot issues . The led lights up after the program has completed the setup phase. So if the the led it lit then: a) the power is getting to the board, b) the 5 volt regulator it working, c) the atmel chip is functioning enough to get through the setup portion of the arduino code.
I also send another signal out of the board. The signal goes high when the first pickup pulse is received by the processor and goes low when the second pickup pulse is received. My intention is to eventually use this to drive a tach. I bought one off amazon, but haven't had any success running it yet. The signal can also be viewed with a scope or logic probe.
By the way, people often question if their TCI boards are working properly on a low battery. This TCI board works fine all the way down to about 5.5 vdc. Which is mostly a moot point. You need a healthy 12vdc on the other side of the coil to actually get a strong spark. It has never been an issue of not getting enough voltage or current to the tci board. The old TCI boards will work on about 8.5 volts and 150mA. You still need a good battery (12vdc) to drive that ignition coil.
 

Attachments

  • arduino-tci-scpoe-trace (1).jpg
    arduino-tci-scpoe-trace (1).jpg
    126.2 KB · Views: 4

Jim

Beyond the edge is the unknown. Here be Dragons
Top Contributor
XS650.com Supporter
Messages
10,596
Reaction score
39,196
Points
813
Location
Kansas City Mo.
I am currently struggling with the kicad design software so that I can produce a pcb.
Don't know if you've ever tried TinyCAD, but I found it very easy to learn... and it does pcb exports. Link.


Untitled.png
 

Jim

Beyond the edge is the unknown. Here be Dragons
Top Contributor
XS650.com Supporter
Messages
10,596
Reaction score
39,196
Points
813
Location
Kansas City Mo.
Oops... that was a 3rd party installer I linked to. I never trust 'em.
Direct to TinyCAD here.
 
Top