Posts

Showing posts from November, 2009

Pulses on pushbutton

Image
A friend was asking after a circuit for making pulses from a pushbutton on push and release. Two ways immediately suggest themselves- using a PIC and using a differentiator. The PIC is easy for me, at least- I have a small stock of 12F683s which are 8-pin devices. Add a bypass cap and you're in business- you could even reprogram it to change the delay, debounce the input, etc. Of course, not everyone has a PIC programmer, and I feel like it's a pretty trivial app for a PIC, so I'll not talk much more about it. The differentiator circuit is a little more involved. Apologies for the crappiness of the image- LTSpice doesn't generate great output images, for one, and this was part of a larger image (it started NPN based, and generated negative going pulses; that's where Q3, Q4, etc etc went). V3 is the switch- in the application, it should be a 100-ohm pull-up to 5V and a switch that yanks C2 to ground when it's closed. R4 pulls up the base of Q3 and Q4, keeping the

LTSpice

For those in the electronics world, SPICE simulation can be a great way to answer the "will my circuit work as advertised" question without breadboarding. It's a great sanity check- if it don't work in SPICE, it won't* work on a breadboard. LTSpice is Linear Technologies' own incarnation of SPICE. It's a nice little product, and comes with models for many of Linear's products (power supplies, op-amps, etc) along with many supporting components from other manufacturers (diodes, transistors, capacitors, inductors, etc) and generic parts (555s, LEDs, etc). Obviously, they provide it expecting people to download it, sim up a solution involving Linear parts and then sell eleventy-billion a year, thus providing a nice income stream for Linear (and it works- LTSpice makes it much more likely that I'll reach for a Linear part for power supply design than another manufacturer's parts). But for the tinkerer, it means that there's a free, very po

Breadboarding the Arduino- part 1

A few weeks ago, I purchased 10 Atmega328P's from Mouser , naively thinking it would be easy enough to get them working on a breadboard as an Arduino sans the fancy (expensive) board. I was planning to use an FTDI USB to TTL serial data cable to bootload (I bought a 5V one, then realized that the two 3.3V ones I already had would work fine- lesson one of this saga). I also bought a some 16MHz crystals and the appropriate capacitors. At this point, I want to extend my thanks to whomever it was that decided a 6-pin AVRISP compatible ICSP header would be a value-add to the Arduino. I know that 95% of the Arduino users out there will NEVER use it, but I am very grateful. So, first hurdle- I figure I'll take one of the 328s and upgrade my Arduino (it was one of the, what, six? Duemilanove's that shipped with a 168 from the factory). Supposedly, the Arduino IDE has the capability of loading the bootloader onto a blank chip through an AVRISP, but I'll be buggered if I co