Introduction
The aim of this project is to offer user-friendly measurement and automation system. As you know, VISA, which stands for Virtual Instrument Software Architecture, is a industry standard library for this purpose. It provides the programming interface between application software and measurement instruments using GPIB, USB, LAN and/or UART. Although this solution is very practical and widely used in production line, it doesn't meet the basic requirements for DIY projects. This is because it is relatively large-scale system, and specifications are totally controlled by measuring instruments manufacturers. First of all, it usually depends on proprietary software released by vendors. This makes it difficult for you to build automation system with user program or a new gadget created by yourself.
Therefore, I decided to make both of a simple multimeter/logger named as Luke and open source SDK which supports multi-platform. Luke doesn't even have display nor any control button. It should be connected to PC or smartphone via USB, and then application software or command line tool controls it and acquire data. I'm trying to make it simple as much as possible to improve usability and flexibility. For example, you don't have to install device driver because Luke is recognized as HID. Also, APIs for C++/Python will be prepared for users. It will be available to make your own measurement system based on this project. Please see below for the details.
Luke specifications
Hardware
Measurement
- 13bit ADC
- DC voltage
- High Range: -60V to 60, Resolution: 14.81mV
- Low Range: -6V to 6V, Resolution: 1.498mV
- DC current
- High Range: -3A to 3A, Resolution: 0.80mA
- Low Range -160mA to 160mA, Resolution: 40.0uA
- Max sampling rate: 1kHz (T.B.D.)
- Auto-range mode
Host Interface
- USB Full Speed
- Host interface is isolated from measurement circuits
License
- Creative Commons Attribution Share-Alike 4.0 License
https://creativecommons.org/licenses/by-sa/4.0
Firmware
- HID Class (no specific device driver required)
- Based on M-Stack:
http://www.signal11.us/oss/m-stack/
- Dual-licensed under the LGPL version 3 and the Apache License version 2.0
Cross Platform SDK
Features
- OS Linux/Mac/Windows/Android
- Compiler: GCC, MinGW and MS Visual C++
- Command line tool chain
- API for C++/Python/Ruby
- Sample program
License
- GPL v2
Implementation
Communication protocol
How to talk PC software and device firmware is always big issue. It is not too much to say that design of this part determines whether a product connected to PC is valuable or not. For my products, I designed new protocol named TBI, ToolBit Interface, to exchange data by simple messages. This protocol has something in common with GATT for BLE (Bluetooth Low Energy). Firstly, a host computer and a device have different roles. A host works as client to send a command to server in order to read/write a value. On the other hand, a device works as server to response a command from client. In addition, a fundamental unit handling read/write data is called attribute. The data stored in attribute can have any type like int, char, float, etc, but the max length of data is limited to 32-byte. Each attribute is indexed by a unique 2-byte number, attribute ID. For example, a product name stored in firmware is defined as follows as:
Attribute ID: 0x0000 value: "Luke"
This means you can get a product name by reading attribute ID:0x0000. The minimum set of commands to read/write attribute is defined for now as follows as:
OP_ATTR_VALUE_GET
Client Command Packet Format
| Header | OP Code | Attribute ID |
| 1-byte | 1-byte | 2-byte |
Server Response Packet Format
| Header | OP Code |Return Code| Attribute Value |
| 1-byte | 1-byte | 1-byte | n-byte(conditional) |
OP_ATTR_VALUE_SET
Client Command Packet Format
| Header | OP Code | Attribute ID | Attribute Value |
| 1-byte | 1-byte | 2-byte | n-byte(conditional) |
Server Response Packet Format
| Header | OP Code |Return Code|
| 1-byte | 1-byte | 1-byte...
Read more »
Hello,
I'm interested in the use in your project of the INA226 and INA3221. With adaptations could you tell me if it's suitable for use to measure the voltage and current on both the positive and negative rails of an audio amplifier? The rails will be +-42v and the expected current +-5A.
Thanks for your time,
Ian