Fully-functional Oscilloscope on a PIC

When troubleshooting circuits it’s handy to have an oscilloscope around, but often we aren’t in a lab setting with all of our fancy, expensive tools at our disposal. Luckily the price of some basic oscilloscopes has dropped considerably in the past several years, but if you want to roll out your own solution to the “portable oscilloscope” problem the electrical engineering students at Cornell produced an oscilloscope that only needs a few knobs, a PIC, and a small TV.

[Junpeng] and [Kevin] are taking their design class, and built this prototype to be inexpensive and portable while still maintaining a high sample rate and preserving all of the core functions of a traditional oscilloscope. The scope can function anywhere under 100 kHz, and outputs NTSC at 30 frames per second. The user can control the ground level, the voltage and time scales, and a trigger. The oscilloscope has one channel, but this could be expanded easily enough if it isn’t sufficient for a real field application.

All in all, this is a great demonstration of what you can accomplish with a microcontroller and (almost) an engineering degree. To that end, the students go into an incredible amount of detail about how the oscilloscope works since this is a design class. About twice a year we see a lot of these projects popping up, and it’s always interesting to see the new challenges facing students in these classes.

Continue reading “Fully-functional Oscilloscope on a PIC”

Rushing the Design and Construction of LED Centerpieces

‘Dragon Flame’ RGB LED table centerpieces, by [Alex Lao]
Sometimes the most important thing is getting something done.

[Alex Lao] was recently in such a situation. His sister was getting married and he designed, built, and delivered twenty RGB LED table centerpieces in a rush. There were no prototypes made, and when the parts arrived all twenty were built all at once over a single weekend. These table centerpieces are illuminated by RGB LEDs and battery-powered, but have an option to be powered by a wall adapter.

[Alex] helpfully shared some tips on reducing the production risks and helping ensure results in such a limited time frame. His advice boils down to this: reduce the unknowns. For Alex this meant re-using code and components from a previous project — even if they were not optimal — so that known-good schematic and footprint libraries could be used for the design.

From one perspective, the PIC32 microcontroller inside each lamp is overkill for an LED centerpiece. From another perspective, it was in fact the perfect part to use because it was the fastest way for [Alex] to get the devices working with no surprises.

For an added perspective on needing to get production right the first time on a much larger scale, be sure to check out getting an installation made up of 25,000 PCBs right the first time.

Microchip’s PIC32MZ DA — The Microcontroller With A GPU

When it comes to displays, there is a gap between a traditional microcontroller and a Linux system-on-a-chip (SoC). The SoC that lives in a smartphone will always have enough RAM for a framebuffer and usually has a few pins dedicated to an LCD interface. Today, Microchip has announced a microcontroller that blurs the lines between what can be done with an SoC and what can be done with a microcontroller. The PIC32MZ ‘DA’ family of microcontrollers is designed for graphics applications and comes with a boatload of RAM and a dedicated GPU.

The key feature for this chip is a boatload of RAM for a framebuffer and a 2D GPU. The PIC32MZ DA family includes packages with 32 MB of integrated DRAM designed to be used as framebuffers. Support for 24-bit color on SXGA (1280 x 1024) panels is included. There’s also a 2D GPU in there with support for sprites, blitting, alpha blending, line drawing, and filling rectangles. No, it can’t play Crysis — just to get that meme out of the way — but it is an excellent platform for GUIs.

Continue reading “Microchip’s PIC32MZ DA — The Microcontroller With A GPU”

32-Bit Processing For The Vectrex Arcade System

Alongside the Commodores, Ataris, Nintendos, and all the other game systems of the 80s, there was a single unique video game system that stood out from the pack. This was the Vectrex, a console with a built-in CRT meant to display vector graphics and only vector graphics. The video game crash of 1983 wasn’t kind to the Vectrex, but it still lives on with a reasonably popular homebrew scene. Still, these homebrew games are limited by the hardware itself. After thirty years, the Vectrex has an upgrade. The Vectrex32 is a coprocessor, designed for the Vectrex cartridge slot, that gives this ancient console better graphics and 32-bit capabilities.

