Advanced Search

Search Results (Searched for: raspberry)

13 Nov 2023 09:11 - 13 Nov 2023 09:15

Comparison between Raspian 12 Bookworm on Raspberry Pi 4 and Raspberry Pi 5

Category: Installing LinuxCNC

To prepare a version of Raspbian 12 for Raspberry Pi 5 with PREEMPT_RT I used the script reported here

forums.raspberrypi.com/viewtopic.php?p=2145335

appropriately modified to take account of the patch, taking into account the indications given here
github.com/kdoren/linux/wiki/Building-PR...nel-for-Raspberry-Pi

I used the Linux Kernel is 6.1.61 while the RT patch used is the one for 6.1.59-rt16
 
The procedure produced no errors and therefore I installed the OS on a new microSD containing the new Raspbian 12
pi@raspberrypi5:~ $ uname -a
Linux raspberrypi5 6.1.61-rt16-v8_16k-elvrt+ #3 SMP PREEMPT_RT Tue Nov 7 13:13:29 CET 2023 aarch64 GNU/Linux

Then I added "isolcpus=2,3 max.processor.cstate=1" to /boot/cmdline.txt

Also in this case installing Linuxcnc can be done easily with the LinuxCNC installer script
www.linuxcnc.org/linuxcnc-install.sh

I then ran the command "latency-histogram --nobase --sbinsize 1000 --servo 25000". the value 25000 of the servo parameter is the minimum value allowed by the procedure

The results are definitely surprising

 

I tried the latency test here with smaller servo values.
The lowest value that did not show the "Unexpected realtime delay" message was
latency-test 12000
 

However the hal_pi_gpio module could not be loaded
pi@raspberrypi5:~ $ halrun -I
halcmd: loadrt hal_pi_gpio
Note: Using POSIX realtime Raspberry Pi 5 Model B Rev 1.0 found
The Pi model 23 is not known to work with this driver but will be assumed to be be using the RPi2+ layout 40 pin connector
HAL_PI_GPIO: can't open /dev/gpiomem:  2 - No such file or directory
If the error is 'permission denied' then try adding the user who runs
LinuxCNC to the gpio group: sudo gpasswd -a username gpio
HAL_PI_GPIO: can't open /dev/mem:  13 - Permission denied
hal_pi_gpio: rtapi_app_main: Operation not permitted (-1) 
:1:waitpid failed /usr/bin/rtapi_app hal_pi_gpio
:1:/usr/bin/rtapi_app exited without becoming ready
:1: insmod for hal_pi_gpio failed, returned -1

Instead the hal_gpio module it needs to be changed like this
pi@raspberrypi5:~ $ halrun -I
halcmd: loadrt hal_gpio inputs=PIN31,PIN32,PIN33,PIN36,PIN11,PIN12,PIN35 \
halcmd+:                                 outputs=PIN38,PIN40,PIN15,PIN16,PIN18,PIN22,PIN37,PIN13 \
halcmd+:                                 invert=PIN38,PIN13 \
halcmd+:                                 reset=PIN40,PIN15
Note: Using POSIX realtime
halcmd: show pin Component Pins: Owner   Type  Dir         Value  Name      
4  bit   OUT         FALSE  hal_gpio.PIN11-in      
4  bit   OUT         FALSE  hal_gpio.PIN11-in-not      
4  bit   OUT         FALSE  hal_gpio.PIN12-in      
4  bit   OUT         FALSE  hal_gpio.PIN12-in-not      
4  bit   IN          FALSE  hal_gpio.PIN13-out      
4  bit   IN          FALSE  hal_gpio.PIN15-out      
4  bit   IN          FALSE  hal_gpio.PIN16-out      
4  bit   IN          FALSE  hal_gpio.PIN18-out      
4  bit   IN          FALSE  hal_gpio.PIN22-out      
4  bit   OUT         FALSE  hal_gpio.PIN31-in      
4  bit   OUT         FALSE  hal_gpio.PIN31-in-not      
4  bit   OUT         FALSE  hal_gpio.PIN32-in      
4  bit   OUT         FALSE  hal_gpio.PIN32-in-not      
4  bit   OUT         FALSE  hal_gpio.PIN33-in      
4  bit   OUT         FALSE  hal_gpio.PIN33-in-not      
4  bit   OUT         FALSE  hal_gpio.PIN35-in      
4  bit   OUT         FALSE  hal_gpio.PIN35-in-not      
4  bit   OUT         FALSE  hal_gpio.PIN36-in      
4  bit   OUT         FALSE  hal_gpio.PIN36-in-not      
4  bit   IN          FALSE  hal_gpio.PIN37-out      
4  bit   IN          FALSE  hal_gpio.PIN38-out      
4  bit   IN          FALSE  hal_gpio.PIN40-out      
4  s32   OUT             0  hal_gpio.read.time      
4  s32   OUT             0  hal_gpio.reset.time      
4  s32   OUT             0  hal_gpio.write.time


