Navigate: > DC > Razvan-T-EntryContact me

so this is [Razvan's] entry for the hack a day contest.
Note from Will: Here's a png of the schematic.

handy rocknroll hacktool

it's a small tool with a lot of power and versatility.
it has a mega avr for a brain, which can be selected from a large array
of pin-compatible devices (8535,16,32,or the newer 324 or 644),
depending on how smart and knowledgeable one wishes it to be. 16 recommended.
it has a microchip enc28j60 ethernet controller.
that chip is in itself a hack.
saying that it was designed in a hurry and pushed into production
is somewhat of an understatement. i mean, look at the errata.
however it does have the great quality of being "the world's smallest
eth ctl" (like anyone cares), and it's the only eth ctl in a dip pkg
(this is actually quite respectable).
moreover, if one excercises care in coding around the errata, it performs superbly.
code for using it is available under gpl as part of the procyon avrlib.
various free ip stacks exist on the net so i cannot be accused of submitting
something that doesn't do anything just because i did not bother to provide code.
it's much cooler to diy anyway.
anyway, the design is tested and works.
the possibilities are quite literally endless and i will refrain from providing
any examples at the moment.
so having an internet-capable device that fits in your pocket and pongs back in
less than 1ms is very cool, but this is not all.
i have also included a usb 1.1 compliant usb interface that is 100% software-driven.
this is a superb hack courtesy of which improved on igor's initial design.
also included are leds that can perform a user-defined useful function or simply
display nice colors at various intensities / pulse repetition rates / duty cycles,
which is in itself useful (i mean come on, it's nice and soothing).
binary watch anyone?
ahem. almost all pins on the cpu are brought to pin headers for connecting external stuff.
thus, one can implement an avr/pic/8051/whatever programmer on usb.
one can also use the serial interface, but i did not include a db9 connector, much less
a ttl-rs232 converter. not only would that have taken lots of space, but i had a stronger
reason in that the only proper way to convert ttl to 232 is that which is pictured below.

this being said, one can program microcontrollers, cplds, or whatever, and can even
do jtag debugging, granted one programs the appropriate firmware in the avr.
such firmware is available for example at programming the board is done via a
nonstandard ISP connector (which i use for all my projects with a parralel port programmer
that contains (a)db25 connector (b)2 resistors (c)wire (d)idc connector) but once
a bootloader is written it could be done over usb.
you can also make a logic analyzer, pattern generator, ..., ..., ... ...
plenty of i/o's
i'll write the code for some of these functions and others, but not now.
a key component that adds real value to this board is the state-of-the-art
analog guitar distorsion circuit! (using 4000 cmos logic of course)
now you can surf the web using the uart or leds as output AND play guitar at the same time.
of course the signal also goes into the adc for processing, which can mean
freq measurment for tuning the guitar, recording, further distorsion and other effects,
broadcasting over the net etcetera.
by leaving the input disconnected or by connecting a suitably hacked zener circuit or
something of that kind, one now has a state-of-the-art true random noise generator.
this is invaluable for stuff like cryptography and provides a secure platform :P
you can also make the leds blink random data which is cool and also a form of art
(someone did this with a 7-seg display and decoded digits).

and now for some technical discussion.
i used dip for chips but smd for most caps and resistors, 0805, as i find that quite
easy to solder and makes it all fit better and look good.
i used a single sided board, as two-sided is a waste and more sides is just govt propaganda.
decoupling caps are 100n oscillator caps are 22p the 2 caps for the eth interface are 10n.
the regulator is lm1086it-3.3 or any other suitable. this one is a "quasi-ldo" which is
very cool because ldos sometimes tend to scream.
the avr datasheet says it "typically" works on ttl logic thresholds which would allow me
to interface it with the 3.3v eth ctl directly. however the guaranteed limits fall something
like 0.1v short so i inserted a diode in series with the avr to bring the threshold down
a little. this transforms it from a quick hack to a nice hack. still should function ok
at 12meghz. it has to be 12 as the usb code is critically timed.
the early enc28j60 parts needed the spi interface to be run at 8meg at least, because
the designers had one hand inside their pants when they designed them and managed to score
a 14-chapter errata.
newer date codes (revision b-5) work ok. even the others work, but "unreliably". heh.
there's a rbias that needs to be exactly 2.32kohm, and if you have an older chip revision
you might need 2.7k or 2.0k, because, as i said, the whole chip is a hack. :)
so in order to find out what actual value you need, you have to read the revision id
from the chip, which of course translates to: if you need to know what value you need
for the circuit to work, you have to first get the circuit to work and question it.
(it works very well with 2k. use whatever series combination to obtain 2.32k 1%).
the limiting resistors in series with the activity leds can be anything, i used 51r.
the eth jack with integrated magnetics (a plain jack with no magnetics probably works
but has a different pinout) is the only one i can buy in my area. cvilux cjcba8hf1y0 i think.
i can redo the layout for any other part number in 2 business nights max.
the 3v6 zeners near the usb jack are needed because the spec says 3.3v max on data lines,
for me it works ok with 5v.
L1 and L2 are ferrite beads and can probably be ommited (shorted).

merry xmas and remember kids: one fresh hack each day keeps the boredom away
[now you got the means. eagle files follow]