1
Messages
This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.
Messages - jbeale
2
DirtyPCBs support / should I expect the Layer Report to show copper top layer?
3
General discussion / Re: GPIB 2 USB
Code: [Select]
#!/usr/bin/python
# Python 2.7 code to get readings from Keithley 196 multimeter via GPIB
# Assumes meter is already set up to correct mode, eg. from front panel
# 2012-2017 J.Beale
from __future__ import print_function # to use print without newline
from serial import *
import time,datetime
cmdSetup = "+a:22r" # set which GPIB address for Casagrande GPIB adaptor board to talk with
cmd = "?r" # GPIB command to Keithley 196 must end with carriage return
eol_str = "n" # end of line string in file output
buffer ='' # serial input buffer
outbuf = '' # file output buffer
ser=Serial('/dev/ttyUSB1',460800,8,'N',1,timeout=1) # GPIB-USB board on USB1, with 460800 bps, 8-N-1
# ser=Serial(17,460800,8,'N',1,timeout=1) # GPIB-USB board on COM18, with 460800 bps, 8-N-1
f = open('K196-log.csv', 'w')
print ("Keithley 196 log v0.1 Dec.17 2012 JPB")
f.write ("date_time,voltsn")
f.write ("# Keithley 196 log v0.1 Dec.17 2012 JPBn")
ser.write(cmdSetup) # send setup command to GPIB board
while True:
ser.read(255) # clear out existing buffer & throw it away
ser.write(cmd) # send query to instrument
buf = ser.readline() # string terminated with 'n'
buffer = buf.split()[0] # get rid of the rn characters at the end
outbuf = str(datetime.datetime.now()) + ',' + buffer
print (outbuf)
f.write (outbuf)
f.write (eol_str)
# time.sleep(1) # from 'time' to wait this many seconds
f.close # close log file
ser.close() # close serial port when done. If we ever are...
Code: [Select]
date_time,volts
# Keithley 196 log v0.1 Dec.17 2012 JPB
2017-09-16 09:49:03.194284,NDCV+1.588137E+0
2017-09-16 09:49:04.249369,NDCV+1.588590E+0
2017-09-16 09:49:05.305443,NDCV+1.588581E+0
2017-09-16 09:49:06.343742,NDCV+1.585662E+0
2017-09-16 09:49:07.398901,NDCV+1.588626E+0
2017-09-16 09:49:08.454164,NDCV+1.588375E+0
2017-09-16 09:49:09.493511,NDCV+1.588542E+0
2017-09-16 09:49:10.548620,NDCV+1.588110E+0
2017-09-16 09:49:11.603628,NDCV+1.588595E+0
4
General discussion / Re: Personal Seismograph with Raspberry Pi (Kickstarter)
5
General discussion / Personal Seismograph with Raspberry Pi (Kickstarter)
https://www.kickstarter.com/projects/an ... eismograph
6
General discussion / Art of Electronics 3rd Ed. mentions DP !
7
Project logs / Re: Tiltmeter (seismology, etc)
Averaging the samples to give me one result every second (1 Hz output) gives me a cleaner signal. Over a period of a minute, the noise + drift is about 0.5 mV or a displacement of 5 nm (nanometers) when I have the pendulum end mechanically fixed in place. The drift is thermal, tracking the room temperature. With a 30 cm long pendulum, that would in principal give me an angular resolution around 15 nano-radians (3 mas = 3 milli arc seconds). In practice I think some uneven thermal expansion (=> tilt) of my pendulum support will prevent that level of accuracy, unless I have very effective thermal shielding in place.
8
Project logs / Tiltmeter (seismology, etc)
Apparently the most popular sensor for this purpose is an "electrolytic tilt sensor", basically a bubble level with internal electrodes. These are not exactly consumer items. I tried building a simple pendulum tiltmeter using a split-photodiode, Optek OPR2100 (about $10 from Mouser) and LF411 opamp. The pendulum is a 0.064 x 3/4" x 12" strip of brass (K&S Metals #8247). Light from a 3W LED shines through a slit at the bottom of the pendulum into the detector. I have the photodiodes in zero-bias mode, wired anode-to-cathode so in balance, the current from one photodiode circulates through the other photodiode. This way the opamp only sources or sinks current (into the photodiodes, through feedback resistor Rf = 1 Mohm) when there is an imbalance in the photodiode current (= light level). I used a LF411 at +/- 15 V because I had it handy; I guess a more modern design would use a 5V single supply opamp and generate a 2.5V midpoint reference somehow. The pendulum will swing a long time unless damped, so I used a magnet assembly from an old hard disk drive for damping (eddy currents in the brass pendulum provide the force), this worked nicely.
My crude first attempt has a sensitivity of 1V output = 0.052 degrees tilt (3.1 minutes of arc). Calibration was based on Vout after moving the pendulum 1 mm. Walking into the room and sitting down at my desk about 3 feet from the pendulum gives about 0.1 V offset, so apparently that weight shift tilts the (old, wood) house floor by 0.005 degrees (19 arc seconds).

9
General discussion / Kickstarter: small OpenWRT platform for embedded
https://www.kickstarter.com/projects/11 ... s-computer
Also a thread about it here:
http://www.eevblog.com/forum/crowd-fund ... ith-wi-fi/
10
General discussion / Re: Laser Object Detection?
240 fps is 73 m/s or 164 mph. (I didn't realize R/C planes went that fast... wouldn't want to get hit by one!)
Imagine the laser beam illuminates a very thin plane coming up from the ground. You have 10 in^2 of reflective tape. Let's say it's two pieces of 1x5" tape, one along each wing. That means along the direction of travel, you have a strip 1 inch wide = 2.54 cm and travelling at 7300 cm/s so the 10 inch length of tape will spend only 0.35 msec passing through the plane of the laser fan. Or if you orient the 10" length of tape along the fuselage, you get 3.5 msec of illumination of a 1" wide strip of tape. So your sensor needs to be capturing the full width of the sensed area at a frame rate of 286 to 2860 fps depending on the tape geometry relative to the motion. This is sounding like a scanned system is not practical due to the scan speed required and you will need a constant illumination, ie a laser line generator- a cylindrical lens that makes a solid fan of light. That's easy enough, the real question is what the detector sensitivity requirements are, to work out the laser power needed. I'll think about that next.
11
General discussion / Re: 360 P/R optical rotary encoder, pinout
Background: the motor I mentioned before, about $10. The 20:1 worm drive is fairly quiet; the worm is metal but the gear is some plastic like nylon. The output gear that originally came on top was intended for some unknown timing belt around 1mm pitch; I cut that part off and replaced it with a 3D printed GT2 (2 mm) pulley for the more common timing belts.
Foreground: ESCAP 16-mm coreless gearmotor, compact but relatively strong. ESCAP is a Swiss brand although the motor is marked INDIA. The 3mm OD, 6.35mm long output shaft is short so a 3D printed pulley for a 6 mm wide timing belt wobbles a little on it, but still workable. The encoder is 3456 ppr relative to the output shaft, but since it is on the motor shaft, it can't measure the effect of the backlash in the geartrain.
Both of these have quadrature incremental encoder (A/B) outputs only. You can measure CW or CCW rotation like a mechanical mouse, but you don't get a separate unit turns counter (Z) output. Speaking of mice, I've also looked at LED and laser type optical mice, but even with a high-contrast target (laserprinted halftone) and low speeds, they skip a few % of ticks randomly; not good for mechanical encoder use.
12
General discussion / Re: 360 P/R optical rotary encoder, pinout
All of the "real" encoders (brand name, not generic Shenzhen) I have found cost quite a bit more. Well, I also got a used motor + Agilent Q9843 based encoder with 888 pulses per rev codewheel, pretty cheap and it works, but the encoder part could not easily be used apart from the motor.
("DC 3V 6V 12V encoder Speed motor Worm gear motor AB phase 888 lines" under $10 on ebay.)
13
General discussion / Re: Laser Object Detection?
14
General discussion / 360 P/R optical rotary encoder, pinout
15
General discussion / easy setup for wifi device
* http://windowssecrets.com/top-story/rou ... ly-unsafe/
* http://www.howtogeek.com/176124/wi-fi-p ... isable-it/