Two bluetooth modules for communicating between two machines

Hello! I'm very very new to Arduino and I need help for my final year project. I am currently working on a machine that needs to communicate to another machine via bluetooth.

The first machine already has a bluetooth module connected to an Arduino Mega as a slave to a mobile phone and after further research, I can't make the bluetooth module as a Master and a Slave concurrently. The idea I had in mind was to use two bluetooth modules in one machine so that it can become a slave to the mobile phone and the master to the second robot.

However, after much wiring, I realised that I can't put two bluetooth modules on the Arduino Mega as the bluetooth module that I'm currently using only uses 3.3V. I put a broadboard beside the Mega so that the 3.3V and the Ground has 'more ports' but when I try to connect to the bluetooth module, it does not work. I'm using the other ground and 5.5V connection for other Arduino modules.

I am thinking of getting another Arduino board so that the master Bluetooth module will be a standalone. Is it a good idea?

If not, does anyone else has other ideas? I can only use Bluetooth connection and using RF/WiFi is out of the window :frowning:

Many thanks in advance!!

(pls help me I'm totally new to Arduino and I created an account just to ask this)

this is nothing technical and does not answer your query.

pl avoid using the terms Master, Slave this is a very sensitive
issue when it come to afro american people.

when i did my IT course a afro canadian was very upset.

i am no expert on arduino but your idea might work using
two boards - TX of one board connected to RX of the other and vice versa.

bluetooth helps to connect two digital devices and its
programmers ability to make them talk to each other.
i hope experts can thow in more light on this

Hello!!! I sincerely apologise for using those terms as I had NO IDEA (none whatsoever) that those terms are sensitive (regarding Bluetooth’s ‘teacher’ and ‘student’? (Please enlighten me on how to correctly address those terms! I’m new to Bluetooth as well!)

So what you’re suggesting is to use another board for it to be the ‘teacher’ while the ‘student’ module uses thu current Arduino Mega? What board would you recommend? I’m thinking of using a Nano!

Hello! Please do help this newbie!!! I'm racing against time as the delivery of Arduino items take very along to arrive and I need to order them as soon as possible!! :frowning: :frowning:

narzonmars:
The first machine already has a bluetooth module connected to an Arduino Mega as a slave to a mobile phone and after further research, I can't make the bluetooth module as a Master and a Slave concurrently.

You cannot do it concurrently, but you might do it alternately. All you need do is control the power supply to bluetooth so that you can reconfigure it.

However, after much wiring, I realised that I can't put two bluetooth modules on the Arduino Mega as the bluetooth module that I'm currently using only uses 3.3V.

All you need do with that approach is use 5v bluetooth modules - like almost everybody else does and, since you have four serial ports on a Mega, it is probably the easiest method. I believe using a single bluetooth on Mega's 3.3v pin isn't such a good idea anyway.

I am thinking of getting another Arduino board so that the master Bluetooth module will be a standalone. Is it a good idea?

Probably not. Indeed it sounds like a very bad one.

You can also safely ignore the guy with the hypersensitive Canadian friend. Nobody can be that stupid, and he is probably pulling your leg anyway - or quite likely the Canadian was. If you don't use conventional language, nobody will be able to understand you when you have a communications problem.

Nick_Pyner:
You cannot do it concurrently, but you might do it alternately. All you need do is control the power supply to bluetooth so that you can reconfigure it.All you need do with that approach is use 5v bluetooth modules - like almost everybody else does and, since you have four serial ports on a Mega, it is probably the easiest method. I believe using a single bluetooth on Mega's 3.3v pin isn't such a good idea anyway.Probably not. Indeed it sounds like a very bad one.

You can also safely ignore the guy with the hypersensitive Canadian friend. Nobody can be that stupid, and he is probably pulling your leg anyway - or quite likely the Canadian was. If you don't use conventional language, nobody will be able to understand you when you have a communications problem.

Hi!!!! I get what you mean but currently, my 5.5V port is connected to one of the side(the plus and minus column (i apologize for the lack of scientific terms as I am not an electronics/robotics student!) from a solderless breadboard) to use it for other functionalities (i.e. sensors) as a 'port extension' and I am literally left with no other ports !! So, I'm really out of options :frowning: I'm using the RN42 bluetooth module (The RN42 module must be supplied with a regulated 3.3 volt power source) and I tried connecting it using the breadboard method for 'extra ports' but the problem is, the bluetooth module will not send any data to the Arduino!! That's why I was thinking of using another Arduino board for the 'master' module!

PLEASE HELPPPPPPP :frowning: :frowning: :frowning: :frowning: I'm really having a race against time :frowning:

Edit: missing info

I was not aware the RN42 is 3.3v, so the first thing you need to do is ensure that it is kosher to run on Mega's 3.3v @ 50mA maximum. My comment on the suitability still stands, and goes double if you want to use two. You may need to power them separately off Mega's VIN, or something.

Your lack of scientific terms is far less of a problem than the coherence of your explanation of what you are trying to do, but you certainly have not come up with a proper explanation for using another Mega. Other than simply running out of memory, about the only reason for doing so is that your current Mega is running four serial devices and all 40 or so additional i/o pins are already occupied, so submitting a picture of your setup wouldn't be a bad idea.

My comment on reconfiguring on the fly probably still applies to the RN42, but I don't know anything about them.

The reason why Bluetooth will not send any data to Arduino is most probably because you don't know what you are doing, and buying another Mega is not likely to fix that problem. You might not need to buy anything but, if you must, buy a 3.3v regulator for about $2 or, at most a couple of HC-05s, which run on 5v.

this link might be of help to you narzonmars. pl read.
this could be the solution you are after and the code is also there.

http://forum.arduino.cc/index.php?topic=116915.0

as for the expert nick_pyner on sensitivity of usage of english, i have
no comment as i do not get embroiled in silly statements/argument, in a forum
of technical expertise. please try above before his suggestion,
as he too might be pulling your leg like the canadian does. he could be
a fan of bill gates who fooled the world stating he was behind
DOS whereas in fact he had bought the sytem from a brilliant brain
and sold it to ibm.

pl read this under python on using sensitive language.

https://bugs.python.org/issue34605

Nick_Pyner:
I was not aware the RN42 is 3.3v, so the first thing you need to do is ensure that it is kosher to run on Mega's 3.3v @ 50mA maximum. My comment on the suitability still stands, and goes double if you want to use two. You may need to power them separately off Mega's VIN, or something.

Your lack of scientific terms is far less of a problem than the coherence of your explanation of what you are trying to do, but you certainly have not come up with an proper explanation for using another Mega. About the only reason for doing so is that your current Mega is running four serial devices and all 40 or so additional i/o pins are already occupied, so submitting a picture of your setup wouldn't be a bad idea.

My comment on reconfiguring on the fly probably still applies to the RN42, but I don't know anything about them.

The reason why Bluetooth will not send any data to Arduino is most probably because you don't know what you are doing, and buying another Mega is not likely to fix that problem. You might not need to buy anything but, if you must, buy a 3.3v regulator for about $2 or, at most a couple of HC-05s, which run on 5v.

Hello! Thank you for taking your time to assess my current situation!!! It will really help a lot!! The first picture attached is the bottom side of the Mega, which shows the 5V and 3.3V ports. In the current situation like I said, the 3.3V (purple wire) is connected to the Bluetooth module as well as the ground (blue wire). For the 5.5v and the other ground, it's connected to a breadboard via a cable. The other ports on the breadboard is connected to a couple of ultrasonic sensors (hence them using the digital pins on the right side of the board) [2nd image attached]

In the third picture, the black and white wires are for the bluetooth module and the red and blue wires are for some motors.

In the begining, I initially thought that I can install another bluetooth module via a breadboard as there are serial ports available but to my dismay, connecting the BT module via the breadboard method does not send any data to the Arduino. That was why I thought of using another Arduino board (I have a couple of extra Unos)
\

Please read the readmes at the head of the forum, particularly about posting pictures. As things are, I guess you will not be too surprised, when I tell you that pictures are just an incomprehensible mess. However, they do show very clearly a swag of unused pins, therefore suggesting there is no need to buy another Arduino.

Once you have ensured that it is OK to run two Blueteeth off the 3.3v pin on mega, OR have come up with an alternative power arrangement, the connection process should be quite straightforward. You should be able to do it on a breadboard, remembering to put voltage dividers in the two Arduino Tx lines. The only explanations for your last para are inadequate power, incompetence or sloppiness. I suggest you get rid of all the motors for the moment, and whatever else is hanging around, and then try and send simple hellos from both blueteeth to the phone, they being on Serial1 and Serial2.

It is not actually clear that you have ever successfully used bluetooth. If not, you might find the following notes useful, particularly in the matter of wiring.

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino

Nick_Pyner:
Please read the readmes at the head of the forum, particularly about posting pictures. As things are, I guess you will not be too surprised, when I tell you that pictures are just an incomprehensible mess. However, they do show very clearly a swag of unused pins, therefore suggesting there is no need to buy another Arduino.

Once you have ensured that it is OK to run two Blueteeth off the 3.3v pin on mega, OR have come up with an alternative power arrangement, the connection process should be quite straightforward. You should be able to do it on a breadboard, remembering to put voltage dividers in the two Arduino Tx lines. The only explanations for your last para are inadequate power, incompetence or sloppiness. I suggest you get rid of all the motors for the moment, and whatever else is hanging around, and then try and send simple hellos from both blueteeth to the phone, they being on Serial1 and Serial2.

It is not actually clear that you have ever successfully used bluetooth. If not, you might find the following notes useful, particularly in the matter of wiring.

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino

Hello! As I mentioned, I'm very new to Arduino (hence my lack of knowledge in the Arduino forums too) and I couldn't upload the pictures via the attachments section. (Probably because of a server overload)

As I have no background in electronics/robotics, I would rather not touch any current wiring that has been done by previous students as the previous students know a thing or two about robots. (I would maybe try and unplug the ports and see if anything works)

Thank you for giving me a detailed word document about Arduino and Bluetooth. It would definitely be helpful for my problem.

Should I have any further questions, is it alright if I were to message you through the Arduino PM?

Thank you so much!

narzonmars:
I would maybe try and unplug the ports and see if anything works

You need to learn how to unplug other people's work, document it, and plug it back in. Also, there is no guarantee that the other students are any smarter than you are, and they probably don't know anything about bluetooth either.

Should I have any further questions, is it alright if I were to message you through the Arduino PM?

No. PMs are a bad idea, stick to the forum. That way, people who may be more knowledgeable than me can see what is going on.

Master and slave are perfectly acceptable info electronics. We are taking about electronics here and nor about stuff from the past. (And present)

SunilV:
pl read this under python on using sensitive language.

Issue 34605: Avoid master/slave terminology - Python tracker

I suspect the date was wrong. Should have been 2018-04-01. :sunglasses: