Connecting two Arduinos Uno. GPS, BT, IMU...

Hello,

I'm doing for a while a drone (which is fashionable) three rotors and I managed to blow it decently with several sensors and simple way.

  • GY-85: ADXL345, ITG3205, HMC5883L -> I2C, A4 and A5 Pines
  • 6 Channel Receiver RX (PPM) -> Pin 2
  • ESC + Brushless motors (PWM) -> Pines 3, 5 and 6

Well, so far I have not had too many problems.

Now what I want is to expand its operations by adding a GPS and BT module to send via mobile multiple commands for different tasks, ie basically convert the BT in the command console and debug (obviate the fact that BT range is very small)

GPS Receiver: uBlox 6M. It connects via serial port. Set to 38400 baud and a frequency of 5Hz (200ms) BT Module: HC-05. It connects to través' serial port. I put it to 57600.

Tried to connect both using the library SoftwareSerial at first seemed very promising, but I had problems, apparently, the library can not work with these baudrate and GPS information gets cut and / or not even receive commands delivery via BT.

You can catch a glimpse of how we came to this conclusion in this post (sorry Spanish!) http://forum.arduino.cc/index.php?topic=294477.0

GPS pins 8 and 9 (actually 8 I no longer need to send data) BT pins 10 and 11 (here I need both pins)

I tried with AltSoftSerial, it improved GPS reception but still not okay for BT.

Here is an idea I've had the same q can not be done, and is where come my doubts.

I intend to connect two Arduinos. One would GY-85 and GPS (ie, such as an IMU) would send information every X ms. This information would be the YPR and GPS information that might interest me (LONG, LAT, TIME, etc).

With the IMU would have no problem because the GY85 go for I2C (SCL / SDA) and could use the AltSoftSerial to connect the GPS.

This information will encapsulate and send via serial port with a Serial.write or Serial.print as I interesase.

Well, I understand that both Arduinos the need to connect the serial port right? There is no other way to be sent information including right ?.

If so, I understand that i should connect both arduinos through the serial port. What other ways are there to upload a sketch to arduino?

In the second arduino (which is NOT the IMU), I understand the "Serial.read ()" would give me the info of IMU right? So through the standard library of SoftwareSerial or AltSoftSerial connect the BT and could see the information you send and send commands via the BT is that correct?

I have come to this point because I think it is not possible to connect "all at once" on one Arduino Uno.

I know there is the Arduino Mega carrying multiple serial ports and would be better and much simpler for this, but I overpopulation Arduinos Uno and I would squeeze this option: P

Thank you.

I’m doing for a while a drone (which is fashionable) three rotors and I managed to blow it decently with several sensors and simple way.

Am I right to assume that when you say you managed to ‘blow’ it you really mean that you managed to fly it ?

apparently, the library can not work with these baudrate and GPS information gets cut

Wrong. It can operate at those speeds. However, the Arduino can't do much else while receiving data using SoftwareSerial.

Quit banging your head against the wall. Get a Mega with its 4 hardware serial ports.

I agree with Paul. If you're using serial communication, a mega makes everything easier, especially in debugging as you can watch what's happening.

I recently did a project using RS485 communication from one master to three slaves. RS485 works very well especially if you're running long distance because it's a balanced signal. Setting up serial communication between two arduinos is easy enough. There's plenty of documentation out there.

e.g.

http://gammon.com.au/forum/?id=10894 http://gammon.com.au/serial

Hi,

UKHeliBob: yes. Where I said blow I wanted to say fly :P Sorry.

PaulS: Wrong. It can operate at those speeds. However, the Arduino can't do much else while receiving data using SoftwareSerial.

Yes, can works with those baudrate and higher, but SoftwareSerial doesnt works very well then.

All this is for experimental purpose and learn deep how Arduino works.

lacanau: I agree with Paul. If you're using serial communication, a mega makes everything easier, especially in debugging as you can watch what's happening.

I recently did a project using RS485 communication from one master to three slaves. RS485 works very well especially if you're running long distance because it's a balanced signal. Setting up serial communication between two arduinos is easy enough. There's plenty of documentation out there.

e.g.

http://gammon.com.au/forum/?id=10894 http://gammon.com.au/serial

Thanks you, I will take a look.