Close

And the PSU (bis)

A project log for ReTest-yg

YG's own version of Mateng's ReTest, but with different features and a palindromic project number!

yann-guidon-ygdesYann Guidon / YGDES 11/11/2018 at 19:550 Comments

A year ago I started to use my new digital PSU and the early logs are there : https://hackaday.io/project/20733-hot-logic/log/56927-and-the-psu. Today I have set it up again and these logs and the files are very helpful :-)

But first I had to connect my computer to the lab PSU, which are more than 2m apart. Fortunately I found in my stock a hub and enough AtoB USB cables to connect the PSU and the mouse close to the bench. It should be moderately practical :-)

Plugging the PSU through the hub :

[1069116.978946] usb 2-1.3: new full-speed USB device number 28 using ehci-pci
[1069117.058694] usb 2-1.3: New USB device found, idVendor=03eb, idProduct=3301
[1069117.058708] usb 2-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[1069117.058714] usb 2-1.3: Product: Standard USB Hub
[1069117.061972] hub 2-1.3:1.0: USB hub found
[1069117.062213] hub 2-1.3:1.0: 4 ports detected
[1069117.348953] usb 2-1.3.2: new full-speed USB device number 29 using ehci-pci
[1069117.461864] usb 2-1.3.2: New USB device found, idVendor=0416, idProduct=5011
[1069117.461878] usb 2-1.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1069117.461884] usb 2-1.3.2: Product: USB Virtual COM
[1069117.461889] usb 2-1.3.2: Manufacturer: USB Vir
[1069117.461894] usb 2-1.3.2: SerialNumber: NT2009101400
[1069117.465957] cdc_acm 2-1.3.2:1.0: ttyACM3: USB ACM device

yup, the same /dev/ttyACM3 as before :-)

From now on, everything must be done by root, or the user should be added to the relevant group.

export TTY=/dev/ttyACM3

Then configure the serial port : file serial9600.sh

#!/bin/bash
#1 start, 8 data, 1 stop, no parity

TTY=/dev/ttyACM3
stty 9600 cs8 raw -echo -echoe -echonl -echoprt -echoctl -echoke -parenb -F $TTY

 And now we can talk !

on one terminal, display the port's output with

# od -An -v -w1 -t c /dev/ttyACM3 

 In another terminal, send a SCPI command :

echo -n "*IDN?" > $TTY

I get the following result :

[root@localhost yg]# od -An -v -w1 -t c /dev/ttyACM3 
   K
   O
   R
   A
   D
   K
   A
   6
   0
   0
   2
   P
   V
   2
   .
   0
  \0

It's working !


The relevant vocabulary is quite simple :


.

.

Discussions