UsbPot Page

From EclectricWiki
Revision as of 23:21, 9 June 2018 by Admin (talk | contribs) (Installation on Windows 7)
Jump to: navigation, search

UsbPot device

File:UsbPot Box IMG5.jpg

File:UsbPot PCB IMG5.jpg

USB Digital Potentiometer

The UsbPot device is a USB controlled Digital Potentiometer, based on the Analog Devices AD5292 IC. The UsbPot can be supplied unboxed for easier system integration.

Features include: 1024 position wiper

Please consult the Eclectric website for more information about the UsbPot device and software. More info here - coming soon!

Feature 2

Here is a subsection.


Software

UsbPot GUI application (Windows)

A Graphical User Interface (GUI) software application is available for the UsbPot device, currently only supported for use on the following platforms:

  • Windows 7, 64-bit or 32-bit
  • Windows 10, 64-bit or 32-bit

The UsbPot GUI application provides a graphical user interface for simple interaction with the UsbPot device. The GUI application offers a stable 'hot-pluggable' USB serial port connection to the UsbPot device on both Windows 10 and Windows 7. The application automatically scans and displays a list of attached Eclectric USB devices. Once a COM port connection is established with a UsbPot device, the GUI application is connection failure resilient and able to automatically re-establish a connection, without the need to restart the application, if the UsbPot device is temporarily detached.

Software installation (Windows)

The UsbPot GUI application installer package is a single Windows Installer (MSI) file, compatible with both Windows 7 and Windows 10, but please take care to download the correct installer package for your machine architecture (i.e. 64-bit / 32-bit).

Installation on Windows 7

System requirements:

  • We recommend that your system is fully up to date
  • Windows 7 Service Pack 1
  • Microsoft .NET Framework 4.5

If the Microsoft .NET Framework 4.5 is not installed on your system you can download it here.

The UsbPot GUI application installer package includes a USB device driver for Windows 7 that is required for use with the GUI application and also for command line interaction using a serial port connection.

Installation on Windows 10

The UsbPot device is able to connect to Windows 10 without requiring a device driver from the GUI installation package. Therefore, if you only intend to connect to the UsbPot device using a Command Line Interface (CLI), Python script or Terminal Emulator (e.g PuTTY) then you do not need to install the GUI application.

Download latest Windows Installer MSI [UsbPot 0.0.13]

UsbPot GUI software application installer (includes device driver for Windows 7):


UsbPot GUI application operation

The UsbPot GUI application software, provided by Eclectric, is a Windows application providing a graphical user interface for easier interaction with the UsbPot device. The GUI application provides a stable 'hot-pluggable' USB serial port connection to the UsbPot device on both Windows 10 and Windows 7. The application automatically scans and displays a list of attached Eclectric USB devices. Once a COM port connection is established with the UsbPot device, the UsbPot GUI application is connection failure resilient and able to automatically re-connect without restarting the application if the UsbPot device is temporarily detached.

Graphical control of the Digital Potentiometer

picture here

Device settings

FW version
NAME
20-TP RAM


Command line operation

The UsbPot device enumerates on the USB bus as a Serial Port device, allowing direct control with your preferred command line interfacing technology on both Windows and Linux. There now follows a discussion of the various ways that you can interact with the UsbPot device via the command line with Windows or Linux. See the UsbPot device Command summary for a more comprehensive discussion of the available commands.

Command Line Interface (CLI)

Windows

Direct interaction with the UsbPot device using the cmd.exe terminal application.

C:\Users\username>echo "help\r\n" > \\.\COM24

C:\Users\username>echo "0x1803\r\n" > \\.\COM24

C:\Users\username>echo "0x07FF\r\n" > \\.\COM24

Linux

Direct interaction with the UsbPot device using the gnome-terminal terminal application.

C:\Users\username>echo "help\r\n" > \\.\COM24

C:\Users\username>echo "0x1803\r\n" > \\.\COM24

C:\Users\username>echo "0x07FF\r\n" > \\.\COM24

Terminal Emulator

Connecting to the UsbPot device is possible using any Terminal Emulator software application capable of connecting to a serial port e.g. PuTTY on Windows, Minicom/Screen on Linux.

Default serial port connection parameters:

Speed (baud) N/A
Data bits    8
Stop bits    1  
Parity       None
Flow control None 

Default UsbPot device character stream 'server' behaviour:

