Fog Creek Software
Discussion Board




Petzold's "Code" Exercises and Simulations

On the recommendation of your book list, I bought a copy of Charles Petzold's book "Code".  I'm about half-way done now, and I agree its an awesome book.  A lot of the examples he gives, like stringing together relays to make gates, gates to make memory, processors, etc. are great, but I'd really like to "experiment" with that stuff: wire a couple of relays together and watch them work, etc.  Do you know of any programs that do simulations like this?  There are programs that simulate all sorts of electronics, but they seem to be high-end (i.e. expensive) tools aimed at engineers.  How 'bout a learner's sim?

Ken Klose
Monday, March 08, 2004

Years ago when I was in college there was a program called PC-SPICE that did this. It may still exist. A low end, cheap version of the program was bundled with various electronics textbooks. The high end version was used by big semiconductor companies to design CPUs.

Also when I was a child I had a great kit from Radio Shack that let you make circuits by connecting wires to springs which were surface mounted on a piece of particleboard with all kinds of electronic components. You could make all kinds of neat stuff from telegraph to a one-transistor crystal radio. This was in the 1970s (oops my age was just revealed, now Gwyn will start telling people not to buy my software because I'm so close to retirement).

Anyone else have any ideas?

Joel Spolsky
Fog Creek Software
Monday, March 08, 2004

Can have a look at this...based on the SPICE as well.

http://www.anasoft.co.uk/

Free demo with a few limitations.

Ah, one of the best Christmases ever. Asking for the Radio Shack 35-in-1, and getting the 200-in-1.

Nigel
Monday, March 08, 2004

Don't use a software emulator - pick up an electronics hobby kit and make the 'trons really do your bidding. If you enjoy it, keep working on it - there are hobbyist methods of building electronics including etching your own PC boards and mounting them in cases.

When you get tired of it, good enuff, but give it a try - you may find a new hobby. :)

Philo

Philo
Monday, March 08, 2004

Just make sure your resistors face in the right direction ;)

Nigel
Monday, March 08, 2004

You are so evil it's not even funny, Nigel.

Philo

Philo
Monday, March 08, 2004

You're a married man Philo. Flattery will get you nowhere.

Just as a horrible aside. Third year analog electronics lab. Had to breadboard a bunch of stuff, and pray to the resistor gods that they were in spec enough to get out before midnight.

Anyhow, the circuit had a few electorlytic capacitors, and as we all know, they DO have a set direction. Hooked it all up, and plugged it in.

Nothing happened for a few seconds, and then a small humming sound. Then a louder humming sound. All of a sudden there was a huge bang, and the board seemed to explode. What turned out to be the case from one of the capacitors flew straight up into the ceiling, and a streamer of paper unrolled a couple feet into the air. This was accompanied by a satisfactory amount of smoke. It's been a while, but I'm guessing the paper was the dielectric?

The lab assistant made some comment about the Loveboat docking at my table. I didn't like him.

Nigel
Monday, March 08, 2004

I learned in grad school that all electronic equipment is powered by magic smoke.  The proof of this is that if you let out the magic smoke, it doesn't work.

Another personal anecdote:  A friend of mine had a Packard-Bell that (surprise) wasn't working.  Another friend, who had a wide variety of computers in varied states of (dis)assembly in his house and a fair amount of experience with them, took a look at it.  Second friend:  "Oh, I know what the problem is!"  First friend (excited that the problem was so easy to spot):  "Really?  What?"  Second friend:  "It's f***ed up!"

Aaron F Stanton
Monday, March 08, 2004

I'd be interested to meet a EE who hasn't blown a capacitor. Mine was a nice large 120V cap for a power supply - HUGE bang, stunk up the lab for hours.

Philo

Philo
Monday, March 08, 2004

Mine had some cotton like stuff in them instead of paper.  Tried to build a tube amp as I recall. I Actually managed to make it work, but is was noisy as hell. =D

Eric Debois
Monday, March 08, 2004

