FORUM

ARDUINO library fir...
 
Notifications
Clear all

[Solved] ARDUINO library first integration and connections to SOLO

18 Posts
2 Users
0 Likes
1,131 Views
Forum 1
(@osman)
Eminent Member
Joined: 2 years ago
Posts: 28
Topic starter  

Hello there, 

- I downloaded the Arduino library and tried to include it in the Arduino IDE. It didn't work at first and got the following message: "Specified folder/ZIP file does not contain a valid library". Would like to ask you what the reason could be and what would be the solution for this problem. (I took the h and cpp file out of the src folder and put them into the main folder. So at least the folder could be recognised by Arduino as a library. Is it even right like that?)

- My second question would be if I use the library in this way as I described above, I can't run the simplest things unfortunately. When I want to read in the temperature (or the number of poles), I always get the symbol question mark "?" as a result. You can find a picture of this as an attachment below.

Thank you in advance for your help.

Kind regards
Osman Kaya

NumberOfPoles
This topic was modified 2 years ago by Solo

   
Forum 1
(@osman)
Eminent Member
Joined: 2 years ago
Posts: 28
Topic starter  

I use Solo Uno and Arduino Mega 2560. I have connected Solo with Arduino as follows:

Solo -   Arduino
TX -     RX
RX -    TX
GND - GND

And I tried to control the speed. However, I got the following message: See the attachment (I have attached it).


   
SOLO Team
(@milad)
Illustrious Member Admin
Joined: 3 years ago
Posts: 483
 

Hi @osman,

Posted by: @osman

- I downloaded the Arduino library and tried to include it in the Arduino IDE. It didn't work at first and got the following message: "Specified folder/ZIP file does not contain a valid library". Would like to ask you what the reason could be and what would be the solution for this problem. (I took the h and cpp file out of the src folder and put them into the main folder. So at least the folder could be recognised by Arduino as a library. Is it even right like that?)

To install the library please follow this guide on the Arduino website the "Manual installation" part, you just need to unzip the file, put the folder in your Arduino sketch book directory, and then you can add it in the Arduino enviroment as a library.

Posted by: @osman

My second question would be if I use the library in this way as I described above, I can't run the simplest things unfortunately. When I want to read in the temperature (or the number of poles), I always get the symbol question mark "?" as a result. You can find a picture of this as an attachment below.

at the first glance as I see the Baudrate of Serial Monitor in your Arduino is set at 9600bits/s which is not compatible with any of the baud-rates that SOLO offers, what you need to do is :

  1. Connect SOLO to Motion Terminal and put the baud-rate of SOLO on 115200 bits/s
  2. Recycle the Power of SOLO ( Turn Off, wait for 5s, Turn back ON)
  3. Test the serial Monitor while both SOLO and Arduino are set at 115200 bits/s ( also the baud rate in Serial Monitor must be set at 115200 )

Pls verify what mentioned above and let me know if you could proceed, I will remain available.

Regards
Milad

 

 

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


   
Forum 1
(@osman)
Eminent Member
Joined: 2 years ago
Posts: 28
Topic starter  

@milad

 

Hello Milad,

Thank you very much for your kind answer and your quick help. I had to take the c-file as well as cpp-file out of src folder, and then put it into main library folder. Only then it was recognised as a library.

Otherwise the motor turns quite nicely when it is controlled via Solo Terminal. I'll keep trying to control the motor via Arduino. I hope it works. If I have any questions or if I have success with my project, I'll let you know about this. 

 

Thank you.


   
SOLO Team
(@milad)
Illustrious Member Admin
Joined: 3 years ago
Posts: 483
 

@osman sure, the Arduino library has been recently extensively tested by numerous users, so I can imagine once you get it going, you will probably have an easier time making it do what you like it to do, however, if you found any issue or bugs pls keep reporting them here and we will fix them, I will remain available.

Regards
Milad

 

 

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


   
Forum 1
(@osman)
Eminent Member
Joined: 2 years ago
Posts: 28
Topic starter  

@milad Hallo Milad,

 

I am sorry for disturbing you again. I wanted to ask if the UART interface is 5V resistant? Can I connect my TX, RX pins from Arduino directly to SOLO without a series resistor?


   
SOLO Team
(@milad)
Illustrious Member Admin
Joined: 3 years ago
Posts: 483
 

Hi @osman, SOLO UNO's TX and RX are +5V tolerant, however for SOLO BETA models you need to use those resistors, I think you have SOLO UNO ( this one with Black capacitors and a Pin header for RX, TX), so you need only to directly connect the TX and RX like the image below and no need to use any resistors or extra components:

Forum 9

Regards
Milad

 

 

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


   
Forum 1
(@osman)
Eminent Member
Joined: 2 years ago
Posts: 28
Topic starter  

