livefreediefree
New Member
Lol, the title says it all.
I thought I was clever, that was until I scrambled my arduino to bits.
I added a speed sensor to the bike and processed it into the arduino. (No problem there, worked perfect)
I then added a standard relay (rated at 230vac or so) in series on one of the wires coming from the magneto to the CDI (I think I went wrong here)
So for background, my arduino nano board script basically says, if the 50cc bicycle speed exceeds 15mph open the relay before the CDI to kill the spark plug, essentially turning off the motor. I shop tested this configuration without the motor or magneto going, and it was working fine... when free spinning the wheel by hand with the bike in the air, the relay would start closed as it should and open when the speed reached 15mph. Great I thought! But when field testing on the actual bicycle it was acting erractic. Relay was latching in closed or staying close no matter what or staying open no matter the speed.
SOOO when I went back to the shop to troubleshoot and diagnose, and I saw the arduino was scrambled to bits and I had to reupload the entire script. I've never saw that with an arduino before, I've seen shorts, memory errors, etc, but not a corruption of the uploaded program. I slept on what went wrong and the next day came back for a test (that was today btw). When I woke up I thought... high voltage acts in strange ways on microcontrollers!!! Especially if it was escaping the relay which is only rated for 230vac. I figured maybe the magneto was putting out more voltage than I originally thought. I know spark plugs use 10,000 to 20,000 volts, but I just figured the CDI was what stepped up the voltage (I think this was my error) and the magneto wires before the CDI would be lower voltage. I'm pretty sure these little magnetos with their secondary coils still put out a ton of voltage.
Well sure enough, I idled the motor and took a voltage reading on my meter (between the two wires between the magneto and CDI) and it OL Overloaded the meter even though it was set for Vac and at the max range. :0 [pic attached, turned motor and meter off]
So I'm pretty sure this is what scrambled my arduino microcontroller. Obviously, a basic relay can't switch +10,000v.
Question #1) So bros, does the magneto and it's induced coil actually put out thousands of volts to feed the CDI which then feeds the spark plug? I thought it was 12 or 6v, lol
Question #2) I still need to electrically be able to turn off the spark plug with some type of relay. I know they sell high voltage relays but they cost like $25-80. If this thing is putting out thousands of volts then that would make me believe it steps the voltage up with a primary and secondary coil. It'd be easiest if I could just break into the primary coil. However I'm looking at the wrapped up coil and can't quite figure if the primary is even accessible. Does anyone know which connections are for the primary coil? [Pic attached]
Thanks!
I thought I was clever, that was until I scrambled my arduino to bits.
I added a speed sensor to the bike and processed it into the arduino. (No problem there, worked perfect)
I then added a standard relay (rated at 230vac or so) in series on one of the wires coming from the magneto to the CDI (I think I went wrong here)
So for background, my arduino nano board script basically says, if the 50cc bicycle speed exceeds 15mph open the relay before the CDI to kill the spark plug, essentially turning off the motor. I shop tested this configuration without the motor or magneto going, and it was working fine... when free spinning the wheel by hand with the bike in the air, the relay would start closed as it should and open when the speed reached 15mph. Great I thought! But when field testing on the actual bicycle it was acting erractic. Relay was latching in closed or staying close no matter what or staying open no matter the speed.
SOOO when I went back to the shop to troubleshoot and diagnose, and I saw the arduino was scrambled to bits and I had to reupload the entire script. I've never saw that with an arduino before, I've seen shorts, memory errors, etc, but not a corruption of the uploaded program. I slept on what went wrong and the next day came back for a test (that was today btw). When I woke up I thought... high voltage acts in strange ways on microcontrollers!!! Especially if it was escaping the relay which is only rated for 230vac. I figured maybe the magneto was putting out more voltage than I originally thought. I know spark plugs use 10,000 to 20,000 volts, but I just figured the CDI was what stepped up the voltage (I think this was my error) and the magneto wires before the CDI would be lower voltage. I'm pretty sure these little magnetos with their secondary coils still put out a ton of voltage.
Well sure enough, I idled the motor and took a voltage reading on my meter (between the two wires between the magneto and CDI) and it OL Overloaded the meter even though it was set for Vac and at the max range. :0 [pic attached, turned motor and meter off]
So I'm pretty sure this is what scrambled my arduino microcontroller. Obviously, a basic relay can't switch +10,000v.
Question #1) So bros, does the magneto and it's induced coil actually put out thousands of volts to feed the CDI which then feeds the spark plug? I thought it was 12 or 6v, lol
Question #2) I still need to electrically be able to turn off the spark plug with some type of relay. I know they sell high voltage relays but they cost like $25-80. If this thing is putting out thousands of volts then that would make me believe it steps the voltage up with a primary and secondary coil. It'd be easiest if I could just break into the primary coil. However I'm looking at the wrapped up coil and can't quite figure if the primary is even accessible. Does anyone know which connections are for the primary coil? [Pic attached]
Thanks!