Advanced Search

Search Results (Searched for: raspberry pi 3)

  • PopBang
  • PopBang
21 Jan 2025 05:55

Linuxcnc 2.9.2 and 2.93 images for Raspberry Pi 4b & 5

Category: Installing LinuxCNC

I was able to enable i2c, but the instructions say use “sudo i2cdetect -y 1”, 1 doesn’t seem to exist for me, I can only detect 11 and 12 and neither show the 0x36 address.
I have confirmed that the pins are making good contact, so bad connection is ruled out.
Could it be the kernel configuration?
  • Cant do this anymore bye all
  • Cant do this anymore bye all's Avatar
21 Jan 2025 04:11 - 21 Jan 2025 10:31
Replied by Cant do this anymore bye all on topic Linuxcnc 2.9.2 and 2.93 images for Raspberry Pi 4b & 5

Linuxcnc 2.9.2 and 2.93 images for Raspberry Pi 4b & 5

Category: Installing LinuxCNC

To turn on i2c

edit as superuser /boot/broadcom/config.txt and uncomment the lines relate to i2c.

then edit as superuser /etc/modules and either add i2c-dev or uncomment if it is commented out

reboot

That will get i2c up and enabled
  • PopBang
  • PopBang
21 Jan 2025 03:18

Linuxcnc 2.9.2 and 2.93 images for Raspberry Pi 4b & 5

Category: Installing LinuxCNC

Hey guys, I’ve add a Geekworm x1201 UPS to my Pi5 as I often get power outages at my place and wanted a bit of extra security.
I was able to access and change the EEPROM to get it to charge and power the pi5 from the batteries. But to change anymore detailed settings, like battery monitoring, It’s telling me I need to open Raspi-config. Which I obviously can’t using the Linuxcnc image. 

Here a link to the detailed instructions, suptronics.com/Raspberrypi/Power_mgmt/x120x-v1.0_software.html
unfortunately it’s all for the Raspberry Pi OS. 

Is there anyway I can make this work or am I wasting my time? 

 
  • Cant do this anymore bye all
  • Cant do this anymore bye all's Avatar
20 Jan 2025 17:57 - 20 Jan 2025 18:03
Replied by Cant do this anymore bye all on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

The biggest issue is that Linuxcnc will require building from source as the RPi5 images don’t have Linuxcnc packages built from the most recent code base. Editing config.txt to turn on spi is a trivial matter.

Give me a day or 2 and I’ll generate an image with the most recent Linuxcnc & Mesaflash.
  • PCW
  • PCW's Avatar
20 Jan 2025 17:26
Replied by PCW on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

The 7C80 will work with the RPI5 using the hm2_spix driver.

Note that some 7C80s were shipped with firmware that does
not work with the RPI5. These cards can be re-programmed
on a RPI4 if that's convenient. All the distributed bitfiles are OK.
 
  • Onat
  • Onat
20 Jan 2025 14:16
Replied by Onat on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Hi all, 
after swapping our Raspberry Pi4 with a 5 things didn't work anymore as they did before, and thanks to this forum, as far as I understood there is no SPI support yet, right? 
I have also read that "rodw" you have created an image builder, and "Cornholio" you managed to patch it so it works right?
As we are trying to run the mesa 7c80 with a Raspberry Pi5, is there an image available currently that supports this combination? If not what would be the steps to "patch" it together? 

Thanks a lot in advance 
  • TOLP2
  • TOLP2
18 Jan 2025 11:02

RPi + Sipeed Tang Nano 20 k: new breakout board for LitexCNC

Category: Driver Boards

With the 5A-75B and 5A-75E we have a low cost way of creating a driver board for Linux-CNC. Based on the work of Romanetz, the project  LiteX-CNC  was started, providing a easy customizable firmware and driver to use these boards. The down-side however is that these boards require some soldering work to be done to accept inputs; I've messed up some boards in the process....

Therefore, Litex-CNC is going to be expanded to accept more FPGA's, starting with the Sipeed Tang Nano 20k. Compared with the 5A-75B it has less outputs (28 compared to 48 for the 5A-75B), but this is still enough for a simple 3 axis machine. The big advantage is that no SMT soldering skills are required to get this board up and running.

File Attachment:


For the Raspberry-Pi I've designed a HAT, which provides:
  • 7 extended PMOD-connectors. Each connector has 4 GPIO, power rails (+5V, max 200 mA) and a buffered enable signal;
  • RS489 connector for communicating with for example a VFD;
  • communication between Raspberry PI and FPGA using SPI in bidirectional mode (3-wire) to save on pins;
  • conforms to the HAT+ specification , including a EEPROM with settings.
With the PMOD-connectors one can easily connect to break-out boards providing stepgen, GPIO (12V/24V inputs and outputs), differential encoders, etc. I'm also working to provide support for shifting data out (74HC595) and in (74HC165).

