Monday 30 October 2017

LED Oscilloscope with 100 LEDs.

Hello everyone,

One word before we start: Don't build this project if you're in need of an oscilloscope for measurements or checking waveforms. This scope has no trigger and therefor no stable waveform unless you exactly match the frequency of the waveform with that of the timebase. Furthermore, 10 by 10 LEDs is way too low a resolution to check waveforms with. If you need an oscilloscope for audio waves you can start with a cheap one from eBay for $20. (Buy one with acrylic case!)
This project is just a fun thing to build with LEDs, Something that actually visualizes audio in a small way. And that's all it is; just a bit of fun.

Okay, with that said, here we go:
Following on from my 81 LED chaser with 2 NE555s I now set out to build a LED oscilloscope using the same type of LED matrix I used in the last project, only this one has 100 LEDs instead of 81.  First of all I'll show you the circuit schematics I used for this project. You can easily find this on Google and it's a very simple design. Actually easier to build than the 81 LED chaser.



I made some changes to the way the NE555 was configured. To test the schematics I build this pulse generator on a breadboard and took some measurements with my oscilloscope and the pulses that came off only had a duty cycle of 6%. Maybe that was meant to be and actually works better, but I changed it to a design that gave a 50% duty cycle. I wanted to be able to extend the range of frequencies by adding the possibility of switching between capacitors on the 555 and I wasn't sure how this short duty cycle worked on the higher frequencies I intended to put in, and I also didn't have a 500K potmeter. I only had a 100K so I needed a design that gave me a good frequency range with a 100K potmeter. Here's what I came up with:


