Author Topic: DIY 2-channel controller  (Read 1204 times)

Offline DennyMo

  • Jr. Member
  • **
  • Posts: 24
DIY 2-channel controller
« on: August 15, 2010, »
Hi folks,

I need a stand-alone 2-channel controller, switching back and forth between Channel A and Channel B every ~5 minutes.  I've put together two different designs.  One of them uses a 555, the other a 2-transistor flip-flop circuit.  Both of them give me 5:30 on each channel, but getting more exact than that involves either more components or more expensive components.  Could some of you take a look at my schematics and see if there are any glaring deficiencies?  Any suggestions for improvements, or questions about "Why did he do *that*?!?" 

Thanks.

Offline tpctech

  • Sr. Member
  • ****
  • Posts: 229
Re: DIY 2-channel controller
« Reply #1 on: August 21, 2010, »
Looks pretty good to me.  I made a very similar 555 version to run a "walk and wait" light for a friend in college many moons ago!

Have fun and good luck

 KEN

Offline Ampfan

  • Jr. Member
  • **
  • Posts: 8
Re: DIY 2-channel controller
« Reply #2 on: September 02, 2010, »
The only significant issue you will have is timing stability.
Aluminum electrolytic capactors change value significantely with temperature (and slightly over time). I would spend the extra $ to get a tantalum 470uF if stability of timing was important.
That makes the 555 approach less costly since you only need ONE $ capacitor.

The 555 will have a very long initial period as the cap charges  from 0V to 2/3V for the first cycle.
This can be helped somewhat by stringing 6 silicon diodes (1N418 will do) in series from 5V to the cap to precharge it to 5V-(6x0.6v)=1.4V. 1/3V of the lower threshold is 1.65V so getting it to 1.4 on power will get you close to the correct first period.

The flip flop approach will suffer from assymetric periods since the base treshold varies with temperature AND device, and the slow crossing of threshold will make it noise sensitive too.
In other words, the on and off periods WILL be different because of device variences.

When I need such long periods, I use a 4060 divider with built in R/C oscillator, and pick a division tap and frequency that lets me use about 100kHz as the base freqency, allowing for NPO capacitor use. (NPO are temperature stable. Do NOT use X7R or Y5 dielectrics since they too are temp sensitive).


Offline n1ist

  • Coop Manager
  • Sr. Member
  • *
  • Posts: 760
  • 02148
Re: DIY 2-channel controller
« Reply #3 on: September 02, 2010, »
Alternatively, this would be easy to do with a single-chip micro; I would go with the ATTiny13 but am sure there is a good PIC equivalent.  That would also let you reprogram it to allow different timing or more fancy blink patterns.
/mike

Offline DennyMo

  • Jr. Member
  • **
  • Posts: 24
Re: DIY 2-channel controller
« Reply #4 on: September 02, 2010, »
Thanks for all the info.
You are not allowed to view links. Register or Login
I would spend the extra $ to get a tantalum 470uF if stability of timing was important.
I just looked up the prices for tantalum caps, OUCH!  :o  I don't think I care about timing that much for this project, but it's something to keep in mind for future projects.

Actually, one timing issue did surprise me.  I was expecting the cycles to be ~5:30 each, but they ended up being closer to 6:40 each.  Here's where I got the math for my timing calcs: You are not allowed to view links. Register or Login  Am I missing something?

As for using a micro, I'd thought about that, but this is my "walk before you run" project.  I plan on doing one or two hardware based controllers for a couple really simple projects, then maybe move to micros.

Offline Ampfan

  • Jr. Member
  • **
  • Posts: 8
Re: DIY 2-channel controller
« Reply #5 on: September 08, 2010, »
What values do you have for capacitor and timing resistor values?
Aluminum electrolytics are very leaky so timing R's greater than about 100k introduce error due to leakage currents. Also, al electrolytic caps are NOT AT ALL accurate in value. +20 -10% is typical spec.

You can see leakage with a digital voltmeter. You'll see an R of around 5-20 meg or so (depending on value and temperature) and that steals current and so makes the cap take longer to charge.
And the cap value will change over time too.

I would suggest using a 4060 as your solution since it's very low power, easy to build and doesn't rquire programming. Just some math to compute  a frequency based on what division value tap.
You'll have to buffer the CMOS output with a FET or transistor to be able to drive a relay.
Don't forget the clamp diodes across the coil to prevent killer voltage spike on turn off. (I ddin't actually look at your schematic, but I know the standard circuit by heart).


Bob


Offline DennyMo

  • Jr. Member
  • **
  • Posts: 24
Re: DIY 2-channel controller
« Reply #6 on: September 09, 2010, »
You are not allowed to view links. Register or Login
What values do you have for capacitor and timing resistor values?
Aluminum electrolytics are very leaky so timing R's greater than about 100k introduce error due to leakage currents.
OK, that might explain it, my cap is 470uF, R1 is 1kohm, and R2 is 1Mohm.

So if I went with a 4060, I could (for example) find an RC that gives me just under T=5 seconds, then take my outputs off of Q6 for T=~300 seconds?