120V eh? I am not worthy!

Nigel
Monday, March 08, 2004

That really brings back memories.

I used to do electronics, with PCB design/etching, etc years ago, before I got into IT.

When at college, the lecturer used to call such failed projects "wall heaters", as that's pretty much all they did.

I saw him once discarge a huge electrolytic capacitor (the size of your fist) against a metal door. That made a big bang, with sparks flying everywhere.

Steve Jones (UK)
Tuesday, March 09, 2004

Ahhh I had the Phillips electronic lab some time in the 60's, transistors the size of paperclips.  That was the springs in hardboard kind of thing.

Simon Lucy
Tuesday, March 09, 2004

When I was a kid, I tried to see what happens if you plug an 8 volt bulb (small one used in flashlights) into the wall socket (they have 220 V in Europe).

It exploded.

Jaxxxon
Tuesday, March 09, 2004

In a physics class I took, a professor shorted out a bank of charged capacitors with a piano wire.  He called it the "lets kill the instructor experiment".  I dont remember the exact voltages, but I remember it was 26 capacitors, and they were all about the size of a 1lb bag of coffee.

Big white spark, boom.  Cheers from the class.

Andrew Hurst
Tuesday, March 09, 2004

Oh gawd, keep the stories coming!  I'm in tears now!

T.J.
Tuesday, March 09, 2004

Philo:

Come to the DC meetup, and you'll meet an EE that hasn't made a capacitor explode.  Not to say I haven't had my fair share of screw ups though.  The best of which (according to my college roommates) was when I attempted to fix an old amplifier.

On EBay (now I'm showing my age) I found this broken Sony Amplifier that was found in a dumpster being sold by some crazy Mexican for $5.00.  Perfect, so it shows, up and sure enough it was found in a dumpster.

So the case had to go.  So now I've just got circuit boards laying around.  I run a real quick perliminary analysis and figure out that the preamp is working fine, but the amp itself is dead.  About now my back is starting to hurt from leaning over the damn thing.

So I put the circuit board on my lap.  Plugged the sucker back in, and I lit up like a lightbulb.  The soldered backings for those snap in parts most certainally conduct electricity.

Elephant
Tuesday, March 09, 2004

We used to fastcharge our Nicad battery packs straight from a simple lab power supply. Sometimes people forget to set the egg timer. !!!!Boem!!!!

Just me (Sir to you)
Tuesday, March 09, 2004

If you want to build your own circuits, check out an FPGA kit.  FPGAs (Field Programmable Gate Arrays) are chips stuffed full of gates and latches, and a programmable switch network to hook them all up.  You draw a schematic of your circuit (or describe it in a language like Verilog or VHDL) and download it into the chip.  Presto!  You've got a clock, calculator, microprocessor, whatever you want to design.  If you want a new design (or to fix the one you just did) just download it again.

Best of all the extensive design tools for these (schematic editors, Verilog compilers, simulators) are available for FREE.  Yes that's right, you can download a 70Mb integrated design environment (WebPack) from Xilinx, and I think the other chip makers (Altera?) have similar deals.

The basic hardware to start designing something (FPGA chip, cable to download designs, some switches & LEDs) is fairly cheap, around $100-250 or so.  See www.digilentinc.com, www.xess.com, for examples.

J. Peterson
Tuesday, March 09, 2004

"So I put the circuit board on my lap.  Plugged the sucker back in, and I lit up like a lightbulb."

Thinking about having kids?

Jim Rankin
Tuesday, March 09, 2004

As this thread is a trip down memory lane:  in the late 60s or early 70s I was teaching a math class to advanced 7th graders.  After going through the logic of a half-adder, several girls decided to go to Radio Shack and buy some basic logic chips and try to wire it up ( NANDs, etc ).  I think it worked, but I wish I knew what happened to those kids.  Did they ever turn into EEs?... ( and yes, I'm showing my age, too! )

Barry Sperling
Thursday, March 11, 2004

*  Recent Topics

*  Fog Creek Home