Posts Tagged ‘schematic’

Temporary prototype to permanent prototype!

Posted in Power Supply on October 12th, 2009 by nisburgh – Be the first to comment
This is part 3 of 4 in the series Variable Power Supply

Now that I had a working system, I needed to make it a little more permanent.  First of all, I wanted dual outputs, so here’s the new schematic I put together.

Simple variable power supply schematic

Simple variable power supply schematic

You’ll notice that the voltmeters are run off a separate battery.  This frustrated me to no end.  Basically, most digital voltmeters *require* an isolated power supply.  You can get high end units that self isolate, but they’re about $100 each.  I wanted digital for accuracy ( this problem only affects digital VM’s – analog would have worked as is ), so I just decided to go with the battery option and see how long it lasts.  I’d be curious what it might have taken to separate off a 9V supply and isolate it from the variable outputs.. I messed with it for a while, but the closest I got was a voltmeter with a pretty heavy bow in it’s accuracy curve. :)


Coming along nicely

Coming along nicely

Anyhow, off to Radio Shack and Fry’s for a few more pieces!  Proto board, plastic enclosure and extra parts to build a dual output power supply.  After I cut the board down and drilled mounting holes, I started moving components from the breadboard to the more permanent proto board.  Here’s a shot shortly after starting to solder.  I mostly used the long leads from the components to bridge everything together.  It’s not the prettiest option, but the cost/speed beats a one-off custom PCB.  Note the beefy heatsinks for the regulators.  An absolute must!  I was reading 145 °F on the heatsink just powering a stamp, LCD and PING))) sensor.


Not easy to use, but it works!

Not easy to use, but it works!

After a couple hours of soldering, fabrication and connecting parts, I had the beginnings of a working lab supply!


Up next, switches, voltmeters and binding posts!

Water Detection Circuit

Posted in Projects on October 4th, 2009 by nisburgh – Be the first to comment

So one of the first sensors I would like to implement for the sensor mesh is a simple water detector.  You know, for washer machines, refrigerators, water heaters, etc.  Let’s you know when you’ve got a leak.  I wanted the circuit to be simple and low power, since it would almost certainly be run off a battery, and the RF gear alone was going to suck most of the available juice.  I also wanted a circuit external to the microcontroller to remember ( latch! ) if we had a leak condition, that way I could let the microcontroller and RF module sleep for a few minutes between checks, but still capture transient leak conditions ( What if a droplet hit the sensor, but then rolled off due to slope? ).

Anyhow, water is not nearly as conductive as you would think.  Rudimentary testing of water droplets indicated about 200k-500k of resistance.  My first, simple attempt at a water detection circuit did not take this into consideration.

Simplistic water detection circuit

Simplistic water detection circuit

Here’s a snapshot of the test circuit I built.  It works great using that little tactile switch.  But it doesn’t have the capability to pull the S input on the S-R flip flop to ground when running through water.  That’s simply because the path to ground for the VCC pullup has too high a resistance ( 200k-500k through water ) to drop the voltage below 0.8V, necessary for a TTL low signal.  I didn’t bother putting together an eagle schematic for this design since it didn’t work.  :)   The astute will notice I don’t actually have it wired up to an R-S flip flop ( 74279 ).  I didn’t have one on hand, so I built one with a 7400 I had in stock.

At his point, I figured that I needed some amplification of the current I was able to push through a drop of water, so obviously a transistor came to mind.  A standard NPN transistor ( 2N2222 ) wouldn’t do, though, since it doesn’t provide adequate amplification of the base current produced by 5V pushing across 200k-500k resistance.  What I needed was a Darlington transistor!  Amplify the amplification!

Working water detector!

Working water detector!

Here’s the circuit I put together using a Darlington NPN transitor to amplify the current that could be pushed through a drop of water at 5VDC.  When the power turns on, the microcontroller needs to reset the S-R flip flop by cycling the Reset line low then hold it high.  We have the S-R flip flop to “remember” when we have a moisture condition for the sleeping microcontroller.  The S input has a pullup resistor R1 just because it’s bad practice to leave a TTL input floating.  We connect that same signal to one end of our sensor probe ( SENSOR1 ), as well as the collector on our Darlington, T1.  The other side of our sensor ( SENSOR2) connects to the base of T1.  If we can push a mere fraction ( think millionths ) of an amp through that sensor, the Darlington is going to open up and dump all of the collector current through it’s emitter into ground.  This will draw the S input to ground, flipping the water signal on.  The water signal will not turn off until the Reset line ( R  on the S-R flip flop ) is pulled low by the microcontroller. Speaking of which, R2 is a pullup to make sure we don’t accidentally reset the flip flop during sleep/wake-up cycles, because on some microcontrollers, like the Stamp used here, the pins switch to inputs for 18 ms until the interpreter takes control.

Working water detector prototype!

Working water detector prototype!

