analogRead DC Motor - Negative value I was trying to play with Arduino this weekend and connected a DC motor to A0 and GND to measure the voltage it provides when I rotate it. 

However,
when I rotate the DC motor with my fingers to test out the readings I see that when rotated clockwise it generates voltage that can be read in Arduino. But when I rotate it counter-clockwise the values I get are 0 - this is probably because DC motor generates negative voltage (?).

How do I fix this so that no matter the direction of the turn I get always positive value?

I am trying to build a simple anemometer, just for fun for kids and plot the values, however can't do much when I get 0 on analogRead when wind blows from the other direction..



thanks for any input into this.
You can use full wave rectifier, but there is a significant voltage drop on it.

Another way is using Voltage divider to provide 1/2 Vcc to one of the motor terminals. But then you can measure just 1/2 Vcc in both directions (without another Voltage divider)

Something like: