Start by measuring the peak voltage (at maximum RPM) with a volt meter. Then use a voltage divider (two resistors) to divide that peak voltage down to a voltage that is safe for the Arduino (i.e never greater than 5V).If you don't already have a digital multi-meter (for measuring volts, amps, ohms. etc.) you should have one if you are going to do any experimenting with electronic circuits. They can be found for as little as $5 if you shop carefully.
After you determine that your voltage will be below 5V, or can be divided down to remain under 5v, than you can connect it to one of the analog inputs,read itvalue = analogRead (A0);for example, and then send it via serial/usb connection to the PC and see it on the serial monitor in the IDE:Serial.print("motor value ");Serial.print (value, DEC); // result will be a number from 0 to 1023 with 1 = ~4.89mV (or, 5V/1023).If you want it as a voltage, multiply it out, see FLOAT type variables in the reference sectionfloat voltage = ((value/1023)*5); // does the math with decimal placesSerial.print (voltage, 2); // prints a number with 2 decimal places, ex 4.35 This presumes you have the basics of your sketch setup also, which I didn't go into.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16