Readadc voltage from generator

Simbad

New Member
1)I will use dc motor as generator, and I want to know how much V its producing. Can I use this methode?

volts.JPG

2)If yes, what power rating resistors,zener diode, cap farad should I use for 24V 28W motor, it will be rotated to produce about 2 to 12V. If I cant use my schematic,please explaine different way to approach this

3)As I understood readadc10 is 10byte digital number from0-1023 , after resistors voltage devider it will be 3.75V that is real 12V motor generated Volts, 3.75V in digital convertion is 767 readadc10 value, so if readadc = 767, that means motor is producing 12V? (1 readadc10 = 4.9mV?) Picaxe power supply 5v.
 

AllyCat

Senior Member
Hi,

I would also put a capacitor directly across the motor output, unless I could check (with an oscilloscope or maybe capacitor-coupled ac multimeter) that the "dc" is reasonably "clean".

I doubt if that circuit will read accurately above about 6 - 8 volts because of leakage through the zener. I posted the zener curves up to 4V3 a few days ago in #9 here and a 4V7 is similar. Your 22k resistor will only deliver about 400uA (from 12 volts) so you need the zener leakage to be below (say) 10 uA (or far lower if you want accuracy equivalent to 10 bits A/D) which is impossible to predict from those curves (the first calibration line is at 10 mA. With the values shown, power dissipation ratings would be neglibile.

My design would assume a maximum voltage on the PICaxe pin of say 2.0 volts, thus 10 volts across the upper resistor, dissipating say 100mW (comfortable for a typical "1/4 watt" type), making it 1k ohms (P = V*V/R). Thus the lower resistor could be 200 ohms. On many PICaxes you can use an internal 2.0 volt reference voltage for the A/D converter, but IMHO there are many other factors you need to consider before getting an accuracy that justifies using 10 rather than 8 bits.

You may want to measure the "loaded" voltage as well, which would need a load resistor rated to however much power you're hoping to generate from the motor.

EDIT: If the PICaxe has a 5 volt regulated supply, then perhaps the best way to use the zener is to run it nearer its "nominal" current (5mA) with a resistor to the supply rail, perhaps 100 ohms would be about right. Then clamp any excessive input pin voltage to this via a small silicon diode (anode to divider resistors, cathode to the zener diode). This should prevent any overvoltage being "dumped" into the supply rail but not affect the accuracy of the divider chain below about 5 volts on the input pin.

If you only intend to make one (or an occasional) measurement with the PICaxe then you probably need a large filtering capacitor, perhaps hundreds of uF, but maybe less with the resistor values you originally suggested. However, as the "dc" voltage waveform (ripple) is unknown (unless you have a 'scope) then this is a good opportunity to analyse the waveform characteristics. Use a fairly small capacitor (perhaps 10 - 100nF) and make multiple A/D measurements in a loop (e.g. FOR b1 = 0 TO 255 : ....) and calculate Average, Maximum and Minimum voltages. If you're more ambitious you might even calculate the RMS voltage and/or the ripple frequency.

Cheers, Alan.
 
Last edited:

SAborn

Senior Member
Being a generator i would expect it to be connected to a battery, in this case you will be reading battery voltage and the generator charging the battery.
With a battery in the circuit you will not need a cap across the output of the generator as the battery will clamp the voltage.

Yes your circuit will work but remove the zener as it is not needed and will cause problems with linear readings.
READADC10 is your best option, so as to keep the resolution high to allow for better in program calibration.
Every chip and ADC input of a chip will have a slightly different adc reading so there is no exact calculation of adc to voltage and you will need to calibrate the voltage in the program.
Any standard 1/4 watt resistors will be fine and your cap will need to be small 0.1 to 1uf as the cap will slow the response time to changing voltages.

Ensure the generator/battery negative and 5 volt picaxe power supply negative is connected together to form a common ground if the picaxe is powered from a difference source other than the generator battery.

What you are doing is commonly used for wind generators and in my case i monitor a 500ah 24 volt battery bank using this method and all data is then sent to a computer for logging.

What is it you want to do with the generator and the voltage readings?
 
Top