So orginally I posted this on a motorcycle forum, with hopes to get some help, but it occured to me that I would probably have better luck on an eletronics forum.
I'm going to start off with the wiring diagram for my motorcycle, it's a yamaha xt350.

Okay, and here is some background to my problem.
So recently I bought an XT350 which pretty much starts and runs perfectly. With only one small major problem, its eletrical system, surprise!
Okay so, the headlights never worked, that's problem one. Problem two, the battery never charged. Oh, it didn't come with a battery.
Naturally, I bought a battery, plugged it in, with a bit of wiring, fixing the connectors, getting some rust off the switches(she was neglected for a good year). I managed to get the turn singnals, odometer lights, tail light and horn to run off the battery, as it was wired originally. Though, the battery never got recharged from the magneto, I jumped past the rectifier/regualtor because the headlight wasn't working either.
I opened up the flywheel, found the charging coil disconnected from one of the poles(It's very thin wire) and the lighting coil has a small cut across it shorting the connections together, as well as a few fried wires. I unwound the lighting coil, just until the cuts, soldered on a fresh piece and rewound, then fixed the charging coils connector, and any fried wires. I put it all back together, and it worked, somewhat. So the lighting coil should've given me 0.39 ohms, I get 0.8 ohms. I used the same wire, don't judge me, I tried without breaking it further.
Okay, I've explained myself, here's my problem. With the regulator/rectifier plugged in, I only get 3v to my lights, yeah, an entire 3volts, which isn't enough, this is AC. So even with the rectifier/reg plugged in, guess what, still not charging my brand new battery. So I figured that's broken.
I decided to unplug the rectificer/reg, and I did, once I did, the wire to the front headlight gives off a solid 30volts. This doesn't affect the engine running at all. So here's my question, instead of buying a new regulator replacing it, and having a solid 3v going to my lights(LEDS maybe?). Could I build a working rectifier(full cycle), get a decent regulator, to run off this 30Volts, convert, say, enough for 12volts to charge my dear battery and have the rest as AC for my headlight(Its a fairly constant 30v, not much flux with rpm).
Would I run into any problems? Could anyone think of an alternative system I could use?
Do take into consideration, I'm a poor student, I'm looking for the cheapest possible outcome here vs best results.
Also, on the magneto, 4 wires lead to the cdi, and 2 not, the voltage between those 2 measures a solid 12volts, thought I'd try and connect the headlight here, just for kicks, it glows beautifully, I didn't test the difference when disconnecting these two(12v) and the headlights wires 30v output, I probably should have, I know.
So if I could do this. Say I built a fullcycle rectifier to convert enough AC to DC for the battery system to charge, could I use a LM317T voltage regualtor to regulate the DC to charge my 12v 3ah battery, would I run into any problems?
I'm going to start off with the wiring diagram for my motorcycle, it's a yamaha xt350.

Okay, and here is some background to my problem.
So recently I bought an XT350 which pretty much starts and runs perfectly. With only one small major problem, its eletrical system, surprise!
Okay so, the headlights never worked, that's problem one. Problem two, the battery never charged. Oh, it didn't come with a battery.
Naturally, I bought a battery, plugged it in, with a bit of wiring, fixing the connectors, getting some rust off the switches(she was neglected for a good year). I managed to get the turn singnals, odometer lights, tail light and horn to run off the battery, as it was wired originally. Though, the battery never got recharged from the magneto, I jumped past the rectifier/regualtor because the headlight wasn't working either.
I opened up the flywheel, found the charging coil disconnected from one of the poles(It's very thin wire) and the lighting coil has a small cut across it shorting the connections together, as well as a few fried wires. I unwound the lighting coil, just until the cuts, soldered on a fresh piece and rewound, then fixed the charging coils connector, and any fried wires. I put it all back together, and it worked, somewhat. So the lighting coil should've given me 0.39 ohms, I get 0.8 ohms. I used the same wire, don't judge me, I tried without breaking it further.
Okay, I've explained myself, here's my problem. With the regulator/rectifier plugged in, I only get 3v to my lights, yeah, an entire 3volts, which isn't enough, this is AC. So even with the rectifier/reg plugged in, guess what, still not charging my brand new battery. So I figured that's broken.
I decided to unplug the rectificer/reg, and I did, once I did, the wire to the front headlight gives off a solid 30volts. This doesn't affect the engine running at all. So here's my question, instead of buying a new regulator replacing it, and having a solid 3v going to my lights(LEDS maybe?). Could I build a working rectifier(full cycle), get a decent regulator, to run off this 30Volts, convert, say, enough for 12volts to charge my dear battery and have the rest as AC for my headlight(Its a fairly constant 30v, not much flux with rpm).
Would I run into any problems? Could anyone think of an alternative system I could use?
Do take into consideration, I'm a poor student, I'm looking for the cheapest possible outcome here vs best results.
Also, on the magneto, 4 wires lead to the cdi, and 2 not, the voltage between those 2 measures a solid 12volts, thought I'd try and connect the headlight here, just for kicks, it glows beautifully, I didn't test the difference when disconnecting these two(12v) and the headlights wires 30v output, I probably should have, I know.
So if I could do this. Say I built a fullcycle rectifier to convert enough AC to DC for the battery system to charge, could I use a LM317T voltage regualtor to regulate the DC to charge my 12v 3ah battery, would I run into any problems?