This PIC Is A Squarewave Generator

When we use a microcontroller to flip a few GPIOs or talk SPI to a peripheral chip, we are often overlooking that it will usually contain an array of built-in peripherals that were once the preserve of extra hardware. Analogue ports, timers, UARTs, and clock generators, to name just a few. [Giovanni Bernardo] has been experimenting with one of these, the internal frequency synthesiser on many PIC microcontrollers, and he’s  produced a handy square wave generator for which he’s placed code on GitHub and produced a write-up (Italian language, Google translate link).

The board used is a PIC16F375 Curiosity Nano, and code takes input from a rotary encoder to set the frequency, with a button to select different step sizes and an alphanumeric LCD display to show the current settings. Frequencies from 1 Hz to 15 MHz are possible, with a clever switch between two of the PICs internal clocks to be used as the reference frequency. Stability depends upon whatever source the PIC uses for its own clock, and while we suspect that will be enough for most users it’s not inconceivable that the PIC could be clocked from a GPS-disciplined source or similar were there a requirement for it.

There are plenty of ways to generate square waves from a microcontroller. Most projects use waveform generator ICs.

Building A Mechanical Oscillator, Tesla Style

Before Tesla devised beautifully simple rotary machinery, he explored other methods of generating alternating current. One of those was the mechanical oscillator, and [Integza] had a go at replicating the device himself. (Video, embedded below the break.)

Initial attempts to reproduce the technology using 3D-printed parts were a failure. The round cylinder had issues sealing, and using O-ring seals introduced too much friction to allow the device to oscillate properly. A redesign that used external valving and a square cylinder proved more successful.

Once the oscillator was complete, the output shaft was fitted with magnets and a coil to generate electricity. After generating a disappointing 0.14 volts, [Integza] went back and had a look at the Maxwell-Faraday equations. Using this to guide the design, a new coil was produced with more turns, and the magnetic flux was maximised. With this done, the setup could generate seven volts, enough to light several LEDs.

While it’s not a particularly efficient generator, it’s a great proof-of-concept. Yes, Tesla’s invention worked, but it’s easy to see why he moved on to rotary designs when it came to real-world applications. We’ve seen [Integza] take on other builds too, like the ever-popular Tesla turbine.

Continue reading “Building A Mechanical Oscillator, Tesla Style”

Take A Break From Arduinos, And Build A Radio Transmitter

When you start watching [learnelectronic’s] two-part series about making a radio transmitter, you might not agree with some of his history lessons. After all, the origin of radio is a pretty controversial topic. Luckily, you don’t need to know who invented radio to enjoy it.

The first transmitter uses a canned oscillator, to which it applies AM modulation. Of course, those oscillators are usually not optimized for that service, but it sort of works. In part two he reduces the frequency to 1 MHz at which point it can be listened to on a standard AM radio, before adding an amplifier so any audio source can modulate the oscillator. There’s a lot of noise, but the audio is clearly there.

This is far from practical of course, but combined with a crystal radio it could make an awesome weekend project for a kid you want to hook on electronics. The idea that a few simple parts could send and receive audio is a pretty powerful thing. If you get ready to graduate to a better design, we have our collection.

Continue reading “Take A Break From Arduinos, And Build A Radio Transmitter”

Homebrew Oscillator Is In A Glass By Itself

Great things happen when we challenge ourselves. But when someone else says ‘I bet you can’t’ and you manage to pull it off, the reward is even greater. After [WilkoL] successfully made a tuning fork oscillator, his brother challenged him to make one out of a wine glass. We’ll drink to that!

First, [WilkoL] needed to find a way to make the wine glass vibrate continuously without having to stand there running a moistened finger around the edge. A piezo speaker mounted close by did the trick. Then he had to detect the sound waves, amplify them, and feed them back in.

After toying with the idea of making a laser microphone, and tossing aside the idea of a regular microphone (because squealing feedback), he settled on using light. LEDs didn’t work, probably because the light is too divergent. But he found out that by aiming a laser just right, the curve of the wine glass modulates the light, and the waves can be detected with a phototransistor.  Then it was just a matter of amplifying the the sound and feeding it back to the piezo.

In the demo video after the break, you can see the vibrations in the glass manifest once he pours in some water. As anyone who’s ever played the water glasses can tell you, this also changes the frequency. [Editor’s note: I expected a much larger change in pitch. Not sure what’s going on here.]

