I'm trying to measure AC voltage from a dynamo hub (6V 3W AC), I really just want some method of tracking how many peaks there are and extrapolating the wheel speed. For now I'm going to power the arduino separately, I have read that negative voltages may damage the arduino, so I'm not sure how hooking it up to the AC hub would work. Any help would be great.
gime:
I really just want some method of tracking how many peaks there are
Then you want to measure the frequency. It's easy with a zero-cross detection circuit connected to Arduino. There are many examples on the web.
Do you have any information on the hub ? (a link or datasheet ?)
I'd be inclined to rectify the AC, then use that through a hall switch to get a pulse each rev of the wheel.
Much easier and much more accurate.
Optocoupler with series resistor and reverse diode across its input, output to Arduino using internal pull-up.
Fully isolated, output at dynamo frequency with not far from 50% duty cycle.
Do not be tempted to use interrupts for such a trivial function. Just poll it.