Page 1 of 1

Revolution Pi for industrial product

Posted: 15 Oct 2020, 13:00
by jpujol
Hi,

I developed a proof of concept using a Rasperry Pi 3B+ for an industrial product to synchronize devices using TTL signals.
The project works well and now I'm seeking a Raspberry Pi industrial version to integrate in the final product.

I'm very interested in Revolution Pi but I have technical doubts about the use with our system.
The project development consists basically in a custom kernel module that use ksocket kernel library to send and receive information from ethernet port. Also use the gpio standard library from the kernel to attach an interruption to 1 input gpio and set ouput values to other 4 gpios. There are other code that use standar kernel librarys, is very important for the project use a kernel module to avoid any possible lag, this is a critical point.
The OS running in the raspberry is Raspbian Stretch.

Would be possible to run my own kernel module using some model of revolution pi?

Thanks in advance,

Kindly Regards

Re: Revolution Pi for industrial product

Posted: 16 Oct 2020, 15:30
by dirk
Hi jpujol, it is possible maybe with some modifications to the GPIO handling.
First have a look at our Git HUB repositories KernelBakery and Imagebakery.
With our new module the RevPi Compact you have cycle time of 250us.
With our RevPi Core / Connect Modules you need DI or DIO Modules which has cycle times of 2+ ms.
What sampling rate is required by your project?
Do you need more information?

Re: Revolution Pi for industrial product

Posted: 19 Oct 2020, 16:01
by jpujol
Hi dirk,

At the moment the TTL signal that I handle has a maximum frequecy of 3KHz.
So, would be possible to work with a sample rate of 250 us. In my implementation I attach the falling edge of gpio to an interruption, so I don't poll the input GPIO directly.
Would be possible to attach some GPIO of RevPI Compact to an interruption?

The code that I'm using is like that (the functions are defined on the linux/gpio.h kernel include:

#include <linux/gpio.h>

#define GPIO_TRIGUER_IN 5
static short int IRQ_Triguer_IN = 0;
if ((IRQ_Triguer_IN = gpio_to_irq(GPIO_TRIGUER_IN)) < 0)
{
//Print error
}

if (request_irq(IRQ_Triguer_IN, (irq_handler_t) interrupt_handler_gpio,
IRQF_TRIGGER_FALLING, "TRIGUER_IN", "RASP"))
{
//Print error
}

And to configure and set the GPIO I use the functions:
gpio_request
gpio_direction_output
gpio_set_value
gpio_get_value

So, it's possible to make the same with a RevPI compiling a custom kernel module?
Do you have some sample of this operations for kernel space in RevPI?

Kindly Regards

Re: Revolution Pi for industrial product

Posted: 28 Oct 2020, 14:28
by dirk
Hi jpujol, unfortunately the TTL level does not match 24 volts so this is the show-stopper currently.
However, this is not a problem in terms of software. A colleague looks for a code example.

Re: Revolution Pi for industrial product

Posted: 16 Nov 2020, 17:10
by dirk
Hi here is the GPIO code example.