Revolution Pi for industrial product

Show the world your Revolution Pi project!
Post Reply
jpujol
Posts: 2
Joined: 15 Oct 2020, 10:52
Answers: 0

Revolution Pi for industrial product

Post 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
User avatar
dirk
KUNBUS
Posts: 1925
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Revolution Pi for industrial product

Post 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?
jpujol
Posts: 2
Joined: 15 Oct 2020, 10:52
Answers: 0

Re: Revolution Pi for industrial product

Post 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
User avatar
dirk
KUNBUS
Posts: 1925
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Revolution Pi for industrial product

Post 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.
User avatar
dirk
KUNBUS
Posts: 1925
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Revolution Pi for industrial product

Post by dirk »

Hi here is the GPIO code example.
Attachments
gpio_irq.zip
(1.33 KiB) Downloaded 496 times
Post Reply