Hello Milad,

i wanted to ask you politely if i can control two solo unit with one Arduino (mega)? Preferably via Uart interface.

Kind Regards 
Osman

   
SOLO Team
(@milad)
Illustrious Member Admin
Joined: 3 years ago
Posts: 483
 

Hi @osman

Yes, absolutely, you need to have a look at the following posts:

1- https://www.solomotorcontrollers.com/forum/solo-python-raspberry-pi-library/connecting-multiple-solo-controllers/#post-734

2- https://www.solomotorcontrollers.com/forum/brushless-dc-motors/multiple-brushless-motor-controlling-using-raspberry-pi-and-solo/#post-678

So basically with the use of an Analogue multiplexer like this one, you can easily utilize multiple SOLO's in a network and giving each a unique address. inside the Arduino Code, you can also instantiate an object for each SOLO with their address very easily and work with them as separate modules.

Just be careful with the fact that the Grounding of SOLO's and the Arduino and the Multiplexer should be connected at least at 1 point to each other ( like a star connection).

if you like you can share with me your wiring diagram with the multiplexer and we can check it together. 

The method proposed has been tested and it works fully.

Regards

Milad

 

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


   
Forum 1
(@osman)
Eminent Member
Joined: 2 years ago
Posts: 28
Topic starter  

Hello Milad,

Thank you very much for the detailed answer. I will send a picture of the plan before I put anything together.

Kind regards Osman


   
SOLO Team
(@milad)
Illustrious Member Admin
Joined: 3 years ago
Posts: 483
 

@osman sure, I'll be waiting for your wiring diagram.

Regards
milad

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


   
Forum 1
(@osman)
Eminent Member
Joined: 2 years ago
Posts: 28
Topic starter  

@milad 

 

Hello Milad,

since both my motor are working fine now, I wanted to ask you for a little help. Could you please take a quick look at the following wiring diagram to see if it is wired correctly? And can you also tell me how I can control both Solo units with the software? I mean, you have to address the Solo, don't you? And I think you have to declare a new solo object?

Thank you in advance.

Kind regards
Osman

 

 Arduino Multiplexer Solox2 diagramm

   
SOLO Team
(@milad)
Illustrious Member Admin
Joined: 3 years ago
Posts: 483
 

Hi @osman,

I have prepared for you a correction of the wiring you need to apply.

Forum 16

 

so in this wiring, the UART line 1 of the Arduino Mega is used, to command the Two SOLOs through the multiplexer. the TX line of the Arduino is directly connected to both of the RXs of the SOLOs, and the multiplexer is used only for TX lines of SOLOs.

Each time you want to send a message to a SOLO you need to select the respective channels for TX of each SOLO through S0 and S1, based on this wiring:

  • if S0 and S1 are both Low the channel C0 will be connected to "Sig" and subsequently, the SOLO UNO which is on the bottom will be selected
  • if S0 is High and S1 is Low, the channel C1 will be connected to "Sig" and subsequently, the SOLO UNO which is on the top will be selected

so whenever you want to communicate with any of these units in your code, first you need to select their channels and then communicate with them.

In this condition, you don't need to give different addresses to each SOLO as the multiplexer makes sure there is always 1 SOLO connected on the line, so both of the SOLOs can have the address of 0 which is the default address.

Edits:
You need to assign a unique address to each SOLO for instance Address of 0 and 1.

_ as you see it's important that all the Grounds of the modules is connected to each other at least in 1 point ( Star Grounding )

Posted by: @osman

nd I think you have to declare a new solo object?

yes, for each SOLO you need to declare a new object for instance: 

SOLO_Obj1 = new SOLOMotorController(0);
SOLO_Obj2 = new SOLOMotorController(0);

Edits:
SOLO_Obj2 = new SOLOMotorController(1);

and then you can work with each of these objects separately as each will represent a SOLO Unit for you.

Let me know if this was helpful.

Regards
Milad

wirings Multiplexer UART

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


   
Forum 1
(@osman)
Eminent Member
Joined: 2 years ago
Posts: 28
Topic starter  

@milad 

Hello Milad,

me again. Your wiring diagram already works well. But I have the following problem. The multiplexer only separates data sent from SOLO (received from the Arduino). And when I send data from Arduino to SOLO1, both motors react to this command. Do I have a software solution for this, or should I rather work with more multiplexer so that I also separate the sent data from each other?

Kind regards

Osman

This post was modified 2 years ago by Osman

   
Forum 1
(@osman)
Eminent Member
Joined: 2 years ago
Posts: 28
Topic starter  

@milad

Or should I rather swap Rx and Tx?


   
Page 1 / 2
Share: