Mountains

Mountains

Thursday, January 26, 2012

Pulse Generation Study: 555

I am building a simple circuit for a pulse valve I am trying to incorporate into a project at work. The valve has a cycle time of ~160 μs. The instrument I wish to attach it to already has a low speed digital I/O, but it's not capable of directly signalling the valve at that frequency.

I have a couple of solutions:

Mega expensive (500$): replace the DI with something that can signal in the high kHz.
Pros: Easy to program. Drop in replacement
Cons: $$, waste of a perfectly good DIO that could be doing real work

Middle (~40$): Micro controller. Arduino can easily pull this off.
Pros: Fast to program. Easy to package
Cons: Another interface to add.
 Need to execute very fine timing on the arduino
Seems like a waste for something so simple

Cheap (~10$): Analog Circuit
Pros: Supercheap. Simple
Cons: Takes a while. I'm not an EE or analog design expert.

I decided to base my design around a 555 timer. I still need to get the signalling worked out (if you hold the trigger pin of the 555 low (e.g. start position) it will continue to signal beyond the set time interval). For the testing, I use the arduino to trigger the 555. It turns out this is an awesome combination. By hand testing/picking a resistor-capacitor combo for the 555, I could easily get the timing right, and then using the arduino as a trigger source only required writing 7 lines of code.

Digital is cool, but analog has a lot to offer.


 Setting up the 555-arduino combo was ridiculously simple.

 Trigger signal on bottom, 555 pulse on top.

The assistant cares not for the big box.

6 comments:

  1. Ah, but you forgot one of the major factors in engineering cost analysis: your time. How much is it worth per hour? Not an easy question, especially when you look at what else you might be doing. But it is one of the big reasons that we often have a full computer doing what could easily be done by a simple circuit. That and reprogrammability.

    Or is this an at home project? That drastically changes the picture. You said it is for work, but there seems to be non-coworker in the photo. Oh, and I almost posted this comment on The Dog post - where it would be a little off topic...

    ReplyDelete
    Replies
    1. It is work related project.

      I think I would save some money/time in the short term by going straight for the arduino solution, in the longer term, keeping the instrument simple and robust is also important. If I make a fast, big, unreliable solution, you end up paying down the road every time it fails.

      The appeal of an analog box that has 4 wires in (power, trigger, and ground), two out (valve power), and maybe a dial on the front (timing control), is that it's highly robust and easy to integrate.

      There's also the value to the organization that comes with knowledge learned in the process of designing new things. As if on cue, we had an instrument fail, and low and behold, a critical part was a 555 based circuit. +1 for being able to glance at a circuit board and deduce ~70% of its MO on sight.

      Delete
    2. Yep, those are all valid points. I think in modern stuff the keep it simple, stupid principal, has been lost. And more knowledgeable employees are more useful. At the same time, at some point you just have to hurry up and get the job done. Normally I decide what approach to take based on how busy I am.
      ---------
      Sorry about the echos - computer error. My browser does not get along well with blogspot, probably because it is an old browser. I keep thinking about getting a new one, but that would require a new OS which would require computer. Grrr....

      Delete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. I deleted the echo chamber comments for your reading pleasure.

    ReplyDelete

Leave a message after the tone...