GWatPE
Senior Member
Joined: 01/09/2006 Location: AustraliaPosts: 2127 |
Posted: 11:34am 18 Dec 2009 |
Copy link to clipboard |
Print this post |
|
Hi Pete,
I have looked at the current arrangement I have made, with the picaxe28X2 with the additional picaxe08M units. The control logic I have used on the 28X2 will allow control of up to 9 separate micro's. I will replace the 08M units with 14M units. This will allow direct access to a max of 63 channels. This will include up to 45 x 10bit ADC channels, and up to 18 digital channels. The 28X2 has only 24 word variable registers, so 63 channels/variables will require a different approach. I have to send a single string to the PC. The 28X2 has a 255byte scratchpad, so it may be best to build a data array, with all the XML codes and variables there, and then transmit this when the string is ready. This is doable with minimal processor overhead. I may still need to work within some 28X2 limitations.
Now that the isolation problems are gone, I can look at the best micro combinations. The 14M has 5 ADC's, and 2 digital inputs, and with multiple units, this will give more than enough flexibility with my logging. May get away with a simpler system again. The database to collate all the data may not be needed.
If I link piece all the components, this will end up a very modular system. The fully isolated inputs will eliminate a lot of the ground loop problems with recording many channels on multiple battery and AC systems.
The intention is for very simple coding in the external modules. This will be similar to the piclog, picaxe coding, but a few more channels per module. A simple loop, that waits for a read command and then transmits the data. This will not be a free running COMM system, but controlled by a master, with slave units. I use a polled COMMs with the modules and this has reduced the error rate between the master and slaves. The system requires good input filtering of the ADC inputs only. The PC COMMS are still not perfect, but at least there is spare processor power to do something about the data, with averaging and complex validation of the data before final logging.
Have to write some of the finer points down for next year. I am considering having PCB's or full boards made. This system will use a 2wire COMM and power rails between modules. I am looking at a universal logging system. Maybe <A1> to <Z2> as XML identifiers, giving 52 channels. The idea is to allow logging without needing to worry about what channel is what, until later. Gain and OFFset are all that should be required for calibration. The idea is to have all the data stored in 1 file, and then use different display selections to access required data in the file.
I have tried the separate logging approach and now that I have working systems, I see a better arrangement with logging just RAW data, and selecting what to compare. This is working well on 2 of my picaxe loggers, and this is similar to my weather station. The main task is to get a solid data file to work from. I intend to have user selectable channel names and colours, and a user channel calibration page. The channels to be looked at or graphed will be selectable, as will be the computed data like power, etc. I will be looking at a separate page with max and min values. The graph fixed limits will be selectable. I intend to have unidirectional current measurements, and if a battery is involved, then net current to or from the battery will be derived. This will simplify the zeroing aspects, with only storage of positive data values.
This is looking like a system that will satisfy my needs as well as others.
Gordon.
become more energy aware |
Downwind
Guru
Joined: 09/09/2009 Location: AustraliaPosts: 2333 |
Posted: 02:56pm 18 Dec 2009 |
Copy link to clipboard |
Print this post |
|
Hi Gordon
With so much data being input i take it you are becoming short on variables and even faster if you have to use W registers
Not sure on the eeprom capacity of the 28x2 but why not write data to the eeprom and then you can use a variable several times in program.
But!Then it gets tricky reading the eeprom and sending the data in one string as you wish to do.
Always a catch!
Why do you need to send the data in one string?
The whole polling of modules/slaves sounds like a I2C system and a protocol made for the application. Only problem is tha 08M (slave) wont work with I2C.
I know i have mentioned I2C in the past several times but think it is a protocol you are trying to create or use anyways. (Not to say there is not more ways to do it. im sure you have a plan)
When you say a 2 wire data system, is that a 2 wire data bus that is common to all slaves. (data, clock and 5+, Gnd )
How and from where do you log your time stamp.
I find it comical that we create things and make them simpler afterwards.( kinda backwards) I do it a lot to.
Thats development i kid myself.
Pete.
Sometimes it just works |