Tuesday, March 24, 2009
circuit protection
i've been thinking that if i want to be a real grown-up with probes or circuit-pc interfaces, i'll need to use some protection.
ptc resistors are cheap and easy overcurrent protectors. they basically increase in resistance by orders of magnitude when they pass a critical current. digikey has one that trips at 25 mA, about right for mcu io. varistors (eg mov) and avalanche diodes have a complementary role, passing large currents at critical voltages. so maybe a transient voltage suppressor in parallel with a load with a series ptc (with maybe a ~high power resistor to absorb the energy) could protect against both esd and stupidity in a cheap and easy way.
according to littelfuse, though, the tvs can have too much capacitance to use them on high-bandwidth signal lines. they recommend their powerguard pgb0010603, which mouser carries for ~30 cents each.
avr microcontrollers
some frustration with the lack of good open source high-level language support for pics has lead me to investigate accessibility for the avr and other platforms made by atmel. apparently isp is at least as easy, judging by this parallel port programmer. other designs leave out the pull-up resistor on reset and drive it directly; some even leave out all the current-limiting resistors, leaving nothing but a homemade cable. can't get any simpler (and less safe) than that. (one note: some people use pin 18 instead of 20 and 21 on the parallel port for gnd.) plenty of designs out there for usb programmers, too, so i could use my netbook to flash an avr. but i think they all use an avr, so the 2-resistor programmer will always have its place. i couldn't find any refs on using the parallel port to power the mcu during programming, but i guess it doesn't matter since it will need power from the circuit to test/use.
still need to familiarize myself with all the available options for avrs. here is the atmel product guide with feature tables, etc. apparently atmel is much more stingy with samples than microchip, so i'll just have to order some from digikey or mouser.
gcc has an avr backend! it seems almost too good to be true. and there is the pymite project; still looks young but under active development.
if i go far into embedded stuff, i'll eventually need to use a rtos, like freertos, to keep my code modular and simple and to give me some platform independence.
Thursday, March 12, 2009
network hard drive vs. vista
managed to get my network hard drive mapped in *blech* vista *blech* *wipes mouth with back of hand* thanks to the hard work of others. this guy told me the right setting to crowbar into the registry as well as the 'net use' command, since the smiley-face, hand-holding "Map Network Drive..." still won't work. ('the thing i like about windows is not having to use that command line thingy...' harumph!)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\LMCompatibilityLevel from a 3 to a 1
net use Z: \\I-drive\Share password /USER:username /PERSISTENT:YES
now i just need to figure out whether i should use ftp+fuse or smbmount on my linux box.
Thursday, March 5, 2009
easy svn server
here's a very handy command to use a remote subversion repository without needed a svn daemon running all the time. for example, to check out:
svn co svn+ssh://username@server.name/path/to/repository
ssh starts and stops the server for you. can't beat that!
Tuesday, February 10, 2009
microlending
there are a few microlending efforts out there that i think are worth a closer look. kiva allows lenders to review and select loans to make. microplace looks like more of a fund for investors interested in providing capital for microlending. i should check these out, along with the others reviewed and ranked in the forbes article.
Tuesday, January 27, 2009
sympy
version 0.6.3 of sympy has c and python code generation. now i can do symbolic math and have very fast computation of the resulting expressions. cool!
In [2]: f = sympy.sympify('exp(-x**2)')
In [3]: sympy.printing.ccode(f)
Out[3]: 'exp(-pow(x,2))'
In [4]: sympy.printing.python(f)
Out[4]: "x = Symbol('x')\ne = exp(-x**2)"
also has some built-in plotting, which would be more interesting if it weren't so dangerous (pyglet crashed x twice now). but it does have plotting.textplot, which is a cheap and easy way to plot stuff in a terminal. brings back memories of the ol' hp48g.
the mpmath module that comes with sympy also has a plot module that promises convenient expression plotting. too bad it doesn't seem to work yet.
sfepy, symfe
sfepy is a finite element code written (mostly) in python. wow! i gotta check it out some time. produces convenient output formats (eg, vtk, hdf5), input files are python scripts, etc.
looks like it will eventually use symfe to do some symbolic computations with sympy.
symfe looks like it's been stale for a little over a year, though. i hope these projects don't just die.
Subscribe to:
Posts (Atom)