Store data from a digital balance (RS232) in an SD card

Hi everyone,
I'm a newbie to Arduino. I need to store data from a digital balance (with an RS232 port) in an SD card for a school thesis.
The devices are correctly connected but I don't know what the code should look like.
The parameters of the balance (baud rate, data bits, parity, handshake) are known.
Any help is well appreciated.
Thanks.

Edit: I'm using Arduino Uno R3 and a Mettler Toledo balance with an RS232 port for data transfer. We used RS232/TTL to connect it to the circuit, which is connected to an SD card shield.
The connection between RS232/TTL and the SD shield are TX-RX; RX-TX; 5V-VCC; Ground-Ground.
My first goal would be to read the data of the scale on the Serial Monitor. Haven't gotten that far yet.

Research for Arduino data logging projects using SD card.

1 Like

Are You using an RS232 to TTL interface for the signal from the balance?
Hope You know what RS232 stands for.

1 Like

Hi,
@abellu Welcome to the forum.

Did you read the recommended topic when joining the forum?
" How to get the best out of this forum "

To facilitate our help and reduce the number of questions,
provide recommended information.

For example:

What "arduino" are you using?
Which model of balance you want to read the data. (or link).?
What module are you using, (RS232/TTL, SD card) ?
Schematic of your connections between arduino and modules?
Code (posting using the appropriate </> tags) that you are using ?

and any other information that facilitates our help.

After all, the project is in your brain............. not in ours.

1 Like

For advice about serial communications read this: Serial Input Basics - updated

Beyond that you've provided far too little information for anyone to help much.

Yes, the circuit is connected to the RS232 via TTL adapter.

Thanks for your feedback. What other information could be useful? (sadly the only codes I've tried so far were copied from other users)

Answers to questions in post #4, for a start.

I'm using Arduino Uno R3 and a Mettler Toledo balance with an RS232 port for data transfer. We used RS232/TTL to connect it to the circuit, which is connected to an SD card shield.
The connection between RS232/TTL and the SD shield are: TX-RX; RX-TX; 5V-VCC; Ground-Ground.

To start with, just echo whatever you get from the scale (if anything) to the Serial monitor.

What does the manual have to say about how to get the scale to transmit?

This is a brand that sells many, many models of scales. Can you give a link to the model you are using?

Do the scales transmit the current weight reading continuously, or with a fixed period such as every second or only when a button on the scale is pressed?

If the weight reading is transmitted continuously or on a fixed period, do you want every reading to be saved, or only when a button attached to the Arduino is pressed, or some other criteria (for example the weight has been steady for some period and it's over some minimum weight)?

Do you need to record the date and time that each weight is saved? Does your SD card shield also have an RTC (Real Time Clock)?

We got to that point (printing data on a .txt file) but with a direct connection from the balance to computer (RS232->USB).
With the circuit in between it gets harder: we tried with many different codes from other forums but none of them gives an "echo" of the data on the serial monitor.

First,learn how to use the Arduino to read the data from the balance.

The scale is the following: https://www.mt.com/ch/de/home/products/Laboratory_Weighing_Solutions/precision-balances/MS4002TS.html?SE=GOOGLE-Shopping&cmp=sea_09720206&Campaign=PMax:%20GSA-Smart_DE_CH&Adgroup=&bookedkeyword=&matchtype=&adtext=&placement=&network=x&kclid=_k_Cj0KCQjwnP-ZBhDiARIsAH3FSRc4be-peJUFZU_I-zPGXFm8oT3C8KYUalp-Uv1j5oqz4OWEHniHfE8aAhahEALw_wcB_k_&cq_src=google_ads&cq_cmp=17894512763&cq_con=&cq_term=&cq_med=pla&cq_plac=&cq_net=x&cq_pos=&cq_plt=gp&gclid=Cj0KCQjwnP-ZBhDiARIsAH3FSRc4be-peJUFZU_I-zPGXFm8oT3C8KYUalp-Uv1j5oqz4OWEHniHfE8aAhahEALw_wcB

We can decide a fixed time interval for the data transmission and the weight doesn't need to be stable (e.g. every 5 sec it records the mass).

It would be nice to have the time for each measurement but is not crucial.

Trying "other codes" thinking it will work is wasting time. You need to learn programming. Modifying example code is often a good way to start.
Learn managing SD write, readin serial etc.

See reply #4. The tutorial linked to was written by my to answer exactly those kinds of questions.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.