It has been a while since my last road-test so I had to dust off my bench and knock a few cobwebs from my brain as I dove into a very interesting new topic. I have a slightly different approach/goal than many road-testers in that my reviews are less project and more product support oriented. Let me explain. How many times have you gotten your hands on what seems to be a very “cool” dev kit, only to find that the documentation or example projects lack the details to go beyond the basic understanding of the product. Maybe there is a lack of IDE support or the board limits a full feature accessibility or the examples are not clear.
My first impressions were very mixed. I viewed all the introduction videos, as well as reviewing a number of LabVIEW documents, and came away very interested, but also confused. There seemed to be great potential for developing experimental and test systems, but very little that ties everything together for such a system. In respect to the Raspberry Pi Pico (“Pico”), no disrespect to Jan and Shabaz, the functionality is limited to a few basic I/O features. They have laid some great groundwork for expanding the interface and I look forward to exploring future releases, as well as possibly adding to some myself. I just need to polish up my compiling skills polished up a bit.
This brings me to a question: Is there any other GitHub accounts working on this roadtest? I’m assuming with 17 other Roadtesters there may be one or two out there. I tried searching and found some non-E14 related sites. The current release has reference for using the I2C ports (i.e., high resolution get analog input function), but no further documentation or examples. The same documentation issue can be said about the resistor test example.
But back on my expectation, in reviewing the Labview documentation, it would seem to be a great program for tying different pieces of test equipment together to automate testing of processes and products, and not necessary a platform for building a standalone product. With that said, if my goal was to generate a project, I would use the Pico to create a support interface that would interface with other equipment to complete a task. Like for a battery tester, using the Pico I/O to turn a dynamic load box on during a discharge cycle, monitor the battery voltage and current, then report the results before continuing to another cycle or terminating the test. But again, how to I bring the Pico into the overall test configuration which may include other piece of equipment?
Initial Turn-on…
The short video on how to load the pico_scpi_usbtmc_labtool.uf2 boot program was spot on and easy to follow. For further clarity here is my Windows 11 device manager display before loading the file:
And after loading the boot file:
Expand on the USB Test and Measurement Device to find the device ID (under the Event tab) that should be used in the initializing process. This took a few tries before I noticed that the Pico was not the default device in the resource drop-down.
Easy as pi!
Down to the Nitty Gritty…
Like I mentioned before the current functionality is limited to a number of basic features or operations, as outline below:
- Initialize and Close are required to generate and disposal of a VI, respectively.
- Action-Status is mainly for setup the digital and/or analog output functionality of a set of 3 specific GP I/O pins each. The digital output is binary, while the analog output is the duty cycle of a binary PWM waveform. No function status is returned or supported by these functions, but the Data functions can be used to check their state. Just a little confusing.
- Data functions serve two tasks. One set of VI commands is used to read/get digital and/or analog input from a different set of 3 specific GP I/O pins from the Action-Status commands I/O pins. The second task allow the monitor/query of the digital and/or analog output pins set by the Action-Status The digital input is a single bit binary, while the get analogue input returns 12-bit binary value of the analog voltage at the one of two GP I/O pin. The get analog output command returns the duty cycle of a binary PWM waveform set by an Action-Status function.
The following is the analog out control VI example illustrating the use of both the set analog output (Action-Status) command and the get analog output (Query Data) command:
In summary, most of the current Pico interface functions access or control just a few digital and analog pins and only a single pin at a time. In the past month work has been done to expand the analog feature to address an external ADC through the I2C port, but with little documentation. A short tutorial on how to generate new functions would be helpful.
A Simple Project…
After successfully experimenting on the digital output example, I setup the get analogue input (stand) example. Again, limited documentation. The input was from a 1K/1K ohm voltage divider between 3.3V and ground.
I added a circuit to convert the binary output to an actual voltage (bit count x 3.3/4096) and an indicator for when the voltage is above a certain amount (1.2V). I also graph the voltage over time. This could be a start of a very simple battery charging system with the addition of a digital output control to a relay connected to a power supply, but I ran out of time.
What Next…
As mentioned in my introduction, both Jan and Shabaz did a great job laying the groundwork for the VI interface, but I would still like to explore the ability to add new functionality to the Pico. The actual road test duration was just too short to reach that goal, but as time permits, with the holidays and all, I would like to head in that direction. There has been some movement in the direction of accessing the I2C port, but limited to specific accessory devices (i.e., high resolution ADC, etc.). My goal would be to create a generic I2C interface that could be used for various environmental sensors, specified in the VI’s front panel.
Second, I would like to explore the process of integrating my new visual instruments into larger systems incorporating pre-existing Vis. In addition, I would like to try running two Picos that communicate between each other on my PC. The documentation implies the running of multicore devices with a single VI. From my preliminary tests, it appears that two Picos can be connected to the same PC only if each VI has a different name, even if they have the same function.
Third, improved the documentation.
Thank you for the opportunity to explore and learn about the interesting world of NI’s LabVIEW.
Gordon Margulieux (gordonmx)
Top Comments