I recently had my own machine in the shop. It is a 2008 Polaris Sportsman 500 with about 4000 miles on it. It was not keeping the battery charged and the tachometer was not working. The first thing to check in this type of situation is the output from the stator.
The stator is a series of electrical windings around an iron core. The flywheel on the engine has permanent magnets in it that surround the stator and produces an electric current when the flywheel spins. The power produced is an AC voltage that varies with RPM. This AC current is converted into DC and regulated to a nominal 12 volts by the voltage regulator. This is the same basic system that is in almost every small engine.
When I checked the output from my stator with the engine running I got an erratic reading that was very low (7-8 volts) at low RPM. I then disconnected the plug coming from the stator and tested the resistance on each lead. I found that one of the leads was shorted to ground.
I pulled the side cover/recoil housing off the engine and pulled the flywheel to reveal the stator. This photo shows what I found. Several of the windings had burned insulation on them and one winding had a few broken wires. Normally this would mean automatic replacement of this part. I check around and found that a Polaris replacement part is around $500 and an aftermarket stator is about $250.
Since this is my own machine and I am trying to be frugal I decided to fix the bad stator. I cut and unwound the broken wire from the worst spot on the stator. I then splice the remaining ends together and reassembled it. When I fired the engine up it started charging fine. The burned insulation on the other windings has me a little worried about the lifespan of this part, but I think it should be ok for a while. I may look around for a good used one to replace it with.