I have GPS, SONAR and two BLDC motors connected. I have to send data to my PC. I have radio-link. How can I send this data?

ericgibbs

Joined Jan 29, 2010
13,273
You could use a Nano or Uno
Set the Nano serial to 9600 for connection to the datalogger, then use a Software serial on the Nano set for 4800, connect to the sounder, Use Serial Event
 

ericgibbs

Joined Jan 29, 2010
13,273
No,
I don't know of any Arduino program to do that.
Some electronics can detect and change the rate

Have you checked to see if that the sounder baud can be increased to 9600.?
 

ericgibbs

Joined Jan 29, 2010
13,273
hi,
But have you noticed this Comment in the Code
// by having sending circuit send "U" characters.

How will you be able to make the sounder do that.??

E
 

Yaakov

Joined Jan 27, 2019
3,344
If you can poll the sounder, you can simply change the baud rate and poll it, then change it and log. But how are you going to connect both to the same serial port without switching?
 

Thread Starter

umerrai1

Joined Mar 29, 2021
233
Actually, we don't want to change the baud rate every time we connect our data logger to new equipment. So our data logger will detect the baud rate and set it to the required one.
 

Yaakov

Joined Jan 27, 2019
3,344
OK, let me get this straight.

This is unrelated to your original project.
You are now working on a datalogger for which you are writing a program.
You have no access to the firmware on the sounder and other things to be logged, but you are going to try to use a program you found that depends on the transmission of a known string which you will have to make the other devices emit to determine the data rate.

Is this right?
 

ericgibbs

Joined Jan 29, 2010
13,273
Actually, we don't want to change the baud rate every time we connect our data logger to new equipment. So our data logger will detect the baud rate and set it to the required one.
hi,
If you have say 2 spare pins on the Mega, you could use those with a Bit Switch and the user could select a possible 4 Baud rates 1200,2400,4800, 9600...
On power Up or Reset , the Sketch Void Setup would read that Bit switch and select the required Baud rate.
E
 

Thread Starter

umerrai1

Joined Mar 29, 2021
233
OK, let me get this straight.

This is unrelated to your original project.
You are now working on a datalogger for which you are writing a program.
You have no access to the firmware on the sounder and other things to be logged, but you are going to try to use a program you found that depends on the transmission of a known string which you will have to make the other devices emit to determine the data rate.

Is this right?
That what I was thinking how is this possible even I did not connect my TX pin of Arduino to the RX pin of Echo Sounder
 

Yaakov

Joined Jan 27, 2019
3,344
That what I was thinking how is this possible even I did not connect my TX pin of Arduino to the RX pin of Echo Sounder
I'm sorry, I really didn't understand your answer. Could you make a drawing of the connection so I can understand what you are doing?
 

Thread Starter

umerrai1

Joined Mar 29, 2021
233
Sir actually my English is weak so I cannot explain to you what I am trying to say.
Let's say I have an Echo sounder whose baud rate is unknown to me and also I don't know the baud rate of a data logger at which rate it is set. So I want to make a data logger which can accept any baud rate. It is not the thing that how many devices are going to connect.
 

ericgibbs

Joined Jan 29, 2010
13,273
hi ume,
I posted an option on how to do that earlier.
hi,
If you have say 2 spare pins on the Mega, you could use those with a Bit Switch and the user could select a possible 4 Baud rates 1200,2400,4800, 9600...
On power Up or Reset , the Sketch Void Setup would read that Bit switch and select the required Baud rate.
 

Yaakov

Joined Jan 27, 2019
3,344
You need a setup procedure for the logger. It should cycle the baud rate through steps trying to read the port until it gets readable strings. Think of a “learn” button. You could also just make it possible to set the data rate manually. Put a small OLED display on the logger so the user can see hat is being received and they can choose the one that works.
 

Thread Starter

umerrai1

Joined Mar 29, 2021
233
Sir Pardon me, I forgot to reply to you for this post. actually, I am working on it. I read every post you send me and note it in my notebook.
 
Top