Scope Noob: Probing Alternating Current

I finally did it. After years of wanting one (and pushing off projects because I didn’t have one) I finally bought an oscilloscope. Over the years I read and watched a ton of content about how to use a scope, you’d think I would know what I’m doing. Turns out that, like anything, hands-on time with an oscilloscope quickly highlighted the gaping holes in my knowledge. And so we begin this recurring column called Scope Noob. Each installment will focus on a different oscilloscope-related topic. This week it’s measuring a test signal and probing Alternating Current.

Measuring a Signal

test-signal

Hey, measuring signals is what oscilloscopes are all about, right? My very first measurement was, of course, the calibration signal built into the scope. As [Chris Meyer] at Sector67 hackerspace here in Madison put it, you want to make sure you can probe a known signal before venturing into the unknown.

In this case I’m using channel 2. Everything on this scope is color-coded, so the CH2 probe has blue rings on it, the probe jack has a blue channel label, and the trace drawn on the screen is seen in blue. I’m off to a fantastic start!

This scope, a Rigol 1054z, comes with an “auto” button which will detect the signal and adjust the divisions so that the waveform is centered on the display. To me this feels like a shortcut so I made sure to do all of this manually. I started with the “trigger” which is a voltage threshold at which the signal will be displayed on the screen. The menu button brings up options that will let you choose which channel to use as trigger. From there it was just a matter of adjusting the horizontal and vertical resolution and position before using the “cursor” function to measure the wave’s voltage and time.

I played around with the scope a bit more, measuring some PWM signals from a microcontroller. But you want to branch out. Because I don’t have a proper signal generator, the next logical thing to measure is alternating current in my home’s electrical system. I suppose you could call it a built-in sine wave source.

Probing Alternating Current

acac-wall-wart

I sometimes take criticism for never throwing things away. Seven years ago we had a cat water fountain whose motor seized. It was powered by a 12V AC to AC converter seen here. Yep, I kept it and was somehow able to find it again for this project.

Of course at the time I thought I would build a clock that measures mains frequency to keep accurate time. This would have done the trick had I followed through. But for now I’m using it to protect me (and my fancy new scope) from accidental shock. I’ll still get the sine wave I’m looking for but with a source that is only 12V at 200 milliamps.

Don’t measure mains directly unless you have a good reason to do so.

Continuing on my adventure I plugged in the wall wart and connected the probe to one of the two wires coming out of it. But wait, what do I do with the probe’s reference clip? I know enough about home electrical to know that one prong of the plug is hot, the other is neutral. The clip itself is basically connected directly to mains ground. Bringing the two together sounds like a really bad idea.

This turns out to be a special case for oscilloscopes, and one that prompted me to think about writing this column. Had this been a 3-prong wall wart, connecting the probe’s reference clip to one of the wires would have been a very bad thing. Many 3-prong wall warts reference the mains earth ground on one of the outputs. If that were the case you could simply leave the clip unconnected as the chassis ground of your scope is already connected to mains ground via its own 3-prong power cord and the reference clip is a dead short to that. If you did need to probe AC using the reference clip you need an isolation transformer for your scope. There are bigger implications when probing a board powered from mains which [Dave Jones] does an excellent job of explaining. Make sure you check out his aptly named video: How NOT to blow up your oscilloscope.

As I understand it, and I hope you’ll weigh in with a comment below, since the wall wart I’m using has a transformer and no ground plug I’m fine using the ground clip of the probe in this case. Even though I’m clipping it to an AC line, the transformer prevents any kind of short between hot/neutral mains and earth ground (via the probe’s ground clip). What I don’t understand is why it’s okay to connect the transformed side of the 12V AC to mains ground?

At any rate, the screenshots above show my progress through this measurement. I first connected the probe without the ground clip and got the sad-looking trace seen on the left. After conferring with both [Adam Fabio] and [Bil Herd] (who had differing opinions on whether or not I should “float the scope”) I connected the ground clip and was greeted with a beautifully formed sine wave. I’m calling this a success and putting a notch in the old bench to remember it by.

What’s Next?