When set to the highest capacitor value (330 nF) this gives a range of 17,5 Hz to 6,2 kHz. Then, by choosing the lowest value capacitor, it goes up to about 650 kHz. That's a nice range for a timeline I thought. The ranges overlap a lot and you only really need the first and last setting but I liked having some choise and it adds yet an other switch to the front panel which always looks cool :)
After I had build this circuit I came to the conclusion that the higher frequencies for the timeline don't look good at all because this scope doesn't have a trigger-mode. So with high speed signals it just looks asif the LEDs are on all the time. So you don't have to bother with the alteration to the NE555 and just keep to the original schematic. I just thought I'd include it in this article in case you had the same idea ;)
Do not forget to put in the 470µF electrolytic capacitor (even if the circuit is fed from a 9 volt battery). This prevents oscillations on the positive voltage rail caused by the NE555. (I had the same problem with the 81 LED chaser. This is a well known issue with the normal NE555 chips but if you use a LM7555 cmos version of the 555, this problem won't occur). The capacitor makes sure you get a nice ripple free supply voltage, which needs to be 9 Volts btw. I also put a Schottky diode in the positive voltage rail to prevent damage from accidental polarity reversals. This circuit draws between 24 and 34 milli-amperes (depending on the frequency of the timeline) so it can easily be fed from a 9 volt battery.

I proceeded to build the LED matrix first and I wanted to make a better job of it than I had done with the LED chaser. So I again had to grind down 100 LEDs on 4 sides to make them fit tight together on the perforated circuitboard. I had to glue on an extra bit of circuitboard because I could only fit 9 rows of LEDs on there and I needed room for ten rows. After I had soldered them all in place I took my Dremel tool and shortened all the negative leads so I could fit the positive rails over the negative rails without them touching and creating a short circuit. Here's a picture of the backside of the LED matrix which came out very well. (You can see the extra strip of circuitboard I glued on at the left side):


After that I proceeded to solder together the rest of the electronics which was quite straight forward really. I did end up with a mess of wires and knobs etc. but that was unavoidable. But it was going to be build into a nice case anyway. Here's the finished product mounted in its case but still very accessible because only the display is glued into place so changes and repairs can easily be made.



Here's a closer look at the switch with the different capacitors on it, to change the frequency range:



And here it is in full working order:


Problem solving:
I did encounter a little problem after I had assembled the scope in its case. I had made a BNC connector on the front panel to attach a probe to but it turned out that the ground wire caused the 3rd column of LEDs to turn off so I cut the ground wire for now. I need to mount the BNC connector in such a way that it is insulated from the case completely.
I also build in the microphone with the little amplifier which you can see in the schematic on the lower right. This works very well and I put in a switch to choose between the microphone or the probe. But I wanted an amplifier that is a bit more powerful and has a volume control button that I can put on the front panel aswel. In the next paragraph I explain how I did that.

The Amplifier:
Like I mentioned above, I wanted to build a more powerful microphone amp with a volume control to put in this scope. Well, recently I did just that. It took me just over an hour to build it and put it in and it works very well. The mike is much more sensitive now and reacts even to random noise it picks up. I build it with a 2N3904 transistor as a pre-amp for the electret microphone and then a LM 386 to amplify the signal. Here's a little sketch of the circuit:


(Last revised: 08-Feb-2020 Changed 10µF cap on pin7 for 100nF.)

Here's a picture of the scope with the new volume control added to the front panel:



Here's a little video of the scope working (with a bit low battery) with the synthesizer I build. There are no knobs on the scope this time because I needed them all for the synthesizer, LOL :)  :



I can really recommend using this design over the microphone amp in the main circuit schematic. This one works much better.

Okay, that's it for this project. I hope you enjoyed this read and if you did please consider supporting me by subscribing to my YouTube channel EdEditz or by following this blog or clicking on the adds.

If anyone has any idea how to incorporate a trigger section into this scope I would love to hear from you!!
If you have any questions or remarks, feel free to post them beneath in the comments or on my YouTube channel. I always love to hear from you!!!

13 comments:

  1. Threshold level sense Pin 2 555.
    Excellent circuit. regards jim

    ReplyDelete
    Replies
    1. Cool, thanks for that. I'll have a look at that on the scope.

      Delete
  2. This is super! And has got me thinking: 'X-Y mode' could be achieved by driving both axes with LM3914's which adds the potential for rendering lissajous patterns. Applying a ramp to the X-axis would recover current functionality and control the sweep frequency. Alas, the LM3914 is hard to find in a DIP, but a combination of an ADC with parallel out and BCD-to-Decimal converter, such as the ADC0820 and CD4028, would do the trick! I'm thinking of "cheating" and using those small 8x8 LED off ebay...

    ReplyDelete
    Replies
    1. What a great idea. The LM3914 is still readily available. I have 4 of them myself. You can order them on ebay. If you get anywhere with these ideas please get back in touch. Maybe I could expand the article and include them.

      Delete
  3. Also, I have potentially thought of a way to implement trigger-mode. The challenge is to generate a clock frequency for the CD4017 that is a multiple of signal frequency: x10 to get a full sweep of the wave form in the 10x10 display. First, we need to generate a reliable pulse of the input frequency - a Schmitt trigger? Then, we need to multiply that frequency by 10 - this can be done with a phase lock loop (PLL), such as the CD4046. A divide-by-10 clock divider (coincidentally, another CD4017 would do the trick) between the VCO output and comparator input will drive the VCO and 10 times the reference frequency. I've been playing around with PLL's a lot recently, and would be happy to discuss further :)

    ReplyDelete
    Replies
    1. Looking at the original article by Forrest Mims in his "Engineer's Notebook" pp 112, apparently also printed in Popular Electronics, August 1979, pp 78-79, he suggests triggers and free-running operation, switch selectable. First, instead of the 555 horizontal time base, he uses a 4017 quad NAND gate, two gates of which form the time base oscillator along with an adjustable RC, and another gate from that IC combines the lowest LED output of the LM3914 and the lowest output of the 4017 (the fourth gate acts and an inverter on the output of the third gate, controlling the 4017's Reset input); thus, when the 4017 is ready to start another 'sweep', if the LM3014 shows no signal, the sweep remains halted, and only when the input signal starts to rise is the 4017 allowed to start the sweep, then halts again before the next sweep until the input signal starts to rise from 0V again. In free-running mode, the 4017's Reset input is just tied to ground, allowing constant sweep.

      This probably works after a fashion. but requires that the input signal not have a negative swing, and also that it always goes to 0V on every cycle. The 'enhanced' version of the circuit presented here by Eddy does a few things differently:
      - Replaces the two gate oscillator with the 555 oscillator
      - Dispenses with the trigger circuit and just has asynchronous free-running sweep
      - Adds an offset voltage via the 5k potentiometer, essentially the scope's Vertical Position control. If the input swings positive and negative, that pot must be adjusted to offset the signal such that its vertical midpoint is about half of full vertical scale. If the input swings only positive of ground, then the pot is adjusted to provide zero offset. If the Mims' triggered sweep circuit were to still work, the same pot would need to be adjusted such that the input signal's lowest point only results in the lowest rows of LEDs being on. Mims is using the LM3914 as the trigger comparator, which has its limitations.

      Delete
  4. Hi Eddy
    I am thinking about building one of these, just for fun. I notice on your scope case, you have knobs for FINE, VERTICAL, HORIZONTAL, plus a bigger knob for SPEED (and of course, later you added another knob for the VOLUME of your microphone pre-amp.

    I assume that the 2k potentiometer on the control of the LM3914 is the FINE, and then of course the 5k pot on the input is VERTICAL and the 500k pot is the HORIZONTAL (correct?). What is the SPEED knob? Perhaps that is for the selector switch for the 'pulse generator' circuit, which I think you said was not worth it...?

    I am curious about your use of the LM386 for the microphone amp....that is a power amp IC, but it is only being used to amplify the mic signal.....did you consider just using a regular op-amp for that? When you use this LM386 pre-amp, do you just switch its output to the 'probe' input of the scope circuit, or do you tap in right by pin 5 of the LM3914?

    Did you find it beneficial to use an audio taper pot for the LM386 volume control, or was a linear pot adequate?

    I think my final question is, what is the purpose of that momentary pushbutton on the 4017? That must be for NORMAL/HOLD, but what is the real purpose for having that? It seems to me that this just freezes the horizontal 'sweep', effectively turning the 'scope into a simple bar graph....?

    thanks

    ReplyDelete
    Replies
    1. Yes the Hold button you can leave out. It freezes the trace on one column and makes that act as a VU meter or bar graph as you say, but it's useless really. I put it in to see how it would work. You're correct in your assumptions with the functions of the potmeters. The Speed button is the stepper switch with the different capacitors. You really only need the lowest setting because this scope has no trigger input. Higher speeds just turn on all the leds without showing waveforms. Good luck with the build. I found it a fun little project. =)

      Delete
  5. just stumbled on this after googling for diy LED scopes, spent a large chunk of yesterday here looking at modular synths. Cant keep away! Could this be used as a synth module to show the wave form? non scientifically, just for a bit of eye candy.

    ReplyDelete
    Replies
    1. Well, you could use it for eye candy. I'd use 3mm LEDs for that to make it small and compact. The problem is that this thing has no trigger so the waveforms are not steady on the screen. So most of the time you'll just see a lot of LEDs go on and off. Maybe it's possible to make some sort of trigger input for the 555 but I haven't looked into that yet.

      Delete
    2. OK, thanks. Yeah it would be basically eye candy, I'd like it to be accurate as well. I'll keep an eye out for a suitable project.

      Delete

Note: comments are moderated and do not appear straightaway. Your first comment is not allowed to contain any links.