2
\$\begingroup\$

Seems a simple enough problem this, and perhaps all that is needed is confirmation of approach (although a better solution always appreciated). So the problem:

  1. I have a 555 based square wave based oscillator (clocked at roughly 900hz 5v p2p) which i need to gate the output to enable/inhibit to the Power Amp section of the design (audio use only). I can't use a specifically clocked PWM output pin on mcu (all in use for other needs).

  2. I don't really have room to push in an AND gate to the output (on the target PCB), so was thinking of a classic emitter follower (npn) with the 'collector' fed by the output of the 555, the 'base' driven by an mcu (arduino 5v) output logic pin, and the output to the power amp taken across the emitter and the emitter resistor. In my mind, on low (from the 555) fed to the collector, the transistor will be off, and the emitter, pulled to low either via the emitter resistor or low oscillator output (depending on Vb logic level from the mcu).

Not spectaculary excited about Vbe drop , but can live with it (if its circa the 0.6v expected).

Anyway the question(s) a) is the right way to proceed or is there a better solution (bearing in mind the small pcb space available and my reluctance to make the space for either a 8pin or 14pon standard logic gate ?

b) is there a different approach for generating a logic enabled 900hz audio tone ? (I found using a nand oscillator with enable fed to the first nand wasn't reliable for fastish logic switching from the mcu - I suspect because of interupting the charge/discharge of the RC network on Gate 2 - but happy to guided).

Hope all this made some sort of sense, have a nasty feeling I am missing an obvious solution to this.

\$\endgroup\$
2
\$\begingroup\$

If you have a timer that is already used by something else and can trigger an interrupt at an even multiple of 900Hz, then use an interrupt to flip a pin to generate your signal.

Another option is to connect the output of the 555 to an input, and copy this to a microcontroller output with a pin change interrupt, which can be enabled or disabled.

Otherwise, I'd use Andy's solution, but without the FET: since you use an arduino which is 5V tolerant, you can set a pin to output a logic level, or to be high impedance (input). Now connect this pin to the 555's "C" capacitor. Set it to output a logic 0 to disable oscillation, and set it to high-Z to enable it. Free solution with no parts!

| improve this answer | |
\$\endgroup\$
6
\$\begingroup\$

Just use the reset pin on the 555.

| improve this answer | |
\$\endgroup\$
6
\$\begingroup\$

I think I'll just answer b):

is there a different approach for generating a logic enabled 900hz audio tone ? (…for fastish logic switching from the mcu)

You already have an MCU. Practically all MCUs I know contain at least one, typically multiple independent, PWM units. These are designed to give adjustable-frequency, adjustable-duty-cycle rectangular waves.

In other words: Drop the damn 555 and just use either your existing MCU to generate a 900Hz tone, or replace the 555 with a really cheap MCU, and low-pass filter appropriately to convert square wave to sine wave.

Note that 900Hz is really slow, from an MCU's perspective. You might, especially if you've got other timers/counters to spare, very simply do this in MCU software. The potential jitter won't matter, as it would be a high-frequency component to be filtered away, anyway.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ But in (1), OP already said "I can't use a specifically clocked PWM output pin on MCU (all in use for other needs)" so they can't do that. Have to downvote, I'm afraid MM \$\endgroup\$ – TonyM Mar 27 '18 at 13:05
  • 1
    \$\begingroup\$ @TonyM: I can understand that, because I should have said "replace the 555 with another MCU" \$\endgroup\$ – Marcus Müller Mar 27 '18 at 13:31
  • 2
    \$\begingroup\$ @TonyM, no, thank you, I read the question, and just started typing, then forgot the question, and finished my answer. Without you, the answer would be poor, at best! \$\endgroup\$ – Marcus Müller Mar 27 '18 at 15:16
1
\$\begingroup\$

so was thinking of a classic emitter follower (npn) with the 'collector' fed by the output of the 555, the 'base' driven by an mcu (arduino 5v) output logic pin

A 555 used as an astable self-resets via the discharge pin like so: -

enter image description here

So, put a small MOSFET across the capacitor (which gets reset via R2 and pin 7) and activate this from the MCU. Or directly wire the MOSFET to pin 7 and ground.

enter image description here

Notice the internal transistor inside the 555 connected to pin 7 - using an external transistor will give you the functionality you need without distorting the output voltage.

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

I haven't designed with a 555 for a while, so here goes.

In my opinion, the simplest approach is the one given by @RoyC - use the reset pin. There are other approaches; e.g., feed the output to a simple diode/resistor AND gate and use that output to drive whatever you're driving - that's three parts: a pair of switching diodes (e.g., 1N4148s and a pull-up resistor). Some notes on the 555:

You'll never get a square wave (with an offset) even if you use steering diodes to control the capacitor's charge/discharge. If you really want something with exactly a 50% duty cycle, you need to output the signal to a flip-flop and divide the frequency by 2. And then, depending on the technology you're using, you may have to bypass the 555's output to ground with a small capacitor (I used disk ceramic); if not, you may end up with spurious flip-flop triggering (school of hard knocks here). On startup, the capacitor has to charge to something like 2/3 Vcc; it then discharges to something like 1/3 Vcc, back to 2/3 Vcc, down, etc.

All this is documented in the original data manuals.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Why not drive Pin 5 (control) of the 555 high? This keeps clear of the timing circuitry and requires no extra parts, as long as the drive can go high impedance to enable the 555. \$\endgroup\$ – henros Mar 28 '18 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.