serial to PC instead of SD card logging

My queueing project is working, recording data from 7 units via wireless links.

I am not happy with the SD card reader for logging , partly becuse I think the time it takes to write each time is making it miss some of the incoming data, and partly because there is no realtime info.

I want to change it to a simpler system that outputs a serial CSV string to a PC via a RS232 serial link, every time a button is pressed.

I am just learning about Serial comms.

Can I just use TXD and RXD through a MAX232 level converter to a 9pin serial connector ?

In fact can I just use the TXD ( I want to use the RXD for one of the radio link inputs )

Just need a bit of guidance before I fire up the soldering iron...

You only need a RS232 if your computer doesn't have a USB port (which also provides serial communications). So if your currently using an Arduino with an RS232 port to load your sketches to continue to use that port for receiving your CSV file; however, if you are already using a USB port to program your Arduino, it would be fine for serial communication as well.

Now, your assumption that you can serially transmit your 'log' via a csv file (which means converting values to text) via a serial connection is faster than logging via SD is problematic. Writing to SD can be faster. One you can easily write raw data without converting to text (which you can also do with serial communications) and second there are a number of threads on how to optimize for speed.

A major technique for immproving SD speed is to write buffers of data that measure 512 bytes, rather than individual records. This only adds a little complexity to your code.

Thanks Wanderson, very interesteing about the packet size for saving on SD cards, I will try that on another project I have that uses cards.

Now its up and running, I see this project needs the realtime data to a screen.

I am using the 328 chips on small pcbs ( I just use the Arduino for testing and programming ) and the RXD pin of this logger unit I am using to receive from the 2.4GHz receiver, ( I could change that to a SoftSerial pair of pins )

If I have a D9 serial connector, do I need to connect more than TXD and ground ? ( I am not sure about the RTS and CTS etc pins )

If you are not planning on using hardware flow control you only need to connect ground to ground and the tx on the arduino to the rx on the pc serial port.

Does you computer not have a USB port? How are you loading sketches to your arduino?

I am not using the Arduino for the project, just the 386 on a minimum pcb, so USB would be a bit more complicated than a simple MAX232 chip to connect to the monitoring PC ?

Boffin1: I am not using the Arduino for the project, just the 386 on a minimum pcb, so USB would be a bit more complicated than a simple MAX232 chip to connect to the monitoring PC ?

You could use a ftdi adapted/cable which would let you both program and serial through usbb of course the 232 will work as well. The ftdi just requires a 6 pin header and unlike the max232 no other components. It is a little more expensive but can be more easily used with other projects.

The ftdi cables are expensive here, and I am sending the complete prototype unit to a friend upcountry, so if they have a simple terminal program ( like MegunoLink ) and set it for 9600 and no handshaking .will they be ok with just my sending a string via the TXD to the PCs RXD in ( at the right level ? )

It will generally only be a couple of times a minute I guess.

Presumably they can either check for serial in every loop ?

PS John Boxall in his excellent Tronixstuff course suggests using MegunoLink as a data logger instead of the SD Card ( obviously if there is a PC handy )

Ok its working well, setup Newsoftserial for tx and rx, and it runs fine on port1 ( or my serial/USB adaptor I forgot I boght a while ago )

The data logging software on MegunoLink is very good, you can even draw graphs realtime on your PC from data from the Arduino. I am going to make a donation for the software.

Mine is a stand alone project that I am making for someone upcountry, so I must work out if I can send them a copy of the MegunoLink software, plus AVRdude ( which it needs ) rather than the whole Arduino program ...