Hello Alex and all,
This is an interest of mine and so reading this thread has grabbed my interest.
I'll try to keep this short if I can possibly do so.
Firstly, Alex I see this thread was started some time ago in May of 2012, could you tell us more exactly what you have, in terms of what the generating source is, its characteristics.
I assume you are using a DC generator, maybe some form of motor being used as generator, is this correct?
Is it a permanent magnet type or is it more like a car alternator type?
If it is a PMA, then it will have a brushed commutator on the rotor.
If it is an alternator, such as from a vehicle, then it will essentially produce an AC 3 phase waveform and that maybe be internally rectified to produce a DC output.
Can you tell us the nameplate figures on the generator, such as Volts, Amps or anything else. What power is this generator?
So, it is important for us to understand exactly what you have and also more specifically what you are wanting to achieve with this project.
The battery or batteries, again, more information is needed about what you have.
I understand you are designing with 12 volts in mind, are they lead acid, flooded or gel.
What capacity is the battery system, is it made up of one battery or a number of batteries either in series or parallel or both?
OK, so when we understand these things, we then have a set of parameters to work with.
But, let's go on a little further.
Looking at your circuit diagram, the first thing that struck me is that you are using a mechanical relay to do the switching between the output load, I assume battery, and the dump load, is this correct?
And that the Arduino will measure the battery voltage and thus control the relay via the transistor, Q1.
My suggestion would be to replace the relay with a piece of silicon, either a suitable transistor or preferably a MOSFET.
I note that in one of your posts you mention wanting to use PWM to charge the battery.
If this is your intent, you will most definitely need to replace the relay with a suitable solid-state switch as mentioned above.
What you may want to do then is to look at using a PID loop controller to drive the PWM that controls the solid-state switch.
The PID loop controller code can be found on the Arduino playground as I recall.
What you do is feed the PID with certain parameters and have its resultant output configured correctly to drive the PWM code.
So, you will have essentially two inputs into the PID controller, one will be the representation of the battery voltage as read in by an analog input on the Arduino.
The second will be a representation of the desired battery voltage, the setpoint as we call it.
The PID, when configured correctly will drive the output in such a way that it will want to see the actual battery voltage equal to the desired setpoint voltage.
That is, no error. At that point, and under ideal conditions, the output will remain constant and hence will supply a constant value into your PWM code.
The PWM driving the MOSFET or what ever will be switching a constant rate with a constant PWM period at this point.
When the battery voltage falls, the PID will drive the PWM to adjust its duty cycle ratio.
If you are controlling energy to the dump load then you will want to have the PID extend the PWM duty cycle ratio, and conversely, as the battery voltage rises, the PID will drive the PWM to decrease the duty cycle ratio.
If you are controlling the energy to the battery the you configure the opposite to occur from above.
Now, your dump load, I see you are using a 4.7Ω resistor, is it rated for the correct power rating of your design?
Somewhere I read you are wanting to achieve around 150 Watts, so, you will need to make that resistor large enough to take the full power as delivered by the generator plus more.
If the generator nameplate figures lead you to believe it has a capacity of 150 Watts, then I would suggest you have the dump load have a power capacity of at least 150 Watts + 25%, so a capacity of around 200 Watts should be fine.
This is essential, as if you underrate your dump load power capacity, you run a higher risk of destroying it over time through fatigue.
Make sure the dump load has adequate cooling, a fan that can be controlled by the Arduino maybe.
I say this is essential, as if the dump load were to be destroyed then you will have a worrying situation in that the generator suddenly becomes unloaded.
An unloaded generator without any mechanical or other governing system will then inherently want to speed up, and may quickly exceed its run away speed.
That is, faster than its design speed and where things start to fly off in all directions.
Before this, the generator will most likely ramp its output voltage up and exceed its design ratings and also the voltage ratings of your circuit.
I see you have a fuse there, great, but this will only blow on over current, not on over voltage.
So, if the generator were to overspeed for any reason, then the higher voltage may be concerning for your circuit even before the fuse decides to blow.
Lastly, I understand you wish to derive the generator rpm from somehow from the actual generated volts, is this correct?
I see a problem in this as you effectively have the generator connected across a load, being a battery or the dump load.
So, I am unsure how to go about resolving the generator speed from this.
Better would be to use some other method, such as an either an optical or inductive proximity sensor on the generator, and then feed this signal as a digital pulse train into the Arduino for processing.
mgshightech, it seems you are interested also in such systems?
Now a small plug in here to show what I am doing and hopefully to show what can be done with an Arduino and a bit of time.
As Graynomad and one or two others know, I have and am still in the stages of building my own system for renewable, remote area power system.
Instead of a wind turbine, I run a hydro turbine, driven by water instead of a sometimes fickle wind.
It's what powers my computer right now, activating all the electrons inside and sending them to the forum.
In addition I also have solar panels.
It is web based and is quite a project and there is still much for me to do in terms of actual hardware and also software, but it is a start.
If you wish to take a sneak peek then point your browser to http://paulalting.com
(purposely not wrapped in hyperlink tags, but alas the forum software is too smart)
Head to the 'Hydro-Solar' tab to have a look.
For most of the data, it grabs it directly from my Arduino mega at my home here. It has onboard ethernet and is connected to my router directly.
The Arduino is using the techniques I have talked about above in regards to PID and PWM.