This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems to connect Tinkerboard to Arduino
#1
Hello everyone, this is my first thread here in the forum, and i apologize in advance for any mistakes i may make.
 
I've just started using the Asus Tinker Board and it is very nice.
 
I also have struggled a lot dealling with linux (windows user all my life), and with a lot of effort i managed to install a few softwares i wanted, like java, Synergy (for using mouse and keyboard between my PC and the Tinker Board) and the so loved Arduino IDE.
 
Going through the Arduino IDE installation was fine, just download, unpacked the file and ran the sh installer (i got the linux arm 32bits from Arduino official website)
 
The trouble started when i tried to connect and upload files to my board, which is an Arduino Uno. First, within the list of ports, i could not recognize the port my board was connected (since there were no COMs for me there undefined). So i discovered that port i should look for was "/dev/ttyUSB0".
 
Just after the IDE installation, when selecting the ports, the list of ports was already there, but just to be sure i included my user in the necessary groups, with:
 
 
$ sudo usermod -a -G tty linaro
$ sudo usermod -a -G dialout linaro

 
And here follows the groups i'm in:
 
linaro@tinkerboard:~$ groups

linaro adm tty dialout cdrom sudo audio dip video plugdev staff games users systemd-journal input bluetooth netdev pulse-access spi i2c

 
 
 
Then, i selected the port:
 
[Image: ARTZaRM.png]
 
 
And theoretically it shoud work!! 
 
But it didn't!!!!
 
And this is when the nightmare began.
Whenever i try to send a sketch to my arduino i get the following message:
 
[Image: 7BfigzJ.png]
 
But, just before i started writing this thread i tried uploading the blink example, and for my surprise, although the IDE shows me that error message, the led started blinking!
 
