Skip to main content

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?
After uploading my zipped Gerber files, with the specified extensions for each layer type as indicated here, the order page shows a green "OK" label for all the layers I expect to see, including top soldermask and top copper. I notice that there is a rendering result image for some layers, including bottom soldermask and bottom copper layer, but it does NOT show either soldermask top or copper top layer, which are obviously important to the board. Should I worry about that?
3
General discussion / Re: GPIB 2 USB
Sorry to revive an ancient thread but wanted to make a note to myself at least. Had occasion to log some more data from the DMM196 and realized my old code assumed some setup had already been done. Oops!  You need to tell the card (in this case an old Steven Casagrande interface) which GPIB address to talk to (meaning you need to know which one your device is setup for). In my case, I see I helpfully wrote "GPIB = 22" on the DMM on a piece of tape, otherwise would have to find the manual online again...

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)
Followup just in case anyone was curious. The Raspberry Shake hardware has been delivered, and it works pretty well.  Casually sitting in my garage, it has been able to clearly record a M2.3 quake at 20 km distance, and also a M7.8 quake at 4400 km distance. As well as every car that drives down the street, and the washing machine on "spin" cycle.  The creators have an active newsgroup and are releasing software updates, so that bodes well for the project. https://groups.google.com/forum/#!forum/raspberryshake
5
General discussion / Personal Seismograph with Raspberry Pi (Kickstarter)
Here's something for that unused Raspberry Pi you have lying on your desk looking for something to do. A personal seismograph, can deliver data in a standard format over the network.  I've done a cruder version myself with a simple sensor + circuit, but this one looks like it has much better performance, and certainly more professional software. The HW is not open-source so I don't know the circuit details but they claim a low-noise front end, with a 4.5 Hz geophone extended to 0.5 Hz able to capture down to magnitude 2 quakes within 50 miles. I'm not associated with the project, except that I backed it.  As of Friday afternoon there are a few hours left in the KS project still:
https://www.kickstarter.com/projects/an ... eismograph
6
General discussion / Art of Electronics 3rd Ed. mentions DP !
Had anyone else noticed this?  I just got my Horowitz & Hill "Art of Electronics" 3rd Edition which came out some months ago.  This is the updated version of I think the world's best known electronics text.  I was interested to see that it mentions the Bus Pirate and the DP website in the last chapter, on page 1091 (Chapter 15 "Microcontrollers", section 9.3 G "A universal pod?")
7
Project logs / Re: Tiltmeter (seismology, etc)
Update: there is significant "1/f" type noise, I think from the photodiode itself, when I have a DC signal.  I tried a modification where I am generating a 50% duty cycle 1 kHz square wave (PWM drive from Teensy 3) to turn the LED on and off, and synchronously sample the opamp output with the Teensy 3 ADC input. I also changed the opamp to a zero-drift type LTC1050, and added parallel capacitance across the 1 Mohm to reduce oscillation due to stray capacitance at the opamp input.  I also brought the LED and sensor closer together, so that the calibration is 1 V output = 10 um (10 microns) displacement.

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)
Most of the horizontal seismograph projects I've seen use a magnet and coil as a detector, so they record earthquake vibrations in some frequency range but do not have a DC response. A tiltmeter is similar but it does have DC response, so you can see very slow tilts of the surface, that might signal an overloaded bridge, a dam about to break, volcano magma movements, etc. depending on where you put the sensor.

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
I don't know if it's appropriate to post Kickstarter projects here, but i thought this might be of interest... "Black Swift" doesn't beat the price of the cheapest router, but at  25×35×4 mm it is smaller, and also it is designed for general-purpose embedded use, instead of having to hack something out of a wifi hotspot.  Runs OpenWRT 14.07 Linux on 400 MHz Atheros AR9331, 16M flash, 64 M SDRAM, 1x USB2, 1x UART, SPI, I2C, 26 GPIO, 802.11 b/g/n.  The chip can support two 10/100 ethernet ports but that needs additional parts (eg. RJ45 with magnetics). I'm not part of the project, it is done by a Russian team; just a backer of it.

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?
Can't make a complete answer at the moment but just to start...

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
In case of interest, here's my picks from ebay in the "used DC gearmotor with encoder, under $15" category.

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
Agreed, the soldering is nasty. However it works as specified. 

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?
"totally reliable at 700 ft" That may be hard to do. Is this laser system carried by a R/C model plane or a full-sized plane?  How big is your target cross-section?  How fast will you scan  your laser beam in azimuth and elevation?  Longer wavelengths are scattered less in the atmosphere (that's why the sky is blue and the sunset is red, the blue light is scattered away) and lasers and silicon detectors usually work best around 800 - 940 nm so that's your wavelength range. The best you can do to make a model plane visible is probably cover it with SOLAS microprism type retro-reflective tape, see for example http://reflective-tape.info/posts/  note, the microprism type is much brighter than the microbead type.
14
General discussion / 360 P/R optical rotary encoder, pinout
In case of interest: Ebay has "photoelectric rotary encoder" starting around $15. These have two outputs in quadrature so you can tell the direction of rotation as well as the angle. I got a 600 pulse/rev and a 360 P/R model, the latter is in the photos below. Inside is a metal wheel with many thin slots. I wasted some time because I don't read Chinese and relied on the (wrong) pinout listed on the Ebay page. I had to take it apart to find +Vcc (5V) was the white wire, not red. Then tried translating "white" into Chinese with Google Translate.  With correct hookup it works, with Vcc >= 2.6 V. The label says VCC: 白 (white) GND: 黑 (black) Channel A: 红 (red) Channel B:  绿 (green)


15
General discussion / easy setup for wifi device
Seems like there are some good hardware choices for wifi modules out there. Now I have a slightly different question: if I want to make something with wifi that is as easy as possible to setup, how would that work? It needs to connect to your local AP to get wifi, meaning the user will have to select their AP name from a scanned list, and enter their AP password. Unless they have a router with WPS enabled, which is considered insecure*, and not present on many devices anyway.  So all the various "internet of things" devices (smart thermostat, online sprinkler system, etc) need this kind of setup step, I guess.  And if my widget doesn't have a display and keyboard, it would need to start as its own AP and present a setup webpage for the user to connect to via  smartphone / laptop / tablet and enter the local AP data.

* http://windowssecrets.com/top-story/rou ... ly-unsafe/
* http://www.howtogeek.com/176124/wi-fi-p ... isable-it/

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01642455096session_write_close ( )...(null):0
20.01672586712ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01672587488Database_MySQL->query( ).../DatabaseHandler.php:119
40.06282726248Database_MySQL->error( ).../Db-mysql.class.php:273