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
18,865
hi um,
Is the Atmega onboard the boat.??

E

If Yes, then we will use all 4 pairs of the TX/RX pins for the RS232 in/out
 

Attachments

Last edited:

ericgibbs

Joined Jan 29, 2010
18,865
hi um,
As I stated, the GPS message and Sonar message and motor RPM message will arrive at the Atmega
asynchronously.

So you will have to assign a priority status to each Serial input signal source.

I would suggest a priority of GPS > Sonar > Motor > Battery.

What equipment do you have on the shore based receiving end of the project.?

E
 

Thread Starter

umerrai1

Joined Mar 29, 2021
246
hi um,
As I stated, the GPS message and Sonar message and motor RPM message will arrive at the Atmega
asynchronously.

So you will have to assign a priority status to each Serial input signal source.

I would suggest a priority of GPS > Sonar > Motor > Battery.

What equipment do you have on the shore based receiving end of the project.?

E
Yes that is what I want too priority of messages. One more question, can my ATmega 328p handle all these information at once?
 

ericgibbs

Joined Jan 29, 2010
18,865
Günaydın ume,
Is your ATmega a 2560 version, if Yes, it has 4 TX/RX ports.
I assume the ATmega will be onboard the boat.???

Is your echo sonar working at 10 depth soundings per second.??

E
 

ericgibbs

Joined Jan 29, 2010
18,865
hi um,
I would suggest when you receive the GPA message,
$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47<crlf>

you parse out the Time and the N and E coordinates.
Add the Sonar , Motor and Battery to form a new message
$123519,4807.038,N,01131.000,E,12.34,D,1234,M,12.3,V<crlf>
and transmit this message on radio link.
E

NOTE: Update
Please post a photo image of your Atmega PCB.

Re: Different versions of the ATMega328P-PU??
Brand new ATmega328P-PU chips do not come with the same fuses programmed as an Arduino-programmed chip, and of course they do NOT have any bootloader programmed, so they're not ready to be used with the Arduino IDE unless you also have a programmer. (Unless you specifically bought chips WITH a bootloader already programmed.)
 

Thread Starter

umerrai1

Joined Mar 29, 2021
246

Ya’akov

Joined Jan 27, 2019
9,170
So what should I do now? Kindly tell me.
You need more serial ports so you can handle the various serial devices. You could redesign your board to include them, or you could buy one that has all the ports. Either way, you need places to connect your peripherals.
 

ericgibbs

Joined Jan 29, 2010
18,865
hi ume,
I will let Yaakov advise you, you are going to get confused by too many idea's being posted.

Please let me know how your project develops.
E
 

Ya’akov

Joined Jan 27, 2019
9,170
hi ume,
I will let Yaakov advise you, you are going to get confused by too many idea's being posted.

Please let me know how your project develops.
E
Eric: I will standby. I was trying to be complementary, not replace your advice which I can't duplicate.
 

Thread Starter

umerrai1

Joined Mar 29, 2021
246
Sir, I know I am not good at programming. First of all really sorry to disturb you.
What I want is GPS and Echo sounder messages and also motor and battery messages to be shown at one place.
As you know I am using a radio link. so what should I do now?
 
Top