4
\$\begingroup\$

My degree had given me some electrical engineering basics, and I like to keep studying it in my spare time. I would like to achieve something with electronics, which is why I am asking here instead of programming a microprocessor for the purpose.

A component / circuit receives a voltage of 5V TTL for a time interval (e.g. two seconds). During this period, a sequence of switching the voltage on and off is to be output. An LED should flash during this period, based on the binary number 01001000 (72 in decimal), with 1 = switched on and 0 = switched off. So, I guess this 2-second period has to be divided into 8 equal steps. The number 72 is just an example.

Is there a way to achieve this with simple and “usual” components (555, operational amplifiers, comparators, MOSFETs, diodes, logic gates, flip-flops)? I ask because I use PSpice for TI2020 and I don't have every imaginable component in the libraries.

Where I stuck

I don't have the idea how to manage the start and stop times of the blinking of the LED for the different binary numbers.

Update 11/26/2021

I am pleased that my question goes down so well with you. I finished the circuit using only flip flops, gates, op amps, and 555 timers.

schematic, glued

About my train of thought: In the picture, at the top left, you can see three flip-flops that count from 0 to 7, at a rate of (currently) two seconds. Since I didn't have a 3-to-8 decoder in my library, I just built and tested a decoder myself. But since I only need two exits, namely the first and the third (chosen arbitrarily), I have removed the remaining six. One output each (U23, U25) goes to an operational amplifier with a non-inverting basic circuit to increase the 3.5V to 5.2V TTL so that the timer behind it works. This means that this timer – let's take U1 as an example – receives voltage for 2 seconds. During this period, it fires 16 times. This timer shifts the next 3 flip-flops through (0–7). The outputs № 2 and № 5 emit a voltage. This is my “H” (B 0100 1000). The same thing happens in a copy further down in the picture. Except that I am using the “decoder” output № 2, № 3, № 5 and № 8 here. This pattern represents an “i” (B 0110 1001). So it should look like this in the simulation:

graphs, how they're suppsoed to look like

Unfortunately (understandably) the last state remains. That is, at the moment it looks like this:

graphs

I've already thought about simply letting the timer (U46) run a little faster, but then another state is "permanently" active. So how do I get the last output (U60) back to low, as it should actually?

\$\endgroup\$
17
  • \$\begingroup\$ hey, no matter how "analog" your electronics are "I have a discrete time thing, which triggers a sequence of discrete steps leading to discrete-valued discrete-time output": That's the definition of digital: discrete time, discrete value, discrete deterministic logic. So, this is a digital problem, not an analog one. \$\endgroup\$ Commented Nov 24, 2021 at 15:12
  • 2
    \$\begingroup\$ Are you aware of what a state machine is, and a Moore machine? That's what you're building, so start from these basic logic concepts. \$\endgroup\$ Commented Nov 24, 2021 at 15:13
  • \$\begingroup\$ @MarcusMüller Hmm, I see, I'll remove the word "analog". I just wanted to point out that this should be solved electronically. \$\endgroup\$
    – Daniel
    Commented Nov 24, 2021 at 15:15
  • 1
    \$\begingroup\$ @MarcusMüller Are you aware of what a state machine is not yet \$\endgroup\$
    – Daniel
    Commented Nov 24, 2021 at 15:18
  • 2
    \$\begingroup\$ While you're reading up on state machines in general, have a look at shift registers in specific. \$\endgroup\$
    – Theodore
    Commented Nov 24, 2021 at 15:33

2 Answers 2

5
\$\begingroup\$

You need just 9 transistors, 16 diodes and bunch of passives to do this. Circuit below is ring counter (but opened) generating a desired sequence at Out. The sequence is set with 8 switches. The capacitors set the timing of each interval. The first transistor is used as trigger only and the next 8 generates a pulses at their collectors for each bit. The sequence is started generating a pulse with Trig signal source.

The schematic consist 3 bit only, you need to add next 5 to the right.

A good advice: Don't use transistors with high Beta (like 200 more) and ensure proper Vcc filtrating (high cap on supply).

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
3
\$\begingroup\$

If this were 1978, the solution to your problem would be to use one 8-bit preloadable shift register or two 4-bit preloadable shift registers, a 555 and some sequencing logic. You'd set the shift registers up so that when your input was off the shift registers would be loaded with your desired sequence (i.e. b'010001000), then when your input was on the shift register would shift every 1/4 of a second.

You'd probably need at least half a dozen 7400-series logic chips, and a lot of debug time.

But, this is 2021 (or later, depending on when you read this). As noted in the comments, a microcontroller is a digital part, and digital parts are analog parts. You can use one small chip to do the same work of the half-dozen or more chips in the 1978 solution; your system will be smaller, and the microprocessor will cost less than the extra board space you'd need for the 1978 solution.

If you're designing a product, or if you just care about the end result, do it with a microprocessor. If you want to learn how to do it with logic, go ahead and look at the functions available from 7400-series logic, and go to town.

\$\endgroup\$
3
  • \$\begingroup\$ Good answer. But the OP explicitly said he asks here because he could use an MCU but he wants to study (low-level?) electronics. Comments and your answer keep on saying "an MCU is better", and probably the OP is already aware of this... \$\endgroup\$ Commented Nov 24, 2021 at 16:28
  • 4
    \$\begingroup\$ A CPLD eval board might be a decent middle ground to get an understanding of the low level implementation while having better re-use value than a breadboard full of discrete logic. \$\endgroup\$
    – The Photon
    Commented Nov 24, 2021 at 16:43
  • \$\begingroup\$ @linuxfansaysReinstateMonica: so, in that case, I've given them some key words, not least of which are "7400 series logic" and "preloadable shift register", and they can hit the data sheets and study up. \$\endgroup\$
    – TimWescott
    Commented Nov 25, 2021 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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