RS232- Serial Communication

This is my first time experimenting with Arduino.
I am working on a project which will require me to communicate via RS232 serial communication. Ideally, it will be a piece of equipment that will be controlled using Arduino- Start/Stop, Send/Receive Parameters etc

Which platform would you recommend for this purpose?

Thanks in advanced for the support.

Do you need hardware handshaking using RTS/CTS and so on?

The equipment will be ignoring those handshake pins. The manual explains that if If the port

cannot be configured through software to ignore the lines then the handshake lines should be jumpered

together in two different sets (4/6 and 7/8).

Thanks,

Any Arduino with a MAX232 TTL to RS232 converter board should work. Lots on Ebay.

The Mega etc. have multiple hardware serial ports which makes it easier from a programatic point of view.

Ok that is great I will look into that. On a different note, do you have if Arduino has ever been used to collect information to a SQL server?

Commercial Windows RS232 to SQL interface programs exist for $100 or thereabouts.
Do a Google search for "rs232 sql server".

You can use an Arduino in combination with an ethernet shield, connect to your SQL server and issue SQL commands or execute stored procedures on the server (be aware of security issues; best will be to setup a dedicated sql server user (login) that only has permission to e.g. run specific stored procedures to e.g. update or query (depending on needs) a table)

If you're familiar with PC programming in e.g. C#, it will actually be (very) simple to write a small application yourself, connect the Arduino to your PC using whatever hardware mechanism (serial, ethernet, ...) and let it communicate with the application that in turn communicates with the SQL server.

mikb55:
Commercial Windows RS232 to SQL interface programs exist for $100 or thereabouts.
Do a Google search for "rs232 sql server".

OP did not mention that it would be RS232; RS232 was for the communication with the device :wink:

sterretje:
You can use an Arduino in combination with an ethernet shield, connect to your SQL server and issue SQL commands or execute stored procedures on the server...

Is that possible without implementing the TDS protocol?

Is the SQL Server ISQL interface accessible via sockets?

I haven't found any examples of a small memory microcontroller talking directly to SQL Server. The standard workaround is to HTTP post the data to a Windows/Linux web server which then relays the data to SQL Server via a driver that implements the TDS protocol.

That isn't to say it's impossible, just not documented in the public domain. Perhaps SQL Server has hidden remote access features that are disabled in the version shipped to paying customers.

As far as I am aware, currently you have to use a Windows/Linux proxy of some kind that has a socket/serial etc. interface on one side for talking to the microcontroller and a TDS enabled socket/pipes or whatever interface on the other for talking to SQL Server.

I would love to be proven wrong as it would make life so much easier for everyone who has to interface microcontrollers to SQL Server.

For this project, if you are using a Mega then you will have at least one unused serial port that you could connect to the PC via a USB adaptor. Cost wise you save $5 over an Ethernet shield, but this is a drop in the ocean when you include the cost of buying or building the sockets/serial proxy software that provides the TDS connectivity required for SQL Server.

You are right regarding TDS; simplified it a little too much in my mind. Thanks for the correction and sorry to OP.