Obviously, I remain available to anyone who would like further information
13 Nov 2023 08:52 - 13 Nov 2023 08:56

Comparison between Raspian 12 Bookworm on Raspberry Pi 4 and Raspberry Pi 5

Category: Installing LinuxCNC

- Raspian 12 Bookworm version on Raspberry Pi 4 

As reported here
linuxcnc.org/docs/devel/html/getting-sta...lling_on_raspbian_12
I prepared a microSD card with the latest version of Raspbian to use on both Raspberry Pi4 and Pi5 and then evaluate the differences

After up to date with the latest packages, I moved on to install the patch for the PREEMPT_RT.

It must be said that I didn't use the command 
    sudo apt-get install linux-image-rt-arm64
in addition to the fact that the available version is not aligned with the version of the operating system and that in any case (having tried directly) despite the installation being completed without errors, it does not produce any effect.
In my opinion this is due to the fact that the procedure installs the files in /boot rather than in /boot/firmware.
packages.debian.org/bookworm/arm64/linux...13-rt-arm64/filelist

Therefore I followed the Kevin Doren procedure mentioned above.
It should be noted, as reported in the link above, that the installation instructions currently require changes for debian bookworm that expects the files to be copied into directory /boot/firmware/ instead of /boot/

Verify the correct installation with the command
pi@raspberrypi4:~ $ uname -a
Linux raspberrypi4 6.1.54-rt15-v8+ #1 SMP PREEMPT_RT Fri Sep 29 08:29:09 BST 2023 aarch64 GNU/Linux

Then I added "isolcpus=2,3 max.processor.cstate=1"  to /boot/cmdline.txt (for latency issues)


Installing Linuxcnc can be done easily with the LinuxCNC installer script 
www.linuxcnc.org/linuxcnc-install.sh

The result of the latency test (latency-histogram --nobase --sbinsize 1000 --servo 40000)
is the following
 

Then I verified that the hal_pi_gpio and hal_gpio modules load without error.
pi@raspberrypi4:~ $ halrun -I
halcmd: loadrt hal_gpio inputs=GPIO6,GPIO12,GPIO13,GPIO16,GPIO17,GPIO18,GPIO19 \
halcmd+:                                 outputs=GPIO20,GPIO21,GPIO22,GPIO23,GPIO24,GPIO25,GPIO26,GPIO27 \
halcmd+:                                 invert=GPIO20,GPIO27 \
halcmd+:                                 reset=GPIO21,GPIO22
Note: Using POSIX realtime
halcmd: show pin
Component Pins: Owner   Type  Dir      Value  Name      
4  bit   OUT         FALSE  hal_gpio.GPIO12-in      
4  bit   OUT         FALSE  hal_gpio.GPIO12-in-not      
4  bit   OUT         FALSE  hal_gpio.GPIO13-in      
4  bit   OUT         FALSE  hal_gpio.GPIO13-in-not      
4  bit   OUT         FALSE  hal_gpio.GPIO16-in      
4  bit   OUT         FALSE  hal_gpio.GPIO16-in-not      
4  bit   OUT         FALSE  hal_gpio.GPIO17-in      
4  bit   OUT         FALSE  hal_gpio.GPIO17-in-not      
4  bit   OUT         FALSE  hal_gpio.GPIO18-in      
4  bit   OUT         FALSE  hal_gpio.GPIO18-in-not      
4  bit   OUT         FALSE  hal_gpio.GPIO19-in      
4  bit   OUT         FALSE  hal_gpio.GPIO19-in-not      
4  bit   IN          FALSE  hal_gpio.GPIO20-out      
4  bit   IN          FALSE  hal_gpio.GPIO21-out     
4  bit   IN          FALSE  hal_gpio.GPIO22-out      
4  bit   IN          FALSE  hal_gpio.GPIO23-out      
4  bit   IN          FALSE  hal_gpio.GPIO24-out      
4  bit   IN          FALSE  hal_gpio.GPIO25-out      
4  bit   IN          FALSE  hal_gpio.GPIO26-out      
4  bit   IN          FALSE  hal_gpio.GPIO27-out      
4  bit   OUT         FALSE  hal_gpio.GPIO6-in      
4  bit   OUT         FALSE  hal_gpio.GPIO6-in-not      
4  s32   OUT             0  hal_gpio.read.time      
4  s32   OUT             0  hal_gpio.reset.time      
4  s32   OUT             0  hal_gpio.write.time