An estimation of the HAT will be around 7 Euro's, excluding the Tang Nano 20k. Inlcuding the FPGA, the price would be around the 40 Euro price point.
  • richcolvin
  • richcolvin's Avatar
17 Jan 2025 17:56
Problems configuring 7i92TH with pncconf was created by richcolvin

Problems configuring 7i92TH with pncconf

Category: PnCConf Wizard

I am new to LinuxCNC, so please forgive me if this has already been answered.  I searched and could not find it anywhere so am asking here.  (I always hate on other forums when people just jump in with questions before searching.)

I have a 7i92TH connected to a Raspberry Pi 5.  The use case for it is for rose engine lathes, and we need to drive a spindle + 7 axes.

The break-out board we are using for both 26-pin outputs from the 7i92TH was developed using the input from Peter.  Fundamentally, we will have
  • 8 outputs to drivers, all with Step, Direction, & Enable
  • 7+ inputs for limit switches
Peter W. got us setup with the files needed to program the 7i92TH, and that seems to be working as expected.  When I run

         mesaflash --device 7i92t --addr 192.168.1.121 --readhmid

the output matches the .pin file supplied by Peter, telling me that the mesaflash --write command worked to load the .bin file supplied by Peter.

When running pncconf:
  • I've tried with copying the contents of the .pin file into the Input tab on the Help screen, and not doing this.
  • I was able to successfully discover the 7i92TH board, and it populated the Output tab on the Help screen (I didn't check word-for-word, but it seems to be duplicate of the output from mesaflash --readhmid).
When I want to proceed forward, assigning the pins to axes, I encounter the screens I've attached.

ISSUE for which I'm seeking help:  I can't figure out how the Num items (pin numbers?) match up to the .pin file.  What am I missing?
  • gene_weber
  • gene_weber's Avatar
17 Jan 2025 17:00
Replied by gene_weber on topic Raspberry Pi OS PREEMPT RT 6.13 Kernel Cookbook

Raspberry Pi OS PREEMPT RT 6.13 Kernel Cookbook

Category: Installing LinuxCNC

Rather than starting a new thread about jitter mitigation, I'm just going to add it here.

First, I'm keeping in mind that Peter Wallace said " The jitter is basically unimportant with a 7C81 unless its so bad you
get real time errors at the normal servo thread rate
."

I'm also treating the Raspberry Pi + 7C81 as a dedicated controller, not a PC. By that I mean I'm not going to be doing anything on the Pi except LinuxCNC. I may turn on WIFI to update packages, or use email to transfer a file. But I plan to even turn off WIFI before I launch LinuxCNC.


I ran several tests to see which combination of settings offered the most optimized jitter. I ran two Glxgears for all tests as I though that was reasonable, and ran the tests for long periods of time unless they looked bad early on.

I thought that turning off all unused services would decrease Jitter. So I turned off 9 of the 23 services, such as CUPS, Bluetooth, etc. To my surprise this did not decrease jitter.

Screen blank increased jitter a bit, so I turned that off. It doesn't make much sense anyway on a CNC controller.


These are the settings I added to the line already in /boot/firmware/cmdline.txt:
skew_tick=1 kthread_cpus=0-2 irqaffinity=0-2 rcu_nocb_poll rcu_nocbs=3 nohz=on nohz_full=3 isolcpus=3

I tried a few others that some people recommended on various blogs. Nothing else I tried had any noticeable positive impact on jitter, and some noticeably slowed down the responsiveness of the Pi.


Turning off timer_migration did reduce jitter. What I read said that you could make this setting permanent by adding it to the boot command line, or setting it in either of two different system files. Oddly none of that worked. So I setup a cron job to disable it at boot, and that works.
crontab -e
Add the following line:
@reboot sudo sysctl kernel.timer_migration=0


The other thing that helped reduce jitter was changing the scheduling policy to real-time and increasing the priority. I decided to create a shell script to launch latency-histogram, and eventually linuxcnc, which changes these things on the process.
#!/bin/bash
#
# Run with the SCHED_RR real-time policy at the highest priority level (99)
# Uses chrt to switch the process policy and priority immediately after launch.
#
# Gene Weber - January 2025
#
# "The difference between SCHED_FIFO and SCHED_RR is that among tasks with the same priority,
# SCHED_RR performs a round-robin with a certain timeslice; SCHED_FIFO, instead, needs the task
# to explicitly yield the processor." -Claudio

priority=99

# Truncate $1 (the command) to 15 characters starting at 0.
command=${1:0:15}

# Execute the command line provided to rrt as a background task.
`$@` &

# Get the process ID of the command.
PID=`pgrep $command`

# Change the real-time policy to SCHED_FIFO with a priority of $priority.
sudo chrt -r -p $priority $PID

I named it rrt (run real-time). So to launch latency-histogram it's simply:
rrt latency-histogram --nobase --sbins 1000

All spawned sub-processes inherit the policy and priority. So if linuxcnc is launched with rrt:
rrt linuxcnc
all of the processes that are part of LinuxCNC have the policy of SCHED_RR and priority of 99. I used Round Robin scheduling to make sure no LinuxCNC process "starves" another.

I don't know if this will work in the end, but I'm going to give it a try. Nothing ventured, nothing gained.

Implementing all of these, here is the jitter histogram. Good enough.

 
  • Cant do this anymore bye all
  • Cant do this anymore bye all's Avatar
16 Jan 2025 15:46
Replied by Cant do this anymore bye all on topic Raspberry Pi OS PREEMPT RT 6.13 Kernel Cookbook

Raspberry Pi OS PREEMPT RT 6.13 Kernel Cookbook

Category: Installing LinuxCNC

Ah yes the editor. Truly you have come of age and walked the path of darkness ;)
  • gene_weber
  • gene_weber's Avatar