I put this design together and tested it – it couldn’t work better!   In fact, it’s able to detect the microamps that were able to push through my *body*.  The Hfe on the BC517 Darlington is 30k.  *Serious amplification!* Now I had a simple circuit that could remember a closed condition ( leak ) and could detect current flowing through megaohms ( necessary for detecting the presence of water ). Mission accomplished.

Messy, but functional!

Messy, but functional!


Here’s a final shot of my work area. Prototype, circuit, Jack Daniels, power supply, mess and all! :)

Initial design

Posted in Power Supply, Schematics on September 22nd, 2009 by nisburgh – 2 Comments
This is part 1 of 4 in the series Variable Power Supply

I started tinkering with electronics again recently and quickly realized the need for a good power supply.  Shopping around, it became apparent that a decent dual-output unit was going to set me back quite a bit.  So I started doing some research on what would be involved in a simple little power supply I could build on my own.  Enter the LM317 variable positive voltage regulator.  Fantastic little IC capable of providing up to 1.5A and 1.2-36 volts.

First iteration - variable power supply

First iteration - variable power supply

Here was the first schematic I put together from various circuit designs available around the internet.

Working from left to right, we have our 120VAC input, which goes through a switch and a fuse to energize a basic 120/28 or 120/36 step down transformer.  ( BTW, it’s very difficult to find a transformer of that size with the VA rating to handle a couple of these power supply circuits at full output! ).

Now that we’ve stepped down our common household voltage, we rectify it using a standard bridge rectifier B1 ( 2A for safety ), followed by a large capacitor and a small one.  The 1000μF cap is there to provide substantial current in the event of transient demand spikes.  This large capacitor, though, does not respond very quickly, so we paired him up with a 0.1μF cap for higher frequency pulse suppression.  These caps help cut down on voltage ripple in the eventual output.

Next we have the workhorse of the circuit, the LM317.  Note that most manufacturers that produce regulators will have something comparable to the 317.  You don’t have to have the actual National Semiconductor part for this project ( I don’t!  I use an NTE956 because it was readily available at Fry’s Electronics ).  Any 1.2V-36V variable positive voltage regulator with a 1.5A output will do fine.  Double check that pinout!

Anyhow, the 220Ω resistor ties back in to the adjust pin as feedback gain, which you then pull down with the 5kΩ potentiometer.  The more current fed into adjust, the higher the output voltage.  Hence, as you increase resistance on the pot, you increase the output voltage!  All the way up to about 36VDC!  BTW, another fantastic feature about these regulators is that they’re extremely hardy, with built-in overload and thermal protection features.

Finishing up the circuit walkthrough, we have one more cap, C4, rated at 0.1μF, for further noise suppression and to hopefully limit our voltage ripple to an acceptable level.  Once I get a good oscilloscope, I’ll let you know what the actual ripple is.

In later posts, I’ll cover the ongoing construction of this project, along with adding a second output and voltmeter displays.

Schematics and PCBs with Eagle

Posted in Boards, Recommendations, Schematics on September 22nd, 2009 by nisburgh – Be the first to comment

So I’ve spent a couple of weeks looking for a good tool to handle schematic capture and PCB layout.  At first I tried various free tools from the cheaper PCB fab houses like ExpressPCB and Pad2Pad.  They were ok, but I ran in to limitations pretty quickly.  And the bigger problem was the lack of adequate parts libraries.  I didn’t want to spend hours and hours laboring over footprints that should already be available.

So, after some more research, and high marks from hobbyists and professionals, I started working with Eagle 5.6.0.  I am extremely pleased with this tool.  I’m currently using it as freeware, which is great because for most hobby type electronics, it’s more than adequate.  Plus, if I need more power, I can upgrade the license at a fairly low cost.

After reading thoroughly helpful tutorials from Sparkfun, I got the hang of the software.  I will admit it’s a bit, umm, gangly in some of it’s user interface.  But once you get used to it, it’s fantastic!  Check out this power supply I designed after only a few hours of work:

Simple variable power supply schematic

Simple power supply

I even created a custom library to handle off-board components like pots, LEDs, etc.  Overall, I’m impressed with the drafting abilities of Eagle, and will continue using it for future projects.

Now the next question was the PCB layout software.  How good was it?  Did it have the all-important auto-routing functionality?  For most prototypes and simple one-offs, I like auto-routing.   It provides a good starting point, and can help you solve routing issues in ways you hadn’t considered.

Well, here’s the PCB from the above schematic.

Corresponding PCB

Corresponding PCB

Note that I only spent a few minutes laying out the components.  The silkscreen needs a lot of tuning.  ;)   There are certainly better ways to lay things out to economize on board space and simplify routes.  Also note that I currently don’t have dimensions on heatsinks, which are an absolute necessity in power circuits like this.  Still, this simple project should give you an idea of the power available in Eagle.

I’ll start providing libraries, schematics and boards on projects like this and others as soon as I think they’re worth posting.  :)   Anyhow, enjoy Eagle and share your thoughts/comments on it and other EDA tools!