Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
Hi, having ported the piclog to an avr and the code to C I then found the charge controller and redid it for avr as well. But having done up the schematic it seems the 2 units both do some of the same jobs and cannot really work together, so a new idea for comments.
Why not combine the best parts of the piclogger and charge controller into a slightly bigger pcb and do all the functions in one unit and have a single rs232 lead going to PC as well as buttons and LCD on the unit. I would also add a few temp sensors to monitor batteries or rectifiers and outside temperature as well as stuff for the winddirection.
I figure goto an atmega32 to have room for extra code and lcd and the extra i/o needed. Replace the shunt resistor with the hall sensor board? maybe drive the fets with a simple fet driver for easier pcb and leave the relay output as well as an alternative.
The VB apps works well and would just have to be changed for the extra inputs, seems this is not too hard. And my last thought is to make a cooler dashboard type interface for the pc side with the extra functions added.
Ok you guys have the experience, i don't even have the slightest breeze right now and wanna do something. Would be nice to know wat you guys actually want , maybe i just have crazy ideas and should find something else to do?
RossW Guru
Joined: 25/02/2006 Location: AustraliaPosts: 495
Posted: 03:33am 30 Oct 2006
Copy link to clipboard
Print this post
Funny, I'm part-way through designing one here too, same sort of things, same sort of reasons!
1. ATmega32 sounds like a good start. I was going to use
90S8535 because I have plenty left.
2. I was going to make mine monitor at LEAST two current
sources into the battery, one from PV, one from the
wind turbine.
3. Monitoring current to/from the battery by measuring
voltage drop across the battery lead.
4. To produce a "fuel meter" that others in the household
could use to see how power was going against trend
5. To show instantaneous power from PV, Wind and daily
cumulative watt-hours or amp-hours.
Monitoring temperature from a few points quite desirable. Thermocouples probably too much mucking about, thermisters are cheap and convenient, and with a simple 3rd-order polynomial can be made quite useful. (will offer sample code if you like)
I was going to use either 16x2 or 16x4 LCD char displays because I have them lying about, and RS232 will do for comms.
Measuring battery volts good also. As for the environment stuff, not sure if its actually worth re-inventing the wheel - there are lots of decent weatherstations all ready made and calibrated for $100 to $200, including anemometer, windvane, temp/humidity inside and out, barom pressure and a toy raingauge.
Driving FETs, probably easiest to use logic-level N-channel ones, no interfacing required :)
My only real criteria is that I want it to run off a nominal 48V system!
domwild Guru
Joined: 16/12/2005 Location: AustraliaPosts: 873
Posted: 04:32am 31 Oct 2006
Copy link to clipboard
Print this post
Hi,
Must stick up for the Picaxe here! Any PIC can be used and to have more code, one just has to go up in numbers to the larger Picaxe models. "The tastes are different" said the farmer who kissed his goat!
Ross: Am intrigued by the 3rd order poly. Is the reason for this poly. the fact that it is not a linear relationship in the correlation??
Thanks.
Taxation as a means of achieving prosperity is like a man standing inside a bucket trying to lift himself up.
Winston Churchill
RossW Guru
Joined: 25/02/2006 Location: AustraliaPosts: 495
Posted: 04:47am 31 Oct 2006
Copy link to clipboard
Print this post
Yeah, valid point.
Exactly. The resistance changes with temperature at a rate that changes with temperature.
Here was my original proof-of-concept code in basic for the AVR.
' Assuming the thermistor is connected from ground to a bias point,
' which is the same resistance as the T(25) value of the thermistor
' and we know the beta value, a very-close but easy conversion is:
' T = (beta/(log[e]( adc_value / (1024 - adc_value) ) + beta/298.15 ) - 273.15
Function Thermistor(byval Ch As Byte , Beta As Single) As Single
W = Getadc(ch)
Scratch = W
W = 1024 - W
Temp = W
Scratch = Scratch / Temp
Scratch = Log(scratch)
Temp = Beta / 298.15
Scratch = Scratch + Temp
Scratch = Beta / Scratch
Scratch = Scratch - 273.15
If Scratch < 0 Then Scratch = 9999
Thermistor = Scratch
End Function
RifRaf
Newbie
Joined: 15/10/2006 Location: AustraliaPosts: 32
Posted: 05:11am 31 Oct 2006
Copy link to clipboard
Print this post
pic pic pic, sorry i prefer avr and have no room for a pic in my tool box, oh apart from the few samples i had for practicing tqfp soldering to save my avrs :)
like you say different strokes but while i am spending 16 hours a day on this it shall be avr for me :P
rossw, would be happy to see where you are upto and share ideas, have been looking at ways to make it 12/24/48 Volt compatible. the atmega8 version has been logging fine for days now. have just got a few hall sensors and am gonna starting mucking about with them, have a friend that is trying as well, never used these before so should be some fun.
domwild Guru
Joined: 16/12/2005 Location: AustraliaPosts: 873
Posted: 05:54am 01 Nov 2006
Copy link to clipboard
Print this post
Ross,
Thanks for that. Re 3rd order poly.: This is where the Picaxe may possibly fall down, because it may not have a log function. It certainly does not handle real numbers, integers only.
Looks like Lord Kelvin is in the formula.
Taxation as a means of achieving prosperity is like a man standing inside a bucket trying to lift himself up.