Hey everyone, i only have 9 weeks to do this project and am in need of some guidance. I have spent some time reading through the forums and around the Internet.
Project: Take the serial (RS-232) output of a UV-Biometer recorder into (this is where im not sure)
The goal is to take the recorder data output, store and upload to a FTP server every 30 minutes. I plan on using the Arduino Ethernet shield.
As stated above i have 9 weeks to complete this and have had little exposure to Arduino's.
Thanks
Edit. What i do know about the settings for communication to the recorder are...
8 data bits
1 stop bit
no handshake
ANSI BBS terminal emulation
no local echo (full duplex)
Speed matched to the recorder which is 9600
Connecting an RS232 device needs an RS232/TTL adapter, and some code on the Arduino to do the reading and writing over that serial port. You would need to know the protocol used on that serial connection and be able to implement that protocol on the Arduino end.
What you do with the data you extract from the serial port is up to you. Talking to a web server over WiFi or ethernet is known technology, and so it implementing a web application to do something useful with the data you provide. Doing it all in nine weeks might be a challenge, though.
It's not entirely obvious why you're choosing to build your solution around an Arduino rather than just writing a small PC application to access it directly via a COM, but presumably your tutor has told you what sort of approach he expects you to take.
I forgot to state that the whole reason for this project is to replace the computer. Old and out of date has made it difficult to use this system properly.
The server that the data is uploaded to has already been in place and when the interfacing computer is working with the software it is uploaded and can been seen on the web application. Graphs etc.
The more important thing (maybe equally important) is to have an Ethernet shield. There are example sketches that send temperatures etc. to a web server. So with an Ethernet shield plugged in, and the sketch loaded, you are half done.
Then get an RS232/TTL adapter board, put that between the device and the Arduino, and there is the source of your data.
Well nothing says that the computer has to be one that processes the data, just does the data collection, and upload it to newer computer.
Alternatively, you can get USB->serial dongles to use on the new computer.
Depending on your programming skills, it should be a doable task. Like all projects, you want to break it down into smaller parts. If your main motivation is just to get the job done, then you might want to look at simpler methods. If there is some reason to use the Arduino (i.e. space or power concerns, you wanting to learning how to program the Arduino for other tasks, etc.), then by all means go ahead.
In this case, I would first get rs-232 working on the Arduino, doing a read from the rs-232 line, and write to either the serial terminal connected to your USB connection, or one of the cheap text lcds for Arduino.
Then next, parse the input, from the device, to make sure you have the correct fields, etc.
Then add an ethernet or wifi shield, and start uploading the data.
Google is your friend. If I enter 'arduino serial rs-232', I get the following tutorials from this site:
Well the computer has to be completely removed from the equation, in terms of it being the one collecting the data via installed software and uploading to a server.
I will def get the rs-232 working with the Arduino first to make sure it can read the data properly. Adding the ethernet shield should not be a problem.
One thing im not sure about is how to program this setup...
8 data bits
1 stop bit
no handshake
ANSI BBS terminal emulation
no local echo (full duplex)
Speed matched to the recorder which is 9600
Maybe im just not seeing it, i do see the bit9600Delay but...
Am i correct to assume the offset < 8 pertains to the 8 data bits? If so then int offset = 0 would be the stop bit? So im my case i would just change the 0 to 1 for the stop bit?
Like i mentioned, my experience is sparse with this and am having to learn alot fairly fast. Thanks again eveyrone
djtsmith007:
I forgot to state that the whole reason for this project is to replace the computer. Old and out of date has made it difficult to use this system properly.
If you already have a working PC-based solution, and your goal is to get something working in the most expedient and reliable way (rather than as an academic exercise) I'm puzzled by the decision to use Arduino. Do you think it will be cheaper or easier than simply dropping in another computer? Low spec computers are essentially valueless these days and can be found at zero cost. On the other hand the Arduino solution will involve buying various boards at tens of quid each and then you still have to program it all and get it working. What is the Arduino doing for you that isn't done better and cheaper by just upgrading the old PC?
djtsmith007:
Maybe im just not seeing it, i do see the bit9600Delay but...
Am i correct to assume the offset < 8 pertains to the 8 data bits? If so then int offset = 0 would be the stop bit? So im my case i would just change the 0 to 1 for the stop bit?
Like i mentioned, my experience is sparse with this and am having to learn alot fairly fast. Thanks again eveyrone
You can forget about these details, the arduino's UART and libraries will take care of them for you, it can already read 8,N,1 without any help from you. All you need to do is set the baud rate in the setup function. You will need some hardware (MAX232) to convert the RS232 voltage levels to TTL so that the arduino can read them however.
PeterH:
If you already have a working PC-based solution, and your goal is to get something working in the most expedient and reliable way (rather than as an academic exercise) I'm puzzled by the decision to use Arduino. Do you think it will be cheaper or easier than simply dropping in another computer? Low spec computers are essentially valueless these days and can be found at zero cost. On the other hand the Arduino solution will involve buying various boards at tens of quid each and then you still have to program it all and get it working. What is the Arduino doing for you that isn't done better and cheaper by just upgrading the old PC?
The department is requiring the use of Arduino and doing away with the computer completely.
wildbill:
You can forget about these details, the arduino's UART and libraries will take care of them for you, it can already read 8,N,1 without any help from you. All you need to do is set the baud rate in the setup function. You will need some hardware (MAX232) to convert the RS232 voltage levels to TTL so that the arduino can read them however.
Could you show me an example of where the UART and libraries have these steps already included?
This is not as easy as to post data to a web server. FTP uses two connections, one for commands and one for data. The original FTP protocol even required the server to make a connection to the client for the data. I'm not aware of an FTP library for the Arduino although theoretically it should be possible (the Ethernet shield supports up to 4 connections as far as I remember).
If you can change that spec to a HTTP upload you'll have much more support available in the forums, FTP is not very common in modern applications. Should you be forced to use FTP you should get familiar with the protocol because you probably have to do the whole stuff yourself.
This is not as easy as to post data to a web server. FTP uses two connections, one for commands and one for data. The original FTP protocol even required the server to make a connection to the client for the data. I'm not aware of an FTP library for the Arduino although theoretically it should be possible (the Ethernet shield supports up to 4 connections as far as I remember).
If you can change that spec to a HTTP upload you'll have much more support available in the forums, FTP is not very common in modern applications. Should you be forced to use FTP you should get familiar with the protocol because you probably have to do the whole stuff yourself.
Well crud...that might just end this little project. As i only have 9 weeks to complete all tasks, might have to pass onto another project.
djtsmith007:
The department is requiring the use of Arduino and doing away with the computer completely.
I don't get it.
On the one hand you're choosing a solution which is, frankly, contrived at best.
On the other hand you're saying you might not bother if it looks too hard.
Are you doing this because you want to achieve a working solution, or as an academic exercise?
The solution chosen is required by the engineering department. Which is part of our senior design project, since the summer is fairly short and with lack of resources and time the approach to use Arduino will be axed.
The solution chosen is required by the engineering department. Which is part of our senior design project, since the summer is fairly short and with lack of resources and time the approach to use Arduino will be axed.
If you are being required to things which the engineering dept has not trained you to do (yet they took your $$$), then you need to file a grievance with the school.