SCPI and Arduinos - Page 1
Forum section: electronics / projects

author: Wolfgang
author_rank: Super Contributor
timestamp: February 07, 2020, 06:25:36 pm
content: Hi, Im am trying to integrate homebrew instrumentation into a SCPI-infested environment witha lot of standard measurement equipment, like DMMs, PSUs, ARBs and other stuff.https://electronicprojectsforfun.wordpress.com/homebrew-scpi-controllable-instruments-with-arduino-controllers/My question:is anyone doing something similar ? Any experiences with Arduino and USBTMC ?regardsWolfgang

author: Wolfgang
author_rank: Super Contributor
timestamp: February 07, 2020, 07:42:19 pm
content: Hi,I also started with this book, but on the client side they use an outdated library that does not work anymore under a modern windows.The PIC software in the book is in assembler, which I tried to avoid, and the pics soon got to small regarding memory.As a workaround, used the PC18F4550 using USB/HID with Mikroelektronika C, but it also stopped to work under Windows 10, so I gave up onthe PICs and tried Arduino. To my pleasure, NI VISA and Keysight immediately recognized my Arduinos as SCPI devices and everything went very smooth.When I think of the HID stuff I had to program a Win32Api C library to get that going. No fun.Anyway, thanks, if you know of a more modern USB stuff please let me know.Wolfgang DL1DWG

author: Wolfgang
author_rank: Super Contributor
timestamp: February 07, 2020, 09:24:21 pm
content: Just to get you right:on the Windows PC you dont use VISA, but libusb, am I right ?and inside the controlled instrument you have programmed a USBTMC device PIC18F4550, which just like any other Keysight or RIGOL DMM, PSU, ARB, ... ?My problem was never to control instruments from the PC (I used SCPI(NI VISA) but to program something that behaves like an instrument.PS: Are you Peter Dreisiebner, the author of all the screenshot utilities ?Thanks, regards, 73Wolfgang DL1DWG

author: jancumps
author_rank: Unknown
timestamp: February 08, 2020, 06:36:53 am
content: I made this small SCPI / Arduino project:https://www.element14.com/community/community/project14/open-arduino/blog/2018/04/06/lab-automation-scpi-programmable-switch

author: Wolfgang
author_rank: Super Contributor
timestamp: February 08, 2020, 11:36:10 am
content: OK, thanks, then I will proceed with the Arduino route, with ASRL instead of USBTMC.Wolfgang DL1DWG

author: prasimix
author_rank: Unknown
timestamp: February 08, 2020, 04:24:23 pm
content: EEZ H24005 power supply controlled by Arduino Due comes with comprehensiveSCPI support. Forked Jan Breuer'SCPI parseris used as basis for SCPI command processing.

author: jancumps
author_rank: Unknown
timestamp: February 08, 2020, 04:36:27 pm
content: Quote from: prasimix on February 08, 2020, 04:24:23 pmI'm using the Breuer library whenever I can. For an Arduino UNO, it's just slightly oversized. You need to start cutting/memory-optimising . in that case it's easier to use a somewhat lighter (and incompleter) lib.Anything larger than the ATmega on the UNO can run the Breuer lib and instrument logic just fine...

author: Wolfgang
author_rank: Super Contributor
timestamp: February 08, 2020, 04:44:49 pm
content: ... had a look at it as well. Its by the book, no doubt about that, but for the UNO class its an overkill, IMHO.I wrote my own parser that just accepts unabbreviated and unambiguous commands with no frills whatsoever.People that cant type or dont know what they really want are therefore out of my target auditory, I'm afraid.Its (based on strtok) very lean on program (and RAM) space, but no beauty, thats clear.Thanks !Wolfgang