Speaking of, here’s a steampunky glass armonica that uses an old turntable motor to rotate the wine glass, and a pneumatic cylinder to raise and lower the water level.

Continue reading “Homebrew Oscillator Is In A Glass By Itself”

Improving A Cheap Frequency Counter With GPS

Frequency counters are useful tools for anyone that finds themselves regularly working with time-variant signals. There are a huge range available, from cheap eBay specials to expensive lab-grade hardware. [itakeyourphoto] had a counter on the lower end of the cost spectrum, and decided to make some improvements with the help of GPS (Youtube link, embedded below).

The fundamental weakness of a cheap frequency counter is usually the internal reference against which all other signals are measured. The more accurate this is, the more accurate the counter will be. [itakeyourphoto] determined that a great way to generate a reasonably good reference frequency was by using a uBlox GPS module. Once locked on to satellites, it can use a numerically controlled oscillator to output any frequency up to 15MHz with good accuracy.

The cheap frequency counter in question used a 13 MHz internal reference, so the uBlox module was programmed to match this. [itakeyourphoto] reports that it compares favorably to his higher-end GPS-disciplined oscillators, displaying very little drift or other aberrations.

We see plenty of clocks using GPS for its accurate time, but we’ve seen projects that attempt to go even further than that, too. Video after the break.

[Thanks to jafinch78 for the tip!]

Continue reading “Improving A Cheap Frequency Counter With GPS”

Fun With Negative Resistance II: Unobtanium Russian Tunnel Diodes

In the first part of this series, we took a look at a “toy” negative-differential-resistance circuit made from two ordinary transistors. Although this circuit allows experimentation with negative-resistance devices without the need to source rare parts, its performance is severely limited. This is not the case for actual tunnel diodes, which exploit quantum tunneling effects to create a negative differential resistance characteristic. While these two-terminal devices once ruled the fastest electronic designs, their use has fallen off dramatically with the rise of other technologies. As a result, the average electronics hacker probably has never encountered one. That ends today.

Due to the efficiencies of the modern on-line marketplace, these rare beasts of the diode world are not completely unobtainable. Although new-production diodes are difficult for individuals to get their hands on, a wide range of surplus tunnel diodes can still be found on eBay for as little as $1 each in lots of ten. While you’d be better off with any number of modern technologies for new designs, exploring the properties of these odd devices can be an interesting learning experience.

For this installment, I dug deep into my collection of semiconductor exotica for some Russian 3И306M gallium arsenide tunnel diodes that I purchased a few years ago. Let’s have a look at what you can do with just a diode — if it’s the right kind, that is.

[Note: the images are all small in the article; click them to get a full-sized version]

Continue reading “Fun With Negative Resistance II: Unobtanium Russian Tunnel Diodes”

Fun With Negative Resistance: Jellybean Transistors

The concept of negative resistance has always fascinated me. Of course, a true negative resistance is not possible, and what is meant is a negative differential resistance (NDR). But of course knowing the correct term doesn’t do anything to demystify the topic. Negative resistance sounds like an unusual effect, but it turns out to be relatively common, showing up in places like neon lamps and a number of semiconductor structures. Now’s as good a time as any to dig in and learn more about this common principle.

NDR means a portion of a device’s I/V curve where the current falls with increasing applied voltage. The best-known semiconductor device exhibiting negative resistance is the tunnel diode, also known as the Esaki diode after one of the Nobel-Prize-winning discoverers of the quantum tunneling effect responsible for its operation. These diodes can perform at tremendous speeds; the fastest oscilloscope designs relied on them for many years. As the transistor and other technologies improved, however, these diodes were sidelined for many applications, and new-production models aren’t widely available — a sad state for would-be NDR hackers. But, all hope is not lost.

Rummaging through some old notebooks, I rediscovered an NDR design I came up with in 2002 using two common NPN transistors and a handful of resistors; many readers will already have the components necessary to experiment with similar circuits. In this article, we’ll have a look at what you can do with junkbox-class parts, and in a future article we’ll explore the topic with some real tunnel diodes.

So, let’s see what you can do with a couple of jellybean transistors!

Continue reading “Fun With Negative Resistance: Jellybean Transistors”