4

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?

Daniel
  • 333
  • 1
  • 8
  • 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. – Marcus Müller Nov 24 '21 at 15:12
  • 2
    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. – Marcus Müller Nov 24 '21 at 15:13
  • @MarcusMüller Hmm, I see, I'll remove the word "analog". I just wanted to point out that this should be solved electronically. – Daniel Nov 24 '21 at 15:15
  • ;) a microctontroller is still electronic, and what you're about to build is going to be nearly a microntroller, just more complicated to use, and less flexible, and of course, less well-integrated. But that's the point! – Marcus Müller Nov 24 '21 at 15:17
  • 1
    @MarcusMüller _Are you aware of what a state machine is_ not yet – Daniel Nov 24 '21 at 15:18
  • Glad I set you on that route! Digital Hardware designers think *a lot* in these. That's really a core concept of any modern discrete control approach! – Marcus Müller Nov 24 '21 at 15:19
  • 2
    While you're reading up on state machines in general, have a look at shift registers in specific. – Theodore Nov 24 '21 at 15:33
  • The reply to your question "is there a way to do this..." is YES (unfortunately I am not able to help). About doing complicated and useless things... well: maybe for learning? Or for fun? Isn't art complicated, useless and beautiful? – linuxfan says Reinstate Monica Nov 24 '21 at 16:17
  • It seems like what you would want would be a parallel in serial out shift register. The parallel input could be set with switches to your bit pattern for 72 decimal. You could clock that in with a pushbutton. Then you just need to generate a clock sequence to shift the bits out. – user57037 Nov 24 '21 at 22:02
  • @Daniel flashing a pattern of 01001000 is same as 1001, unless it repeats – jsotola Nov 25 '21 at 00:10
  • @Daniel How are the binary numbers entered? Do you use switches? Or is this more a question of *"If given an arbitrary binary number of some length, is there a process by which I can construct a device that, when signaled to start, will output that binary number in 2 seconds and then stop itself and go back to a quiescent state (of whatever definition) waiting for the next time it is triggered? – jonk Nov 25 '21 at 00:39
  • @jonk No, this question is about fix numbers, not "entered" ones. – Daniel Nov 25 '21 at 17:36
  • @Daniel I'm not understanding the phrase, "fix numbers," in this context. I know what fix means and I know what numbers means. But put together, not so much. There are fixed-place(d) numbers. But I don't think that's what you are discussing. So, another question. Would it be sufficient to have a specified pattern and then use that specification to design a schematic to blink the LEDs, accordingly? But where there is no means by which, once designed and built, the binary value can be changed (without a new design, first?) – jonk Nov 25 '21 at 19:23
  • Hi @jonk , first of all, please excuse my brief answer last night. As you say, it would be sufficient to design a certain circuit / pattern so that the LEDs always blink the same numbers. That means, if the binary value had to be changed, the circuit would have to be changed slightly. – Daniel Nov 26 '21 at 07:11
  • @Daniel I guess I was thinking about an "8-bit parallel-in serial-out shift register" like the 74165, for example. At reset, it loads the data in and then a 555 (or some other clock source) shifts things out. Since the 74165 also includes a SER input pin, you could take the serial-out data and just loop it. State machines might be another approach, but not quite so general as the 74165. – jonk Nov 26 '21 at 09:50
  • @jonk Yes, I also thought of something like that (Shift register in combination with a 555 shifting things out); the circuit has been compiling since yesterday evening. I just have one small issue left. I'll edit my question in a moment. Btw: I haven't any 74165 in my lib, thus I built things by my own. – Daniel Nov 26 '21 at 10:53
  • @Daniel I kind of feel uncomfortable chaining FFs the way you did. It's less glitchy to use a twisted Johnson counter (one more FF for the state range you want.) [Here's what gets your pattern, that way](https://i.stack.imgur.com/2OuQe.png), and it repeats, too. – jonk Nov 27 '21 at 01:02

2 Answers2

5

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

3

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.

TimWescott
  • 44,867
  • 1
  • 41
  • 104
  • 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... – linuxfan says Reinstate Monica Nov 24 '21 at 16:28
  • 4
    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. – The Photon Nov 24 '21 at 16:43
  • @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. – TimWescott Nov 25 '21 at 17:38