ECHO=ON     # Will echo each character sent to the device
PROMPT=ON   # Default prompt string: "UsbPot> "  

Windows

Connecting to the UsbPot device using the PuTTY Terminal Emulator. Simply setup a Serial Port connection to the current COM port number that Windows has assigned to the UsbPot (COM5 in the example shown). Press return on the terminal to receive a 'command prompt' and you can start to interact with the UsbPot device. See the UsbPot device Command summary for a more comprehensive discussion of the available commands.

UsbPot PUTTY Win10.jpg

Linux

Python script

Here is some code.
Here is some code.
Here is some code.

Windows

Linux

Command summary

Note on non-printable characters...

Where:
[CR] = Carriage Return (normally sent when the ENTER or RETURN key is pressed)
[LF] = Line Feed 


Character stream format...

## Query 
command[CR][LF]       ## [LF] technically not required

## Response
response[CR][LF]


Help...

## Command: HELP
## Action:  Prints a list of available commands
## Example...
UsbPot> help
[core] commands:
HELP      VERSION   ERASE     RESET
[user] commands:
NAME      ECHO      PROMPT

## Command: HELP HELP
## Action:  Prints information about the HELP command
## Example...
UsbPot> help help
Help for <help>:
INFO: Command description or a list of the available commands
USAGE: help <none|command|*|@>  none=list, *=details, @=parameters

## Command: HELP *
## Action:  Prints detailed informative about each command
## Example...
UsbPot> help *
[core] commands:
HELP            Command description or a list of the available commands
VERSION         Firmware version
ERASE           Erase device to default factory settings
RESET           Reset the USB device
[user] commands:
NAME            Device name: 20 alphanumeric characters max
ECHO            Echo on/off
PROMPT          Prompt on/off

## Command: HELP @
## Action:  Prints parameter information for each command
## Example... 
UsbPot> help @
[core] commands:
HELP            <none|command|*|@>  none=list, *=details, @=parameters
VERSION         <none>
ERASE           <none>
RESET           <none>
[user] commands:
NAME            <none|text>
ECHO            <on|off>      ## <-FIX 1.0.5 !!!
PROMPT          <on|off>      ## <-FIX 1.0.5 !!!


Renaming a UsbPot device...

## Display the current device name:
UsbPot> name 
NAME=UsbPot

## Change the current device name:
UsbPot> name Bob
NAME=Bob (please RESET device to apply name change)

## Following device RESET, the device will be re-enumerated and appear in Device Manager with a differnent COM port number
## The new device name will appear as the command prompt string:
Bob>


Other...

## Command: ECHO OFF
## Action: Disable the echoing of recieved characters
## Example...
UsbPot> echo off
ECHO=OFF

## Command: PROMPT OFF
## Action: Disable priniting the command prompt string
## Example...
UsbPot> prompt off
PROMPT=OFF


Direct control of the AD5292 Digital Potentiometer...

## Direct AD5292 command format: 

## Note: 0xNNNN is a 16-bit integer string, containing *upto* 4 hexadecimal characters [0-9, A-F] 

## Query 
0xNNNN[CR][LF]       ## [LF] technically not required

## Response
0xNNNN[CR][LF]
## Firstly, must enable control of the potentiometer 'wiper' 
UsbPot> 0x1803
0x1803

## Get the current 10-bit wiper position value:
UsbPot> 0x0800
0x0600               # 0x0000 <--> (0x0200) <--> 0x03FF

## Set the current 10-bit wiper position value:
## Note: must logically AND 0x0400 to the required value 
## Therefore, set range is: 0x0200 <--> (0x0600) <--> 0x07FF
UsbPot> 0x7FF  # set value to 1023

AD5292 Digital Potentiometer

This is a section describing the AD5292 chip. Analog Devices AD5292 datasheet is available here.

Specifications

Specifications1

1) Based on AD5292
2) 20k potentiometer (100k option)
3) USB controlled
4) USB powered (no other power source required)
5) 1,000V isolation
6) 1024 taps
7) 12V compliance wrt 0V pin
8) Rugged box / Bare PCB
9) Uses Windows Serial Drivers
10) Rugged Hot Pluggable – recoverable.
11) Command line or GUI supplied application
12) Windows or Linux (Command line only)
13) User programmable wiper position

Specifications 2

Specifications 3