bridge-recctifier-teaserI don’t want to get too crazy with the first installment of Scope Noob so I’ll be ending here for now. I need your guidance for future installments. What interesting quirks of an oscilloscope should a noob like me explore? What are your own questions about scope use? Leave those below and we’ll try to add them to the lineup in the coming weeks.

Homework

For next week I’m working my way through the adventure of rectifying this 12V AC signal into a smoothed DC source. Here you see a teaser of those experiments. I’ve built a full-wave rectifier using just four diodes (1N4001) and will plunk in a hugely-over-spec’d electrolytic capacitor to do the smoothing. If you want to follow along on the adventure you should dig around your parts drawers for these components and give it a try yourself this week. We’ll compare notes in the next post!

Hackaday Interview: [Grant Imahara]

We had a chance to interview [Grant Imahara] at the 2014 Electronica conference in Munich, Germany. If you don’t recognize [Grant’s] name you’ll probably recognize his face. He’s been on the cast of the television show Mythbusters for about 10 years now. We heard recently that he was leaving the show and that’s how we crossed paths with him.

[Grant] has signed on with Mouser Electronics to promote their Empowering Innovation Together program. They hosted him on a press junket at their booth and since we have a good relationship with Mouser they offered Hackaday an interview slot.

We had a lot of fun talking to [Grant]. Unfortunately the wireless microphones the Mouser videographer was using were picking up a lot of interference. This didn’t directly affect our recording setup as we were using a handheld voice recorder, but we kept getting interrupted as they tried to figure out the problem. Still, as you can see from the video below, we managed to get all the way through a few questions about [Grant’s] introduction to electronics at a young age, his first job out of school working for Industrial Light and Magic, and his advice to others who want to get into electronics and specifically robots. He mentions his early learning was guided by the books of Forrest Mims and that these days learning about electronics is no more than a keyword search away.

Down the Rabbit Hole of STM32 Clock Options

Once you venture beyond the tame, comfortable walls of the 8-bit microcontroller world it can feel like you’re stuck in the jungle with a lot of unknown and oft scary hazards jut waiting to pounce. But the truth is that your horizons have expanded exponentially with the acceptable trade-off of increased complexity. That’s a pretty nice problem to have; the limitation becomes how much can you learn.

Here’s a great chance to expand your knowledge of the STM32 by learning more about the system clock options available. We’ve been working with STM32 chips for a few years now and still managed to find some interesting tidbits — like the fact that the High Speed External clock source accepts not just square waves but sine and triangle waves as well, and an interesting ‘gotcha’ about avoiding accidental overclocking. [Shawon M. Shahryiar] even covers one of our favorite subjects: watchdog timers (of which there are two different varieties on this chip). Even if this is not your go-to 32-bit chip family, most chips have similar clock source features so this reading will help give you a foothold when reading other datasheets.

There is a clock diagram at the top of that post which is small enough to be unreadable. You can get a better look at the diagram on page 12 of this datasheet. Oh, and just to save you the hassle of commenting on it, the chip shown above is not an f103… but it just happened to be sitting on our desk when we started writing.

We’re Hiring

The Hackaday crew has done some amazing things this year, and we’re finding ourselves a bit stretched. Want to lend a hand while making some extra dough to plow back into your projects? This is a work-from-home (or wherever you like) position that affords you the opportunity to guide what we cover on Hackaday.com. We hire writers for their judgement, which helps keep our subject matter fresh. But don’t worry, we do have a very active tips line from which many of our story leads come.

Contributors are hired as private contractors and paid for each post. You should have the technical expertise to understand the projects you write about, and a passion for the wide range of topics we feature. If you’re interested, please email our jobs line and include:

  • Details about your background (education, employment, etc.) that make you a valuable addition to the team
  • Links to your blog/project posts/etc. which have been published on the Internet
  • One example post written in the voice of Hackaday. Include a banner image, 150 words, the link to the project, and any in-links to related and relevant Hackaday features.

Words of encouragement

First off, we won’t be discussing compensation publicly. Want to know what we pay? Send in a successful application and we’ll talk about it.