So i went ahead, upload the GRBL (i'm building a CNC and i want the Tinker Board to be my "PC" controller), it gave me the same message, and before trying to connect with Universal Gcode Sender in the board, i did it with my notebook (Windows) and it connected without any problems!!
 
So with this information, i think im able to affirm that the Arduino IDE, besides the error message, IS uploading the sketchs to my Arduino Uno.
 
Then, i tried to connect with Universal Gcode Sender in the Tinker Board, and guess what?????
 
 
IT DIDN'T WORK undefinedundefinedundefined 
 
 
Whenever the arduino with GRBL connects with UGS (Universal Gcode Sender) it's screen should look like this:
 
[Image: W8dZU1B.png]
 
(that's on my notebook, grbl 1.1h)
What matters is that "ok" in the end of the connection protocol that means "ready to go". The other lines are about the cnc setup and fisical values.
 
In the Tinker Board, i'm getting this:
 
[Image: 6BgBYi4.png]
 
No "ok", not even all the setup lines. I can't move the axis.
 
 
My arduino uses that so famous CH340 IC, and so far i could not find any "driver" to install on linux (also i don't think that's the problem), besides, whenever checking usb list, it is there:
 
[Image: Emwr1AN.png]
 
Then i decided to do something else: upload a previous version of grbl to my arduino. I uploaded 0.8j, that uses 9600 for baud rate. And again, for my suprise,
 
 
IT PARTIALLY WORKED.
 
Don't know why, but it did. Got the so wanted "ok" and then i could manualy move the axis with the keyboard. BUT STILL, the UGS did not show all the setup lines it should have, that implies on not been able to modify the firmware on the Arduino board.

The current version i use is GRBL 1.1h and it uses 115200 for baud rate, and i realy want to keep using it.
 
I would like to have some help with this, both solve the error message problem in arduino IDE (If possible), and the most important, make the Tinker Board connect to my arduino at this version i need.
 
Here are some things i've already tested and useful information:
 
-Three different cables; all good;
 
-Two Arduino Uno; both with CH340 (i don't have the official one);
 
-All USBs present in the Asus Tinker; All got the same;
 
-Re-flashing the SD card, and reinstaling linaro; Nothing changed;
 
-Probably i tried many other things, but i can't remember undefined;
 
-Also i got a good USB cable and a nice phone charger that, so far, can supply the necessary power;
 
-I run UGS, that is java based using: $ sudo java -jar /home/linaro/Desktop/UniversalGcodeSender/UniversalGcodeSender.jar;
 
-Tinker Board is using the latest TikerOs 2.0.11.
 
 
I already can thank you all for reading this unnecessarily big "soap opera", and really hope you guys can help me with this.
I'm sorry for any grammar error, and for my lack of knowlege in the area. As i sad, i'm building my Router CNC and i want to use the Tinker board as the PC. Eletronics for me in general are not a problem, but when it comes to this kind of "software connections", i'm quite a noob.
 
 
Thank you,
 
 


locoxhun.
Reply
#2
Anyone??? Pleaseeee
Reply
#3
I think the most issue might be the power from the USB. Which is limited to 300 mA. You may try to monitor the supply during the data transfer and see whether there are glitches that will disconnect arduino from the USB.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#4
(09-26-2019, 06:19 PM)Im4Tinker Wrote: I think the most issue might be the power from the USB. Which is limited to 300 mA. You may try to monitor the supply during the data transfer and see whether there are glitches that will disconnect arduino from the USB.

I have already tried it powering the arduino from its the DC jack so the board would have its own power. Did not work.


Right know i'm using Armbian in another SD card, and with it i managed to connect grbl 0.9j, with 115200 of baud rate, but still, it does not connects to the complet firmware.

It should look like:

Grbl 0.9j ['$' for help]
>>> $$
$0 = 10    (step pulse, usec)
$1 = 25    (step idle delay, msec)
$2 = 0    (step port invert mask:00000000)
$3 = 0    (dir port invert mask:00000000)
$4 = 0    (step enable invert, bool)
$5 = 0    (limit pins invert, bool)
$6 = 0    (probe pin invert, bool)
$10 = 3    (status report mask:00000011)
$11 = 0.010    (junction deviation, mm)
$12 = 0.002    (arc tolerance, mm)
$13 = 0    (report inches, bool)
$20 = 0    (soft limits, bool)
$21 = 0    (hard limits, bool)
$22 = 0    (homing cycle, bool)
$23 = 0    (homing dir invert mask:00000000)
$24 = 25.000    (homing feed, mm/min)
$25 = 500.000    (homing seek, mm/min)
$26 = 250    (homing debounce, msec)
$27 = 1.000    (homing pull-off, mm)
$100 = 250.000    (x, step/mm)
$101 = 250.000    (y, step/mm)
$102 = 250.000    (z, step/mm)
$110 = 500.000    (x max rate, mm/min)
$111 = 500.000    (y max rate, mm/min)
$112 = 500.000    (z max rate, mm/min)
$120 = 10.000    (x accel, mm/sec^2)
$121 = 10.000    (y accel, mm/sec^2)
$122 = 10.000    (z accel, mm/sec^2)
$130 = 200.000    (x max travel, mm)
$131 = 200.000    (y max travel, mm)
$132 = 200.000    (z max travel, mm)
ok
>>> $G
[G0 G54 G17 G21 G90 G94 M0 M5 M9 T0 F0. S0.]
ok

but it is showing:


Grbl 0.9j ['$' for help]
>>> $$
$0 = 10    (step pulse, usec)
$1 = 25    (step idle delay, msec)
$2 = 0    (step port invert mask:00000000)
=0 (step enable invert, bool)
$5 = 0    (limit pins invert, bool)
$10 = 3    (status report mask:00000011)
$11 = 0.010    (junction deviatiance, mm)
$13 = 0    (report inches, bool)
$20 = 0    (soft limits, bool$22=0 (homing cycle, bool)
$23 = 0    (homing dir invert mask:000000 mm/min)
$25 = 500.000    (homing seek, mm/min)
$26 = 250    (homing debng pull-off, mm)
$100 = 250.000    (x, step/mm)
$101 = 250.000    (y, stmm)
$110 = 500.000    (x max rate, mm/min)
$111 = 500.000    (y max ratex rate, mm/min)
$120 = 10.000    (x accel, mm/sec^2)
$121 = 10.000    (y (z accel, mm/sec^2)
$130 = 200.000    (x max travel, mm)
$131 = 200.200.000    (z max travel, mm)
ok
>>> $G
[G0 G54 G17 G21 G90 G94 M0 M5 M9 T0 F0. S0.]
ok

As you can see, it has a few lines missing.
Reply
#5
What about to connect arduino via serial?
Then the TB should use one of its UARTs. Just an idea...
Perhaps is an issue of data transfer.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#6
(09-27-2019, 03:47 PM)Im4Tinker Wrote: What about to connect arduino via serial?
Then the TB should use one of its UARTs. Just an idea...
Perhaps is an issue of data transfer.

First of all, thank you so much for taking some of your time to help me out. I really appreciate that.



As log as the connection is made and maintainded correctly, it would be just fine. I shall give it a try.

I'm sorry but, how exactly i can do that? Is it through the GPIOs?
Reply
#7
I missed this thread. You are probably overflowing a buffer. You might not be able to sustain 115,200 baud if you are doing any output or calculations/processing.
Reply
#8
(10-09-2019, 12:59 PM)SurferTim Wrote: I missed this thread. You are probably overflowing a buffer. You might not be able to sustain 115,200 baud if you are doing any output or calculations/processing.

Thanks for the reply. What does that means, specifically? Sorry for being such a noob, i did not fully understand that.

And, what is a possible solution?




Also, as you can see here, in my previous reply:

"I have already tried it powering the arduino from its the DC jack so the board would have its own power. Did not work.



Right know i'm using Armbian in another SD card, and with it i managed to connect grbl 0.9j, with 115200 of baud rate, but still, it does not connects to the complet firmware.

It should look like:

Grbl 0.9j ['$' for help]
>>> $$
$0 = 10    (step pulse, usec)
$1 = 25    (step idle delay, msec)
$2 = 0    (step port invert mask:00000000)
$3 = 0    (dir port invert mask:00000000)
$4 = 0    (step enable invert, bool)
$5 = 0    (limit pins invert, bool)
$6 = 0    (probe pin invert, bool)
$10 = 3    (status report mask:00000011)
$11 = 0.010    (junction deviation, mm)
$12 = 0.002    (arc tolerance, mm)
$13 = 0    (report inches, bool)
$20 = 0    (soft limits, bool)
$21 = 0    (hard limits, bool)
$22 = 0    (homing cycle, bool)
$23 = 0    (homing dir invert mask:00000000)
$24 = 25.000    (homing feed, mm/min)
$25 = 500.000    (homing seek, mm/min)
$26 = 250    (homing debounce, msec)
$27 = 1.000    (homing pull-off, mm)
$100 = 250.000    (x, step/mm)
$101 = 250.000    (y, step/mm)
$102 = 250.000    (z, step/mm)
$110 = 500.000    (x max rate, mm/min)
$111 = 500.000    (y max rate, mm/min)
$112 = 500.000    (z max rate, mm/min)
$120 = 10.000    (x accel, mm/sec^2)
$121 = 10.000    (y accel, mm/sec^2)
$122 = 10.000    (z accel, mm/sec^2)
$130 = 200.000    (x max travel, mm)
$131 = 200.000    (y max travel, mm)
$132 = 200.000    (z max travel, mm)
ok
>>> $G
[G0 G54 G17 G21 G90 G94 M0 M5 M9 T0 F0. S0.]
ok

but it is showing:


Grbl 0.9j ['$' for help]
>>> $$
$0 = 10    (step pulse, usec)
$1 = 25    (step idle delay, msec)
$2 = 0    (step port invert mask:00000000)
=0 (step enable invert, bool)
$5 = 0    (limit pins invert, bool)
$10 = 3    (status report mask:00000011)
$11 = 0.010    (junction deviatiance, mm)
$13 = 0    (report inches, bool)
$20 = 0    (soft limits, bool$22=0 (homing cycle, bool)
$23 = 0    (homing dir invert mask:000000 mm/min)
$25 = 500.000    (homing seek, mm/min)
$26 = 250    (homing debng pull-off, mm)
$100 = 250.000    (x, step/mm)
$101 = 250.000    (y, stmm)
$110 = 500.000    (x max rate, mm/min)
$111 = 500.000    (y max ratex rate, mm/min)
$120 = 10.000    (x accel, mm/sec^2)
$121 = 10.000    (y (z accel, mm/sec^2)
$130 = 200.000    (x max travel, mm)
$131 = 200.200.000    (z max travel, mm)
ok
>>> $G
[G0 G54 G17 G21 G90 G94 M0 M5 M9 T0 F0. S0.]
ok

As you can see, it has a few lines missing."

i tried to change the OS, from Debian to Armbian and it gave some "good results", as i showed.

Does that mean something?
Reply
#9
You may not like it, but you might need to reduce your baud rate. Give it a try at a lower baud, like 38,400. See if it makes a difference.
[-] The following 1 user Likes SurferTim's post:
  • locoxhun
Reply
#10
(10-10-2019, 12:09 AM)SurferTim Wrote: You may not like it, but you might need to reduce your baud rate. Give it a try at a lower baud, like 38,400. See if it makes a difference.


Thank you so much!!!!!!!!

IT WORKED.


Due to the fact that lower baud rates did not work at TinkerOs, i didn't even think about trying it at Armbian. I changed the baud rate to 38400 and it is running flawlessly. All the lines of firmware are there, and now i'm going to draw something and send it to the machine, but as soon as the connection is made, sending files must not be a problem.


Thank you!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)