First automated ramps

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/12/2018 at 05:080 Comments

I soldered the test board and tested the whole hardware :-)

Not visible is the thick cable to the PSU to reduce losses (unlike the previous tests with a breadboard and ohmic losses here and there... Some measurements were off by maybe 10%)

There were a few issues, for example the mouse would continually reset when connected to the hub at the same time as the PSU. So I found a new USB cable... and now it works. There is no flow control with the PSU so I have to insert wait statements everywhere...

The following script is a crude example:

# configure and check PSU
ls $TTY
stty 9600 cs8 raw -echo -echoe -echonl -echoprt -echoctl -echoke -parenb -F $TTY
sleep .1
echo -n "*IDN?" > $TTY
sleep .1

#test the mouse souris

#start in another terminal : od -An -v -w1 -t x1 $MOUSE

#turn off:
echo -n "OUT0" > $TTY
sleep .1
#set max current
echo -n "ISET1:0.060" > $TTY
sleep .1
#set output voltage
echo -n "VSET1:0" > $TTY
sleep .1
#turn on:
echo -n "OUT1" > $TTY
sleep 2

for i in 0 1 2 3 4 5 6 7 8; do
   echo -n "VSET1:"$i >> $TTY;
   echo $i"V";
   sleep .6;

for i in 7 6 5 4 3 2 1 0; do
   echo -n "VSET1:"$i >> $TTY;
   echo $i"V";
   sleep .5;

I won't go much further with Bash, because it's not practical enough. I'd use Python if I was better but I'll stick to C. 

Here is how it works so far :

At the end of the script, one terminal window shows that the mouse has sent 2 packets that indicate the relay closing and then opening : success !

Things to know : I have increased the series resistor to 100 ohms because it increases the resolution. The PSU can only set the output voltage with 10mV steps and a higher resistance increases the voltage required to latch the relay, so I get an equivalent resolution of 2.5mV (approx.). All the relays will be tested under the same conditions so the actual voltage doesn't matter, as long as the measurements cluster the values of similar coils.

The mouse has 3 buttons so I wired 3 sockets for the relays and I could test 3 sockets in parallel (with the appropriate SW)?

I have already observed pretty significant variations in the latching voltages of 3 relays... But better SW is required now.