LinuxCNC + Orange Pi (allwincnc)

More
5 years 1 month ago #221774 by Bari
Replied by Bari on topic LinuxCNC + Orange Pi (allwincnc)
If you read though all the comments for the board on Amazon you'll see the problems with u-boot and Armbian. MX_Master had to battle with these and it's really frustrating when you just want to focus on writing your application and the bootloader and Linux distro is so poorly slapped together. Once we sort this out we should have some pretty stable results.

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #221897 by 109jb
Replied by 109jb on topic LinuxCNC + Orange Pi (allwincnc)
I'm back from vacation and starting back on my project to set up an Orange Pi for my milling machine. I have LinuxCNC installed, a WHB04B-6 pendant installed and all seems to be working. I also programmed up a ESP8266 microcontroller to act as a step counter. What I am using the step counter for is to see if the OPi/LinuxCNC is returning to zero steps after a run of g-code. The ESP8266 program uses 7 pins as follows:

1. 3 pins for ISRs (These are the "step" signals for x,y and z
2. 3 input pins for x,y,z direction
3. 1 pin for resetting the step counter.

When an interrupt is triggered the associated ISR checks the appropriate direction pin state and either adds or subtracts a step from the counter for that axis. The main loop writes the step counts to the serial stream back to my laptop at one second intervals. The reset pin can be used to force the counters to zero. It is a very short program and I don't see any issues with it. However, when I run it with the OPi setup I occasionally get step counts that are not zero when I return to the starting point. How I run this is as follows:

1. start LinuxCNC, home, and insure "machine" is at 0,0,0
2. reset the step counters on the ESP8266 to 0,0,0
3. run the g-code program, which to this point has been the "LinuxCNC" default program that loads with the AXIS interface.
4. MDI G0 X0 Y0 Z0
5. read the step counter.

Most times the step counters return to 0,0,0 as expected, but occasionally I will have an axis that is one step off. It is random which axis and which direction it is off. Probably happens in one of ten runs . I suspect this may be an anomaly of my step counter setup, but am not 100% sure of this. The ESP8266 should be plenty fast enough considering that I have the LinuxCNC set up for my machine parameters which is about 30 kHz maximum step rate. Being an amateur programmer I think I have a little investigation to do. Does anyone see anything obvious in my description above that raises concern?

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #221901 by Cncninja
Replied by Cncninja on topic LinuxCNC + Orange Pi (allwincnc)
I have the ALL-H3-CC 1gb from Amazon and was able to load and run with no problems. where i ran into a problem was getting the video gl driver working. it ran fine just the UI could be smoother due to no gl driver. I tried every trick I could find to get it loaded. I think the Libre board is fine and cheap and more importantly available. We just need to get a good clean load that has the gl driver from the start. Someone was able to load a Lima-enabled Ubuntu image on it but had following errors tho he only has 512 ram. If we could just get a mesa or lima enabled load of Armbian i think this would work out, if anyone has a sujestion im happy to try it out i have the H3 board just sitting.

Please Log in or Create an account to join the conversation.

More
5 years 4 weeks ago #221968 by 109jb
Replied by 109jb on topic LinuxCNC + Orange Pi (allwincnc)
Making progress. I now have it set up as floows:

1. Armbian and LinuxCNC installed on Orange Pi One H3 512 Mb SBC
2. WHB04B-6 wireless pendant installed
3. Limit switches set up in LinuxCNC
4. Step rates, accels, etc set up in LinuxCNC to match the GRBL settings.
5. Harness made to connect to the breakout board on the machine.
6. Notes of everything I have done so far is updated

Stuff left to do:

1. modify Axis interface for the 1200x600 display I bought.
2. implement drive fault detection for the closed loop stepper drives I have.
3. Connect to machine and test
4. Other?

Getting closer.
The following user(s) said Thank You: wzor

Please Log in or Create an account to join the conversation.

More
5 years 4 weeks ago - 5 years 4 weeks ago #222075 by 109jb
Replied by 109jb on topic LinuxCNC + Orange Pi (allwincnc)
Got it running. Using a Orange Pi One with 512 Mb RAM. So far so good. Still some testing to do and have a lot to do to document what I have done to get to this point. Thanks for all the help from everyone.

<iframe width="640" height="360" src="
" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
Last edit: 5 years 4 weeks ago by 109jb.
The following user(s) said Thank You: Bari, wzor

Please Log in or Create an account to join the conversation.

More
5 years 4 weeks ago #222149 by 109jb
Replied by 109jb on topic LinuxCNC + Orange Pi (allwincnc)
I need help again. I am apparently not understanding how to implement an encoder/MPG wheel. This isn't for my milling machine project but rather for the future lathe project. What I am trying to do to start with is just wire and use an encoder to step 0.001 machine units per click. The encoder I am using is like the one pictured below.  

 

I have the VCC wired to 3.3v from the Orange Pi, 0V to ground, A to GPIO pin PG6, and B to GPIO pin PG7. Not sure if I should put VCC to 5v.

In my hal file I have added 

loadrt arisc encoders=1
setp arisc.encoder.0.A-port 6 # 6=PG
setp arisc.encoder.0.A-pin 6 # PG6
setp arisc.encoder.0.B-port 6 # 6=PG
setp arisc.encoder.0.B-pin 7 # PG7

setp axis.x.jog-vel-mode 0
setp axis.x.jog-scale 0.001
setp axis.x.jog-enable 1
net mpg-counts arisc.encoder.0.counts
net mpg-counts => axis.x.jog-counts

Not sure what I'm doing wrong. Can anyone help
 

Please Log in or Create an account to join the conversation.

Time to create page: 0.295 seconds
Powered by Kunena Forum