Jump to content
  • 0

DAQ HATs on Raspberry Pi 5


jensr

Question

The new Raspberry Pi 5 was recently announced and will be released soon: Introducing: Raspberry Pi 5! With this device being faster than its predecessors, it is a very interesting device to use with the MCC DAQ HATs. The GPIO header is very similar to those of the older models, but it could be possible that the DAQ HATs need a firmware upgrade or that the daqhats Python library needs an update.

Will the firmware and library be updated and will the Raspberry Pi 5 be supported for this hardware?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hello @jensr.

Thank you for your interest in the MCC DAQ HAQ's.  We have many users interested in using the Raspberry Pi 5 module.  We will evaluate compatibility between the Raspberry Pi 5 module and the MCC DAQ HAQ's, once the RPI 5 module is released, and update our forum and website once we have further information.

Regards,

Fausto

Link to comment
Share on other sites

  • 0

Hello @jensrand @MPSA.

We are still investigating necessary updates for the MCC DAQ HATs, with a Raspberry Pi 5, before posting a new daqhats library release and would like some user input.  

Raspberry Pi created a new chip for the Pi 5 (RP1) that sits on the PCIe bus.  This chip handles the GPIO interface, among other things.  In all the previous RPi versions, the GPIO was handled directly by the CPU and the MCC DAQ HATs use a register interface to control the GPIO pins that are used as outputs for the various HAT functions (addressing the 8 HATs, reset signals, etc.).

We also use some GPIO as interrupt inputs.  This is primarily used for the MCC 152 where the user can set it up for an interrupt when a digital I/O signal changes state. 

The recommended method for interfacing with the GPIO going forward is the gpiod library (libgpiod).  This is backwards compatible with the previous RPi models and should work for future RPi models.  The issue with using it in the daqhats library is that it uses a pin request mechanism – only one process can “own” a GPIO pin at a time by requesting it, and all other processes have to wait for the owner to release it before they can use it.  This is problematic for the address outputs since multiple processes and / or threads can be using our daqhats library to control multiple hats and they all need to share the address pins.  We can work around that by having each board code request and then release the address pins when they are done with them.

A tougher issue is the interrupt input for the MCC 152.  For code to wait for an input change interrupt, it would have to own the interrupt pin the entire time it is waiting.  A single interrupt GPIO pin is shared among all MCC 152 boards, so if a user had multiple boards and multiple processes waiting for input changes, then it would not work.  

We would be interested to know if MCC DAQ HAT users make use of the interrupts heavily.  

The current plan is to only allow a single process to own the interrupt pin when waiting for input changes.  Any other process that tries to use it will return an error.  If a user wants to use multiple MCC 152 boards for input change detection, then they would have to have a single process handle all the MCC 152 boards on their RPi.

A future plan will consider creating a GPIO daemon that is run whenever a process is using the daqhats library.  This daemon would handle all the GPIO input / output processing from a single location and all other processes would communicate with it to set the board address, wait for events, etc.  

 

Do you currently use the MCC DAQ HATs?  If so, which models and can you describe your application needs?

If you are new to the MCC DAQ HATs and interested in using them, please indicate which MCC DAQ HAT model(s) and describe your application needs.

Thank you in advance for your feedback.

Regards,

Fausto

Link to comment
Share on other sites

  • 0

Hi @Fausto, Thanks for your elaborate explanation of the current state and challenges with the upgrade to the Raspberry Pi 5. We are mainly using the MCC118 and MCC128 boards, so we are not using the interrupt input. When I use the MCC152 it is for its analog output. We use the boards to measure some signals and which we can run directly through our algorithms on the Raspberry Pi 4. The speed increase of the Raspberry Pi 5 will help us to increase the complexity of our algorithms and to increase its accuracy.

I noticed on the github repository a branch is made called pi5. Is this in a state that we can start testing it on a Raspberry Pi 5?

Link to comment
Share on other sites

  • 0

Hi, 

Has there been any updates on the compatibility between the MCC118/MCC128 and the Pi 5. I have been trying to use the Pi5 with the MCC118 with no luck, but when I use this with the Pi4 the mcc118 works as intended. Should I keep using the Pi4 until the testing has been completed on your side.

 

Link to comment
Share on other sites

  • 0

Hello @STuson.

All MCC DAQ HAT boards are compatible with the Raspberry Pi 5.  

Follow the instructions below to install the MCC daqhats software branch (beta version 1.5.0.0) for RPi 5 modules. 

https://github.com/mccdaq/daqhats/tree/pi5

1. $ cd daqhats

2. $ sudo ./uninstall.sh

3. $ git pull

4. $ git checkout pi5

5. $ sudo ./install.sh

6. $ pip install daqhats (manually add Python support)

You can switch back to the released library by uninstalling the library, running “git checkout master”, and then installing the library.

Use the installed MCC DAQ HAT Manager utility application to verify communication with the MCC 118/MCC 128 or use terminal commands.

$ sudo daqhats_read_eeproms

$ daqhats_list_boards

Do the MCC DAQ HATS work?  Verify the address jumper is in place if required.

Reply with screen captures and images of your hardware if the issue is not resolved.

Regards,

Fausto

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...