Episode: 1503 Title: HPR1503: Making Waves-The DSO Pocket Oscilloscope Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr1503/hpr1503.mp3 Transcribed: 2025-10-18 04:20:50 --- Hello, this is Anway Bill, and today I thought I'd talked to everyone about a quick little hardware hack I did recently. I was on Adafruit to get some tuck stickers, and every time I tend to go on that or spark front or one of these websites that has all kinds of Arduino's and gizmos and gadgets and components, I end up filling up my cart with impulse buys. So this time I ended up with a notebook, I got the 20 stickers, 20 tuck stickers, because I go through these, I give them out at the lug, any new guys that come along, or if I'm at a conference or 2600 meetings, when I meet new people that are into Linux, it's just a little, hey, you want a sticker and it helps start a conversation, I guess, that's what I'm looking for. Anyways, I ordered 20 of the tuck stickers, and then I start poking around, and as I always do, oh, that looks neat, that looks neat, and I ended up buying a pocket oscilloscope. It's a little $99 pocket oscilloscope with a color screen, like a two and a half inch color screen, it's like two-thirds the size of an average cell phone, a smartphone, and I just thought it would be neat to throw in the hacker bag over there, and just another thing to fool around with at 2600 meetings, or whenever we're getting into tearing something apart, so I got it home, it looks cool, I'm not really sure if this sampling rate is not too high, I mean, like a square wave might have some rounded edges and things, this wouldn't replace a bench oscilloscope, or the anything a professional would use, but for like an Arduino tinkering or a Pi stuff, or you know, just stuff like I'm going to talk about in a minute, it seems fine, like a hobbyist's little oscilloscope. It comes with a signal generator, and you can hook the probes up, and you know, just fool around with that, you can start seeing a square wave, and you know, increasing, decreasing, and just, it's a way to, that's how I got familiar with the menus, it's all menu driven, button driven, which takes a little getting used to, and one thing I'll say that is, it finally clicked to me, which made a lot of help, is it reminded me of Nikon DSLRs, where you know what setting you want to change, but you're not sure where it is in the menu structure, and then I realized, you look at the setting you want to change, and in the menu, the menu that that setting is going to be changed in, they're both the same color, so like there's a green, green setting, that'll be green menus, yellow setting, that'll be in the yellow menus, that gave me a little quick moment, and I got easier going through the oscilloscope, and checking out the functions of it. So after playing with its internal signal generator, I started thinking, well, I want to go hook this up to some other thing, so the first thing that came to mind is, go get the RPI, or go get the teensy, which is a, are doing a compatible, a little tiny, are doing a compatible board, I have a couple of those, and then I thought back to old school, I thought about all the stuff that's in this, like, tupperware container, in the bottom of this bag, or I carry all my tools and components, and I have some old integrated circuits in there, some old chips, and I thought I bet I have still have an old 555 timer chip, so I dug through, and yes, I did, so the 555 is a timer chip that you can make a steady signal out of by changing the values of a capacitor and a resistor on two of the pins. So I thought, let me go old school with this, and I'll get the breadboard, and I'll get some jumper wires, and let's make our own little signal generator, it was just for something to do, I don't think you could use this to calibrate this oscilloscope, but I suppose once you had a signal generator set up, and if you knew someone else with a calibrated scope, you could look at what their signal is, and see if it compares to yours, and you can do like a reference calibration off of there, so anyways, it was just, why not just pull the breadboard out, and just have a little fun with this thing. So I'll have a little schematic in the show note, or at least the link to the schematic of the 555 timer, there's really nothing to it, they're simple and easy to use, but it's fun if it's a beginner's hack, or timer chips always come in handy for something, so you know, why not re-familiarize with myself with it, and let's throw this thing together. I'll also take some pictures along the way, and I'll put those up in a media goblin set, and I'll have a link in the show notes to those as well, if anybody wants to see this little oscilloscope in action, or just take a look at how things get breadboarded up. So here I dug everything out, maybe I'll just take a picture here, this is the 555 timer I have, it's from Radio Shack, who knows when, I have no idea what I bought this, doesn't price on it, but I bet if you find one around, it's a dollar or two, it is a 8 pin dip, so dual inline package, excuse I haven't said that in a long time, so just pop it into the breadboard and wire it up, right on the back of the package is the schematic, I suppose I could go through that. So on an IC, they usually have a dot or a little notch on one end of the chip, and that will reference where your one pin is, so your one pin would be next to the dot to the left, so upper left is pin 1, and then it goes down the IC, in this case 1, 2, 3, 4 on the left, then you jump straight across, bottom right would be 5, and then 6, 7, 8 going up. So on a 555, number 1 is ground, number 2 is the trigger, number 3 is output, number 4 is reset, I don't think I've ever used that, maybe I never had one lock up, okay, let's see, number 5 is control voltage, number 6 is threshold, number 7 is discharge, and number 8 is positive bolts in. So these are where the, your power is going to go in, you're going to use a resistor and a capacitor on the right side to set up the timing circuit, so high low, and the resistor and the capacitor are going to be pulling the output high and low, so that's what you would read on the oscilloscope, zero voltage, then you could go high, and then you go low again, and that time period in between high and low will give you a nice square wave, or I hope it should, anyways, oh, by the way, I mentioned the teensy, you'll probably see that in the pictures, it's always on the breadboard because I don't want to bend the pins, so it's up at the top of the breadboard, but I'll work down lower, and the oscilloscopes right above it, and another little tiny thing I carry around in the bag is a little multimeter, this thing was like 20 bucks at a hardware store, and I wouldn't use it professionally, but I have a fluke for that if I have to, you know, test something that I'm going to risk my life touching, but for hobby stuff, carrying around in the bag, something nice and small, a little $20 digital multimeter, it does the trick, okay, I'll pop this in the board and I'll wire it up, I'm back, you didn't even know I was going, did you? So it turned out that I didn't have any .1, .01, .001, electrolytic capacitors, I only have strange numbers like 220 microfarad or 470, so I had to grab one out, there's a radio shak near here, so I did get the proper capacitor, and I had the resistors, and well, here it is, here's the circuit running and blinking, on the output, I put an LED on it just so I could, you know, physically see something blinking, and then I hooked up the oscilloscope, and I got a nice wave, it's a square wave, it's a, looks like it's about just under two vaults with that resistor I chose, I could have went a little higher, but I just kind of grabbed one, anyone that was in the 3333 range, I also mentioned earlier that I don't ever remember using a reset, but I must have, because it turns out you have to pull that pin high to keep the 555 running, and a reset is actually to go low, so it just needed a jumper between 8, which was a voltage in, and pin number 4. So that's a 555 timer, you could do some other things with it, there's two resistors that, it takes two resistors and a capacitor to choose the timing, so the capacitor stays the same, but the resistors you can change, make the thing blink faster, make it blink slower, the power is coming in through the resistors, charging the capacitor up, and then when it gets to a point it's draining, so that, that would be a wave as well, but it would be very messy, it would kind of be like a sawtooth, but the, the climb and the fall of the voltage would be curved, so that wouldn't be a very good straight timed pulse, but the 555 is watching that, and it, it's keying on threshold, so it gets to a certain voltage, and it pulls the output pin up high, and then gets to another certain voltage, and it lets the output pin go low, so you get a very consistent square wave and duty cycle. I suppose if, to go further with this, you could change resistor 2 out with a potentiometer, well you might have to parallel a potentiometer and a smaller resistor to get around that resistance, but then you would have a very, you could have a variable speed on it, and you can make it blink faster, blink slower, I imagine if you hooked the output up to like a little piezo, you'd get a click, and you could kind of make a metronome, or you could have the output pulling a relay in, at whatever speed you need, and for another project, so there's 555's a neat little, it's almost like a starter chip, you could get into it, and you can start, you'll think of more things to do, it would be good for, you know, for five, about $5 in parts, you could have, you know, a kid hooked this up in, so if they get interested in electronics as well. So, when I realized I was missing the capacitor, and I'm driving to the place to buy it, I started thinking how many people listening to HPR would have like a whole box of old miscellaneous things, I'm sure some of you do, but I bet most of you are our dweenos, or Raspberry pies, or beagle-bone black disease days, so I thought why not, as long as the tinsies there, which are dweenos compatible, why not also, why not also get that to show a signal as well, and I'll get these oscilloscope up and hooked up to that, and then in the show notes I could have the little script that I'm showing, pulling the pin high in the timing, so if you have one of those, you can also, you could give that a try. Before I went up to the tinsie, I just thought I'd move the probe oscilloscope to the other side of the resistor that's lowering the voltage for the LED, and that gets a nice square wave as well. I had to just increase the oscilloscope up to the 10 volt range, and you'll see in the picture it's showing about nine volts, each square would be 10 volts, and it's bouncing up and down within one square, about nine tenths of the square, so so far this oscilloscope is, I thought the sample rate would not show a very good square wave, but so far it's good. I don't know how it's going to work on a, this is a pretty slow signal, I don't know how it's going to work on a very high-hurt signal, but I guess when I come across that or use this for a while, I'll get a feel for it, maybe I can update the show notes or maybe I can do an HPR on this pocket unit a little more in depth, but okay, let me, uh, let me hook up the tinsie. So there's the oscilloscope hooked up to the tinsie, uh, looks like the tinsies putting out, let's see, one, two, three, four, about four and a half volts, it's a nice square wave here as well, I suppose I could try and speed it up some more and see how the oscilloscope deals it with that. I suppose I should talk a bit about how an oscilloscope, or what an oscilloscope does, in case anybody doesn't know, but I'm sure a lot of people are familiar with multimeters, you can, you know, test the battery, it'll tell you nine volts, DC, positive, you can test something and get, I don't know, four volts negative DC, it tells you what your power is, on AC, you're kind of getting an average of the sine wave, so you'll say 120 volts coming out of the wall here, or, you know, if you're down into smaller stuff, four volts peak to peak, but you don't know how many hertz that AC voltage is at, and on the DC with a meter, if, like, in this situation, where a signal is being generated, zero to five volts, and back and forth, and back and forth, the meter will just keep bouncing and, like, taking little snapshots here and there, and you get all kinds of numbers, there's really not a way to see the duty cycle that's happening, so, within a oscilloscope, you hook that up to what you want to test, and you have a bunch of settings. Now, on an oscilloscope, there's a grid, let me see what the teensy has here, one, two, three, looks like it's a 12 by 8 grid, on the Y axis, you control the intensity or the voltage, you can, you can make each square one volt and height, you can make it two volts and height, you can make it milliamps and height, on the X axis, you're looking at time, so you can take a one second snapshot, you can take a millisecond snapshot, so, with that DC signal we were seeing earlier coming out of the 555, I think I had my voltage set to, it was a nine volt battery, so I had Y axis volts set to five volts, so that means each square going up and down is five volts, and the center line was zero volts, so that was going from zero, that signal that we saw, or in the picture, is going from zero volts, and it was going up near nine volts in the positive, plus DC, you can also hook a scope up to AC current, and you'll see the sine wave, the sinusoidal wave, so an AC signal would start off in the positive, and go up so many squares, and then start coming back down, go through zero volts, then go into the negative, go the same amount of squares down and over, so, by knowing what your voltage is on the Y axis, you can add that up, so let's say it's one volt per square, and the AC signal goes up for three squares, that's plus three volts, then it's going to go down for three squares, that's minus three volts, so three volts peak to peak, and then using the X axis, you set how much time is going with each square, so by getting a calculator and knowing what your X axis is, you can add up if that sine wave went up and over for six squares, and then down and over for six squares, you can multiply the time by 12, and you can get your hertz, so you're not only looking at what the voltage is, you're looking at what the cycle is up and down, and you're getting a reading of how many hertz, how fast everything's happening, I suppose maybe I could try and find something with an AC signal and show that as well in the video, yeah let me see if I can go find something, okay there is a sine wave, an AC sine wave coming out, I got a like a wall work transformer, it takes, in US we have 120 volts coming out of the wall at 60 hertz, the transformer says it's going to give me nine volts AC on the outside, and if you look at the meter in the picture, I know I just said video earlier, but this is going to be an interesting edit because I've done little like five or six minute segments over the course of three or four days as I build things, and as I play with this meter, so I hope by the end of this I can edit it into something somewhat coherent, I don't repeat myself too often, but anyways in the final picture you'll see the meter showing 14.06 volts AC, which is a little high for the nine volts that's, they say that transformer's putting out, the oscilloscope, I have each square in the y axis set to 10 volts, and the sine wave is going from zero to about, it's showing almost 18 volts, so this might be a little bit out of whack here, well maybe not, it definitely seems like it's more than 14 volts on the oscilloscope, however it does show the frequency is 59, 61 hertz bouncing in any case, the point of an oscilloscope is to, it's almost like taking a snapshot in time, looking at the voltage as it's happening, so you can zero right down in on one duty cycle, I suppose I could turn this up and show it, there you can see I zoomed back on the x axis, so you can see a lot more of the waves going by, still 61.1 hertz, but with the oscilloscope you want to capture a signal and then zoom in close like I had it before, so you can see basically one duty cycle of the wave and you can you can take analysis from there, but cool, I got a good play around with this DSO Nano, I gave this thing a good little kick in the tires here, it's pretty neat, DSO Nano V3 for 99 dollars, I like it, it's fun, it's a cool addition to the bag I call the mobile hack space, so this has been NY Bill, I am NY Bill at gunmonkeynet.net, if anyone wants to email, I'm on status net, I'm in IRC, a couple channels, you'll find me in there, and the comments, we were just talking at Northeast Linus Fest about the comments on HPR, I have to remember to check them, so yes, I'll try and be more regular with and I hear talk that a forum or something might be on the way, I don't mind forums, okay I'm jumping in one last time at the very end of all the recordings, when I pulled that wall wart AC adapter out, it says, it's right here now, 120 volts, 60 hertz, 7 watts, output, 12 volts AC, so I got it wrong, I thought it was 9 volts AC, I'm not sure why, but so that wave that was going a bit high, it was showing 14 volts on the meter, and just slightly higher on the scope, it was a little more reasonable than what I thought from going 9 to 14 and higher, so this old transformer is just putting out a bit too much, okay this is NY Bill signing off, we can cue the music, I'm not gonna sing Jezra, I'm not gonna sing Ken, till next time everyone, you have been listening to Hacker Public Radio at Hacker Public Radio does our, we are a community podcast network that releases shows every weekday Monday through Friday, today's show, like all our shows, was contributed by a HPR listener like yourself, if you ever consider recording a podcast, then visit our website to find out how easy it really is, Hacker Public Radio was founded by the digital dog pound and the economical computer club, HPR is funded by the binary revolution at binref.com, all binref projects are proudly sponsored by linear pages, from shared hosting to custom private clouds, go to lunarpages.com for all your hosting needs, unless otherwise stasis, today's show is released under a creative commons, attribution, share a like, lead us our license.