However, this microSD is not compatible with the Raspberry Pi 5, due to the PREEMPT_RT patch which is not compatible.

Therefore I had to prepare a new microSD for the new Raspberry.
13 Nov 2023 08:44

Comparison between Raspian 12 Bookworm on Raspberry Pi 4 and Raspberry Pi 5

Category: Installing LinuxCNC

In the last few days there have been a lot of news that have led me to study the performance of LinuxCNC on Raspberry Pi.

In particular, the novelties are:
- purchase of the new model of Raspberry Pi 5
www.raspberrypi.com/documentation/computers/raspberry-pi-5.html

- availability of a new version of the Raspbian operating system based on Linux 6.1 and Debian 12
downloads.raspberrypi.com/raspios_arm64/release_notes.txt

- availability of a new version of the patches to PREEMPT_RT the latest version of Raspbian compatible
github.com/kdoren/linux/releases/tag/rpi_6.1.54-rt15

- the release of the official version of LinuxCNC 2.9.1
forum.linuxcnc.org/29-forum-announcement...2-9-0-release#284586

In the next two posts I will tell you about my experience
12 Nov 2023 10:30

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Tried your branch (thanks for the work BTW)

Though the rpi5 does not boot, I'd guess the first boot script needs some magic, but I'm not familiar yet with the project to understand what is not working. 
I have a rpi5 dedicated for a linuxCNC test bench, so I's love to be able to perform some testing if someone has the time to take a look at this. 
 
09 Nov 2023 08:24

LitexCNC: firmware and driver for 5A-75B and 5A-75E

Category: Driver Boards

Just released version 1.1.0 to PyPi!

Added new drivers for SPI communication. For current users this requires a minor modification in their configuration files. The connection entry in the config-file must be altered to include the field connection_type. See for further guidelines on the parameters for the connection, including the new SPI connection, the updates help-files.

Further minor changes to the CLI:
  • install_litex: DEPRECATED, the functionality has been transferred to install_toolchain.
  • install_toolchain: Also installs Litex, and on a RaspberryPi also OpenOCD.
  • flash_firmware: Flashes the firmware to the LED-card using OpenOCD. Designed for flashing with a RaspberryPi, however other adapters can also be selected by their name.
08 Nov 2023 12:58 - 08 Nov 2023 13:29
High max jitter was created by OneMyr

High max jitter

Category: General LinuxCNC Questions

Hello there,

actually i am having a high max jitter, i tried to run linuxcnc on my raspberry pi 4 and when i run the latency test i got values of servo thread of about 88972574 and base of 50056722 like in this image drive.google.com/file/d/1Dx10cUhac0YA6R9...sK/view?usp=drivesdk, and i don't know how to solve it, is it possible?

i tired with another build and the this was the values drive.google.com/file/d/1EH_aMwVQL3exWtA...7a/view?usp=drivesdk

thanks, and sorry if i miss something
08 Nov 2023 07:52

LinuxCNC with Raspberry pi 4

Category: General LinuxCNC Questions

Hi everyone, I'm fairly new to this. You can say I am a noob in Linux.

We want to build a CNC machine for testing stuff. I'll be using nema 23 and 17 motors connected to TB6600 motor drivers as well as limit switches and other components down the line. This will all be connected to a raspberry pi 4 and we want to use the linuxcnc to control the motors and send gcode onto them.

I wanted to know if I would I go about the configurations on my Raspberry pi4 and the components so that the software can recognize these and give them control. i searched that i need to configure or map the GPIO pins in the HAL? any responses would be greatly appreciated. Thanks!
06 Nov 2023 13:45 - 06 Nov 2023 13:49

LitexCNC: firmware and driver for 5A-75B and 5A-75E

Category: Driver Boards

Last Saturday I've launched this open-source project in The Netherlands during a CNC Tech Meetup, so I opened the repository. You can find it here .



The board features:

Designed for Raspberry Pi 4 and 5 (the older version RPi 3 might also work) with SPI communication
  • 3 I/O connectors:
    • each 17 pins of freely addressable inputs / outputs;
    • selectable 10 kOhm pull-down or pull-up resistor;
    • optional 5V power supply on the connector;
  • 2 RS489 connectors for communication with VFD's or other peripherals (powered by Rasberry Pi);
  • number of GPIO can be extended by using serial connection through the three I/O connectors (up to 64 GPIO per serial channel);
  • eco-system of break-out boards designed for the HUB75HAT is under development. Currently the following boards are available:
    • BOB4STEPGEN: 4 differential stepgen drivers with ENA, DIR, PULSE outputs and ALARM input. The board also has 4 inputs for homing switches, which can be individually selected to be either NPN or PNP.
    • BOB4ENCODER: 4 differential encoders with A, B and Z (index) channels. Per channel it can be selected whether it is differential or single ended, allowing re-use of possible unused channels. This board also features connectors for serial daughter boards for expanding GPIO or attaching other sensors.
Total cost of building the HAT (excluding the Raspberry Pi, but including the 5A-75B) is around 35 Euro.

There is still some work to do in that repo, for example the board has the following issues:
  • the space around the 40 pin connector of the HAT is a bit tight with the mounting points of the RPi. The solution to work with the current board is to use plastic stand-offs and cut part of these away.
  • the enable signal should be inverted on the board, because the buffer Output Enable (OE) is active LOW. I rather send a HIGH signal to the board to enable it (safety).
  • enable LED is not working (can also be a problem with the buffer IC, had some trouble with soldering this buffer). However, even if this LED was working, it would indicate that the board would be disabled (see previous point);
  • The 3 I/O headers do not have space for shrouded headers. Instead, I chose to use colored pin headers to show the different functions of the pins;
06 Nov 2023 08:40

Stepper motors in France, online shop

Category: User Exchange

  Raspberry Pi to drive a stepper motor, you need to connect a motor driver module such as L293D or L298N. both of these modules are suitable for 12V stepper motors. Therefore, the choice of driver module depends on you and here the L298N motor driver module has been chosen.
  L298N is a specialized driver IC, which is an H-bridge IC and differs from L293D by its increased output current and enhanced power. Its output current is 2A, the maximum current is 4A, the maximum working voltage is 50V, it can drive inductive loads, such as high-power DC motors, stepping motors, solenoid valves, etc. Especially, its input can be directly connected with the microcontroller, thus it is easily controlled by the microcontroller. When driving DC motors, it can directly control stepper motors and realize forward and reverse motor rotation, which can be realized by changing the logic level of the input.
  The above is my intercept from the information on the steppermotor website, there are many related tutorials on it.
05 Nov 2023 23:24

Issues with Raspberry Pi4 and Mesa 7i96

Category: PnCConf Wizard

Well, user error is the fault. Long story short, the switches were not correct hence my steps were not correct.
Got that and a few other things fixed and now my lathe is up and running! Thanks for the help!
05 Nov 2023 19:28 - 05 Nov 2023 23:01

Issues with Raspberry Pi4 and Mesa 7i96

Category: PnCConf Wizard

Managed to sort the REV/FWD issue out. I think Output1 is stuck on, no matter polarity it instantly grounds my signal cable.
Changed over to use Output 4 and 5 instead, works fine now!

Next problem that has me quite stumped.
I've set my drivers to 1600 steps per revolution. They're geared 2:1(motor:screw) and for Z it uses a 5mm/rev screw.
This should equal 3200/5 = 640 steps per millimeter.
I however need to input 16000 steps to get a millimeter of movement. 
Similar on X where I need 5000 steps but should need 800.
Need to have a good long think about what could cause this.
05 Nov 2023 09:18
Torno CNC was created by joseplluisc

Torno CNC

Category: Español

Hola a la comunidad

He empezado un proyecto consistente en un torno CNC. De momento me estoy centrando en la estructura, la base, las patas y lo que son las guías Z del torno. Aquí tenéis mi repositorio para quien lo quiera ver: github.com/joseplluisc/torno. Tengo también fotografías. El caso es que me gustaría contactar con alguien para que me pudiera orientar LIGERAMENTE con algunos temas. No preciso que me hagan nada. Ya tengo bastante hierro comprado, el VFD, el motor de 2,2KW i algunas cosas más. Soy un entusiasta de la electrónica, arduino, raspberryPi y he hecho ya bastantes proyectos en electrónica. Soy licenciado en matemáticas e informático de profesión con 28 años de experiencia. Tengo muy claro la profundidad del proyecto, pero siempre viene bien alguna orientación puntual. Agradecería que alguien pudiera contestarme a algunas preguntas prácticas.

Mi agradecimiento por adelantado a todos y un saludo cordial
José Luis    
Displaying 961 - 975 out of 1062 results.
Time to create page: 1.056 seconds
Powered by Kunena Forum