Secondly, don’t pass up this opportunity. I watched one of these posts go by and waited another year before I saw the next one and applied. Now I’m running the place. Our team is made up of avid readers. If you’re passionate about the stuff you read here and you have a few hours each week to do some writing you need to apply now!

So what are you waiting for? Ladies and Gentlemen, start your applications!

Speaker Cabinet Boom Box Build

When you get that itch to build something, it’s difficult to stop unless you achieve a feeling of accomplishment. And that’s how it was with [Rohit’s] boombox build.

He started out with a failing stereo. He figured he could build a replacement himself that played digital media but his attempts at mating microcontrollers and SD cards was thwarted. His backup plan was to hit DX for a cheap player and he was not disappointed. The faceplate he found has slots for USB and SD card, 7-segment displays for feedback, and both buttons and a remote for control. But this little player is meant to feed an amplifier. Why buy one when you can build one?

[Rohit] chose ST Micro’s little AMP called the TDA2030 in a Pentawatt package (this name for a zig-zag in-line package is new to us). We couldn’t find stocked chips from the usual suspects but there are distributors with singles in the $3.50-5 range. [Rohit] tried running it without a heat sink and it gets hot fast! If anyone has opinions on this choice of chip (or alternatives) we’d love to hear them.

But we digress. With an amp taken care of he moved onto sourcing speakers. A bit of repair work on an upright set got them working again. The bulky speaker box has more than enough room for the amp and front-end, both of which are pretty tiny. The result is a standalone music player that he can be proud of having hacked it together himself.

Larson Scanner Namesake [Glen Larson] Passes Away

[Glen A. Larson] passed away on Friday at the age of 77. He may be most widely recognized for being a producer of the original Battlestar Galactica, Magnum, P.I. and Knight Rider television series’. But for us his association with a row of LEDs which illuminates in a back and forth pattern will always be his legacy.

When we heard about his passing we figured that we would hear about his invention of the Larson Scanner but that was not the case. A bit of research turned up a pretty interesting Wikipedia bio page. He has origins in a music group call The Four Preps and actually composed or collaborated on a number of television theme songs among other notable accomplishments. But nothing about electronics. Did this man of many hats actually invent the hardware for the Larson Scanner used as the Cylon Eye and on the front of K.I.T.T., or does it simply share his name?

Evil Mad Scientist Labs claims to have coined the term Larson Scanner. [Lenore Edman] confirmed to us that EMSL did indeed start the term which is used to name their electronics kit and directed us to [Andrew Probert] who lists effects for the TV series on his portfolio. We’ve reached out to him for more information but had not heard back at the time of publishing. We’ll update this post as details emerge. In the mean time, if you have any insight please leave it below including the source of the information.

If you are not aware, a Larson Scanner is so interesting because the pattern calls for a fading trail of LEDs. It is not simply a fully illuminated pixel moving back and forth but includes dimmed pixels after the brightest one has passed. This is an excellent programming challenge for those just getting into embedded development.

Those interested in learning more about [Gary] may find this lengthy video interview of interest. Otherwise it’s time for the collection of links to past Larson Scanner projects which we’ve covered.

[Thanks Bruce]

Complete FPV Setup for Your Drone

[Ioannis] is like anyone else who has a quadcopter or other drone. Eventually you want to sit in the cockpit instead of flying from the ground. This just isn’t going to happen at the hobby level anytime soon. But the next best option is well within your grasp. Why not decouple your eyes from your body by adding a first-person video to your quad?

There are really only four main components: camera, screen, and a transceiver/receiver pair to link the two. [Ioannis] has chosen the Sony Super HAD CCTV camera which provides excellent quality at the bargain basement price of just $25 dollars. A bit of patient shopping delivered a small LCD screen for just $15. The insides have plenty of room as you can see. [Ioannis] connected the screen’s native driver board up to the $55 video receiver board. To boost performance he swapped out the less-than-ideal antenna for a circular polarized antenna designed to work well with the 5.8 GHz radio equipment.

It seems that everything works like a dream. This all came in under $100 which is half of what some other systems cost without a display. Has anyone figured out a way to connect a transmitter like this to your phone for use with Google Cardboard?