Go Down

Topic: Hi new to arduino need help where to start  (Read 148 times) previous topic - next topic

paul2004

Hi i'm new to using arduino and i have a little project at work and thought this could be a good idea to start learning how to use arduino. It is a simple project probable for you guys but i do not really know where to start any way ill get to the project

i have a set of weighing scales which i want record the weight at the end of every day  the scales has rs232 card with tx rx 0v and a baud rate of 9600 some how i want the scales to talk to the arduino and the arduino to then send the weight and record it onto a excel file to keep a record. i do not want to use the sd card route.The arduino i have is a uno

i assume i would use tx scale to rx arduino and rx scale to tx arduino what about the 0v and i need help with the coding and getting it to record on excel

any help would be great and sorry if it is in the wrong category

Railroader

Connecting grounds together is mandatory to make anything work between different units. Note that the Arduino uses 5 volt signals and RS232 uses +- 12 volt if I don't mix things.
Use Your knowledge. If that's not enough, look for education.
Having knowledge, think outside the box to gain more of it. Only trains run like the train, on the rails. The rest run between the rails.

paul2004

so would i need to use a resistor to lower the voltage or would that not work

Railroader

Use a proper level shifter. Resistors won't work.
Use Your knowledge. If that's not enough, look for education.
Having knowledge, think outside the box to gain more of it. Only trains run like the train, on the rails. The rest run between the rails.

groundFungus

It will be a challenge to decode what the scale sends if you do not have access to the protocol specification.  Do you have a manual for the scale that includes that information?  

That may, also, have the voltage levels of the interface.  Like Railroader says that is important to know.
If the serial interface is true RS232 (±12V) you will need a converter like a MAX232.  If TTL 5V then just: scale RX to Uno TX and scale TX to Uno RX.

I have heard of, but never used, PLX-DAQ.  PLX-DAQ takes serial output from the Arduino and puts the data to Excel.

paul2004

i can use a software called winwedge that sorts the data and logs it to excel using macros and i could use a rs232 to 485 data converter but i have got a arduino that i have never used a thought this might have been a simple project to learn a little about arduino but maybe i was wrong   

DVDdoug

#6
Jun 26, 2019, 01:01 am Last Edit: Jun 26, 2019, 01:01 am by DVDdoug

RS-232
can get a little complicated.   Besides the baud rate, there are start-bits, stop bits, parity, and (optional) handshaking.   I was working on something a long time ago and on one-end everything was well documented, but the other-end was not.   (Somehow, I eventually got it figured-out.)   

Oh yeah...  The RX & TX lines (and handshaking lines, if used) have to be crisscrossed.    Not a big deal...  Itsd kind-of obvious that you don't connect both TX lines together.  So for example, if you connect two computers together you can't use a straight pin-to-pin cable.  You have to use a "null modem" cable null modem adapter to crisscross the connections.

USB is even more complicated but the drivers make it easier for the user.  But not the programmer, who has to write the driver and perhaps write the firmware in the USB device to communicate with the driver.     

I'm not sure why you need an Arduino... It sounds like all you need is an RS-232 connection to the computer.   If your computer doesn't have an RS-232 port you can get a card for a desktop/tower computer or a USB-to-RS232 adapter for a laptop.   But, watch out for "cheap adapters".     USB only supplies +5V so the adapter needs a voltage converter inside to get the higher positive & negativeRS-232 signals, and some of the cheap ones try to get-away at lower voltage (which sometimes does work).

To me, the "hard part" would be the computer  program to accept the serial input and write an Excel file.    Arduino programming is usually easier, if you need an Arduino at all.

Railroader

RS232 is an old and well defined "family"but it allows for a number of variations, Control signals or not, number of bits, 7 or 8, number of stop bits, 0, 1 or 2, parity check or not.
Make sure You have got the complete protocool for the sender. Some RS232 communicating devices uses Xon, Xoff signaling instead of the "normal" Clear To Send, CTS, "Ready To Send", RTS etc....
But sure, a fun interesting but not all an easy way to explore and learn Arduinos.
Use Your knowledge. If that's not enough, look for education.
Having knowledge, think outside the box to gain more of it. Only trains run like the train, on the rails. The rest run between the rails.

paul2004

Thanks for the reply s think I'm just going to stick with winwedge and rs232 adaptor. The only reason I was going to do it was for my self to learn a little about arduino thinking it might have been a simple task. I have done this on other scales using tcp/ip to rs232 and winwedge which then records to excel or chosen program. Like I say I'll have to find something else to try to use the ardiuno for.

Go Up