16 Jan 2025 14:42
Replied by gene_weber on topic Raspberry Pi OS PREEMPT RT 6.13 Kernel Cookbook

Raspberry Pi OS PREEMPT RT 6.13 Kernel Cookbook

Category: Installing LinuxCNC

I edited my original post to include changing the display protocol from Wayland to X11. Comments by rodw and cornholio were based on the terrible jitter that Wayland induces as shown above.

Note that Kunena has the worst forum editor I've ever used, and it was quite a job to edit those posts and restore the formatting. I wonder if forum posting would increase with forum software that was more user friendly.
  • Cant do this anymore bye all
  • Cant do this anymore bye all's Avatar
16 Jan 2025 13:10
Replied by Cant do this anymore bye all on topic Raspberry Pi OS PREEMPT RT 6.13 Kernel Cookbook

Raspberry Pi OS PREEMPT RT 6.13 Kernel Cookbook

Category: Installing LinuxCNC

Looks a lot better.

One thing that was strange when running a basic config I got a real time error. hmmmmm

ATM the best image I've come across is Joco's rpi5 image rod has on his googledrive, that has a 6.6.54 kernel. It's my choice of the pre-built images.

I installed mate desktop, with 2 cores isolated, watching youtube latency is about 17-18us on my pi.
  • gene_weber
  • gene_weber's Avatar
16 Jan 2025 12:38
Replied by gene_weber on topic Raspberry Pi OS PREEMPT RT 6.13 Kernel Cookbook

Raspberry Pi OS PREEMPT RT 6.13 Kernel Cookbook

Category: Installing LinuxCNC

The good news is switching to X11 is trivial.

You can check the session type:
echo $XDG_SESSION_TYPE
    wayland

Launch Rasp-config command line tool in a terminal:
sudo raspi-config

Arrow down to "Advanced Options", and enter.
Arrow down to "Wayland                 Switch between X and Wayland backends", and enter.
If not on the line that says "W1 X11     Openbox window manager with X11 backend", arrow to it and enter.
The popup should say "Openbox on X11 is active" and have "Ok" highlighted. Enter.
It will return to the main screen. Use left-righ arrows to select "Finish". Enter.
Popup asks if you would like to reboot now, with "Yes" highlighted. Enter.

After reboot:
echo $XDG_SESSION_TYPE
    x11

Now here's the interesting apples to apples comparison. The only difference between these two pre-jitter-optimization baseline latency runs is Wayland vs X11.

Wayland:
 

X11:
 

 
  • Cant do this anymore bye all
  • Cant do this anymore bye all's Avatar
16 Jan 2025 02:41
Replied by Cant do this anymore bye all on topic Raspberry Pi OS PREEMPT RT 6.13 Kernel Cookbook

Raspberry Pi OS PREEMPT RT 6.13 Kernel Cookbook

Category: Installing LinuxCNC

Kernel as built following instructions

  • Cant do this anymore bye all
  • Cant do this anymore bye all's Avatar
16 Jan 2025 01:46
Replied by Cant do this anymore bye all on topic Linuxcnc 2.9.2 and 2.93 images for Raspberry Pi 4b & 5

Linuxcnc 2.9.2 and 2.93 images for Raspberry Pi 4b & 5

Category: Installing LinuxCNC

All my Pi's are 4GB.

Along with my Rpi5 I also have a RPi400, basically the same as a RPi4 with an slightly upped clock speed. I can say I've never come across this issue (even when rod was polishing his iamge utility).
I don't know if this will actually help, but you could try comparing the config.txt files on the Linuxcnc image & the Rasp OS image and see if there is anything that sticks out. This is just a guess.

It might pay to monitor the 3v3 line when booting, both versions, and see if there is anything untoward. Again just another guess.

But yeah it does seem like a confusing issue.
Displaying 436 - 450 out of 893 results.
Time to create page: 0.702 seconds
Powered by Kunena Forum