Data logging project

synertronik

New Member
Hi all,
I have a data logging project with picaxe slaves over rs485 network, and i have a data logging software installed on the host computer (master) that assigns a different serial port for each slave. I need a picaxe code that can select any virtual port via serial connection and will communicates with them. I will appreciate your help with this.

Best regards.

Sandy.
 

inglewoodpete

Senior Member
I am not an expert on the use of RS485 with PICAXE, although several members have used it. Before we get too far down the path, which model PICAXE are you planning to use? Since you plan to use RS485, this will require the use of serial comms and different models have different capabilities. Eg the X1 and X2 models support background serial reception, which allow a more flexible use of the microcontroller.
 

womai

Senior Member
The Picaxe itself does not know which serial port the PC assigns to its connection. That's a thing only the PC program needs to know. Can you explain a bit more what this code is supposed to do? Maybe I misunderstand what you are trying to do.
 

Paix

Senior Member
Normally I would expect multiple slaves to communicate with one master node occupying one serial port.

Each slave should transmit a node identifier in order that the data received by the master can be logged into a single log file, in the form IDENTIFIER <timestamp or serial number and data sample> (EndOfLineFunction).

Alternatively the identifier could be used to steer the received data sample to one of a number of log files through the use of output redirection on the PC.
= = =
I have a number of questions that I would like answered, if you will please Sandy.

1. Is the logging software self written or commercial/open source. If not self written can you please identify it, preferably with a link, so that we can have a look at it's functionality?

2. Are the slaves controlled by the PC master node and if not how do you plan on preventing more than one slave transmitting at the same time?

3. How frequently are samples expected to occur? From each slave node.

4. How many slave nodes are you anticipating to put on your RS485 network?

5. Which RS485 devices from which manufacturers have you considered? This is likely to indicate how much RS485 research may or may not have been undertaken already.

Without the answers to each of these five questions, I will bow out of the thread and merely watch silently.
 

synertronik

New Member
Hi paix,
the data logging project has the following characteristics:

1) RS-485 daisy chained 32+ slaves.

2) Each slave have humidity and temperature sensors, an 20x2 microcontroller, i2c eeprom, rtc, lcd display, NKM2401 chip (to ensure better comunication), and SN75176 transceiver.

3) Each slave will have an unique adress.

4) All slave comunicates with the pc via an interface (wiht a NKM2401 chip and a SN75176 transceiver), to provide reliable link.

5) The data logging software poll each slave sequentially, and saves data from each slave in a separate file with time stamp, for prior graphical analisys.

I have the CPS (www.programbl.com) data logging software demo , but it have not the architecture to easily manage the project. I will appreciate your help to find a logging/networking software that fits my project and/or any suggestion.

Regards,

Sandy.
 

Paix

Senior Member
Master:
PC logging software

Slave:
20X2 micro controller
humidity sensor
temperature sensor DS18B20
RTC DS1370
I2c eeprom
LCD display

RS485 transceivers are all SN75176

NKM2401 chip for better communication

The slaves seem to be exceptionally well endowed, with a comprehensive inventory of parts.
I have to question the use of NKM2401 Manchester coding/decoding chips, which are primarily intended for radio work.

RS485 transceivers are specified for reliable communication over a maximum distance of 1.2km and at relatively high data rates.

NKM2401 infers that the data rate of data in and out of your network is at 2400 baud.

I'm glad that the whole thing is working other than the communication with the PC, as it seems rather ambitious in the extreme. I would certainly like to see a photograph of one of the completed slave nodes.

I would suggest that the PC needs only to be able to poll the slaves and write the response data to a file or files. Personally I would write records to only one log file, perhaps swapping the file periodically. Maybe each day a new file with the date as part of it's file name. That way, if the data file was comma delimited, it could be relatively easily uploaded to a database if required or parsed to extract whatever reports might be needed. DTBTGTTS. Of course setting 32 Real Time Clocks must pose a bit of a problem, with a default of 01041970 I suppose, and trolling the data as eight byte packets must be a bit of a constraint on the project though. As must the use of a demo version of your logging software.
I would start out by using Kermit, or a similar free program, to speak to the master node through a level shifter to convert to and from RS232 to TTL in order to speak to the node RS485 transceiver.

@Srnet, I would think that the project is probably very much in the pre-planning stage.
a1000.jpg

http://www.programbl.com/
 
Last edited:
Top