![Wink :wink:](./images/smilies/icon_wink.gif)
I'm working on the Master Proportional Charger control at the moment. Got my asus eec pc thingy very neat, loaded picaxe editor etc. Do you think wife will notice if I take it on holiday with us soon?
![Shocked :shock:](./images/smilies/icon_eek.gif)
Moderators: GregsGarage, retepsnikrep
retepsnikrep wrote:Got my asus eec pc thingy very neat, loaded picaxe editor etc. Do you think wife will notice if I take it on holiday with us soon?
retepsnikrep wrote:Have a go at some new code Greg by all means. I'm not convinced your proposal is better than what we have with the new formula, but you may be able to persuade me![]()
Code: Select all
`Variables Constants and I/O definitions
`Variables 16bit
symbol RefADC = w1
`Constants
`Calculate voltage parameters with formula 63200/[var]*2
symbol MaxVOptoOn = 337
symbol MaxVOptoOff = 351
symbol LoadOn = 351
symbol LoadOff = 356
symbol MinVOptoOff = 506
symbol MinVOptoOn = 527
`Pins used for I/O and designations
`*** Digital high/low Outputs ***
symbol Load = 0
symbol HighOpto = 2
symbol LowOpto = 4
`*** Analogue ADC Inputs ***
symbol RefInput = 1
Main:
readadc10 RefInput, RefADC
if RefADC "less than" MaxVOptoOn then
low HighOpto
endif
if RefADC > MaxVOptoOff then
high HighOpto
endif
if RefADC "less than" LoadOn then
high Load
endif
if RefADC > LoadOff then
low Load
endif
if RefADC > MinVOptoOn then
low LowOpto
endif
if RefADC "less than" MinVOptoOff then
high LowOpto
endif
goto Main
retepsnikrep wrote:A bit of reverse logic reqd as it works backwards as well with higher numbers from ADC = lower cell voltages.
A spread sheet that worked out these values for you/us would be good. What I know about excel you can write on a full stop.
Your right, it is better to leave the digital slaves as they are.It might not work for the Digital Slaves as that only has one byte to transmit the cell voltage to the Master.
Also the Master would have to work a fair bit harder to re-create the actual voltages for display and calcuation purposes if it only got the raw adc data. At the moment it just performs a simple addition adding 175 to the the transmitted data to get the CellV. The Slaves do the donkey work and actually do the calculation of the CellV at present.
Yes I think you can use this for your own application, but I think the actual cell voltages are easier to understand for the average punter. It would be easy to make a costly mistakeWe may save a cpu few cycles and a few ua but it's quite a lot of effort.
Peter
Hi Peter,
Thanks for your interest in CANTOP. I'm glad someone out there found it =).
In response to your request, CANTOP could probably be modified to work for you--though let me explain a little bit how it works before I get into that.
CANTOP is built around a server/client architecture where the server is written in a platform independent language (JAVA) and the client can be written in any language that implements TCP sockets (network). The client that I have written (the graphical part) is written in a language called QT, which is technically platform independent, so long as that platform provides a distribution of QT. I don't know if the palm pilots you are referring to implement QT, but the client could be rewritten in any language.
That said, it would probably make the most sense to use a modified CANTOP server backend (written in JAVA, which already has serial support) to do the parsing, and then write a new client frontend (the graphical part) in a language that is supported by the hand-held device.
While this all sounds interesting, I'm afriad I don't have time to be too involved in this process.
Please let me know if you have any questions, I will try to provide you with the resources to get you started if you want to persue this idea.
Thanks!
Andrew
Users browsing this forum: No registered users and 9 guests