There’s a whole site dedicated to this Vectrex add-on, and the hardware is pretty much what you would expect. There’s a fast PIC32 microcontroller on this cartridge, a USB port, and a dual-port memory chip that’s connected to the Vectrix’s native processor.

Since this add-on cartridge is effectively a computer itself,  the Vectrex32 can operate as a BASIC interpreter for the Vectrex. That’s something the original hardware couldn’t have done, and makes homebrew development much easier.

You can check out a few videos describing the functionality of the Vectrex32 below, along with a few gameplay videos of new homebrew games written specifically for the Vectrex.

Continue reading “32-Bit Processing For The Vectrex Arcade System”

Building A Wavetable Synth

Every semester at one of [Bruce Land]’s electronics labs at Cornell, students team up, and pitch a few ideas on what they’d like to build for the final project. Invariably, the students will pick what they think is cool. The only thing we know about [Ian], [Joval] and [Balazs] is that one of them is a synth head. How do we know this? They built a programmable, sequenced, wavetable synthesizer for their final project in ECE4760.

First things first — what’s a wavetable synthesizer? It’s not adding, subtracting, and modulating sine, triangle, and square waves. That, we assume, is the domain of the analog senior lab. A wavetable synth isn’t a deep application of a weird reverse FFT — that’s FM synthesis. Wavetable synthesis is simply playing a single waveform — one arbitrary wave — at different speeds. It was popular in the 80s and 90s, so it makes for a great application of modern microcontrollers.

The difficult part of the build was, of course, getting waveforms out of a microcontroller, mixing them, and modulating them. This is a lab course, so a few of the techniques learned earlier in the semester when playing with DTMF tones came in very useful. The microcontroller used in the project is a PIC32, and does all the arithmetic in 32-bit fixed point. Even though the final audio output is at 12-bit resolution, the difference between doing the math at 16-bit and 32-bit was obvious.

A synthesizer isn’t useful unless it has a user interface of some kind, and for this the guys turned to a small TFT display, a few pots, and a couple of buttons. This is a complete GUI to set all the parameters, waveforms, tempo, and notes played by the sequencer. From the video of the project (below), this thing sounds pretty good for a machine that generates bleeps and bloops.

Continue reading “Building A Wavetable Synth”

Your Arm Is The Ideal Controller

With interest and accessibility to both wearable tech and virtual reality approaching an all-time high, three students from Cornell University — [Daryl Sew, Emma Wang, and Zachary Zimmerman] — seek to turn your body into the perfect controller.

That is the end goal, at least. Their prototype consists of three Kionix tri-axis accelerometer, gyroscope and magnetometer sensors (at the hand, elbow, and shoulder) to trace the arm’s movement. Relying on a PC to do most of the computational heavy lifting, a PIC32 in a t-shirt canister — hey, it’s a prototype! — receives data from the three joint positions, transmitting them to said PC via serial, which renders a useable 3D model in a virtual environment. After a brief calibration, the setup tracks the arm movement with only a little drift in readings over a few minutes.

Continue reading “Your Arm Is The Ideal Controller”

Motorized Camera Dolly Rolls With the Changes

Over the last semester, Cornell student [Ope Oladipo] had the chance to combine two of his passions: engineering and photography. He and teammates [Sacheth Hegde] and [Jason Zhang] used their time in [Bruce Land]’s class to build a motorized camera dolly for shooting time-lapse sequences.

The camera, in this case the one from an iPhone 6, is mounted to an off-the-shelf robot chassis that tools around on a pair of DC motors. The camera mount uses a stepper motor to get just the right shot. A PIC32 on board the ‘bot takes Bluetooth commands from an iOS app that the team built. The dolly works two ways: it can be controlled manually in free mode, or it can follow a predetermined path at a set speed for a specified time in programmed mode.

Our favorite part of the build? The camera’s view is fed to a smart watch where [Ope] and his team can take still pictures using the watch-side interface. Check it out after the break, and stick around for a short time-lapse demo. We’ve featured a couple of dolly builds over the years. Here’s a more traditional dolly that rides a pair of malleable tubes.

Continue reading “Motorized Camera Dolly Rolls With the Changes”