HackerBox 0037: WaveRunner

This month, HackerBox Hackers are exploring wave signals and audio signal processing testbeds within digital computing environments as well as analog electronic test instruments. This Instructable contains information for getting started with HackerBox #0037, which can be purchased here while supplies last. Also, if you would like to receive a HackerBox like this right in your mailbox each month, please subscribe at HackerBoxes.com and join the revolution!

Topics and Learning Objectives for HackerBox 0037:

  • Install and configure GNU Octave software
  • Represent and manipulate wave signals within a computer
  • Explore audio processing functionality of GNU Octave
  • Couple audio signals between a computer and external hardware
  • Assemble audio testbeds using amplifiers and level indicators
  • Construct a 1MHz multiple-waveform signal generator

HackerBoxes is the monthly subscription box service for DIY electronics and computer technology. We are hobbyists, makers, and experimenters. We are the dreamers of dreams.

HACK THE PLANET!

Step 1: HackerBox 0037: Box Contents

  • XR2206 Signal Generator Kit
  • Laser-Cut Acrylic Enclosure for Signal Generator
  • Exclusive Audio Testbed PCB
  • Two LM386 Audio Amplifier Kits
  • Two KA2284 Audio Level Indicator Kits
  • USB Sound Card
  • Two 40mm 3W Speakers
  • Set of Alligator Clip Leads
  • Two 3.5mm Audio Patch Cables
  • Two 3.5mm Audio Breakout Modules
  • microUSB Breakout Module
  • 9V Battery Clip with Barrel for Signal Generator
  • Exclusive Cloud Computing Decal
  • Exclusive HackLife Beanie Hat

Some other things that will be helpful:

  • Soldering iron, solder, and basic soldering tools
  • Computer for running GNU Octave and other software
  • One 9V Battery
  • One cool head for sporting HackLife Beanie Hat

Most importantly, you will need a sense of adventure, hacker spirit, patience, and curiosity. Building and experimenting with electronics, while very rewarding, can be tricky, challenging, and even frustrating at times. The goal is progress, not perfection. When you persist and enjoy the adventure, a great deal of satisfaction can be derived from this hobby. We all enjoy livin' the HackLife, learning new technology, and building cool projects. Take each step slowly, mind the details, and don't be afraid to ask for help.

There is a wealth of information for current, and prospective, members in the HackerBoxes FAQ.

Step 2: Waves

A wave is a disturbance that transfers energy through matter or space, with little or no associated transfer of mass. Waves consist of oscillations or vibrations of a physical medium or a field, around relatively fixed locations. From the perspective of mathematics, waves, as functions of time and space, are a class of signals. (Wikipedia)

Step 3: GNU Octave

GNU Octave software is a favored platform for representing and manipulating waveforms within a computer. Octave features a high-level programming language primarily intended for numerical computations. Octave is useful for performing various numerical experiments using a language that is mostly compatible with MATLAB. As part of the GNU Project, Octave is free software under the terms of the GNU General Public License. Octave is one of the major free alternatives to MATLAB, others being Scilab and FreeMat.

Follow the link above to download and install Octave for any OS.

Tutorial: Getting Started with Octave

Octave Video Tutorials from DrapsTV:

  1. Introduction & Setup
  2. Basic Operations
  3. Loading, Saving, and Using Data
  4. Plotting Data
  5. Control Statements
  6. Functions

While outside of our scope here of basic waves and audio processing, you can find some mind blowing material to work on in Octave by searching MATLAB subjects such as "DSP IN MATLAB" or "NEURAL NETWORKS IN MATLAB". It is a very powerful platform. The rabbit hole goes pretty deep.

Step 4: Audio Signal Interfacing

Audio frequency signals created within a computer can be coupled to external hardware using the speaker output of a sound card. Similarly, the microphone input of a sound card can be used to easily couple external audio frequency signals into a computer.

Using a USB sound card is a good idea for such applications to prevent damaging the audio circuitry of your computer motherboard should something go wrong. A couple of 3.5mm audio patch cables and 3.5mm breakout modules are quite useful for interfacing circuits, speakers, and os forth with the ports on the USB sound card.

In addition to use with GNU Octave, there are some cool projects floating around for Sound Card Oscilloscopes which will let you "plot" signals of a sufficiently low frequency to be sampled by a microcomputer sound card.

Step 5: Audio Signals in GNU Octave

Octave has some really useful audio processing functionality.

These video (and others) form Dan Prince are a great start:

Video - Learn Audio DSP 1: Getting Started Making Sine Oscillator

Video - Learn Audio DSP 2: Basic Waveforms and Sampling

Step 6: Audio Testbed - Two Options

The Audio Testbed is useful for auditioning audio frequency signals on two channels (stereo Left, Right, or any other two signals). For each channel, a line-level input can be amplified, visualized by an LED level indicator, and finally driven to a 40mm audio speaker.

ASSEMBLY OPTIONS

The audio testbed can be assembled as separate coupled modules or as a single integrated platform. Decide which option you prefer before you begin assembly and follow the corresponding step in this guide.

AMPLIFIER

The two audio amplifiers are based on the LM386 integrated circuit (wiki).

LED LEVEL INDICATOR

The two level indicators are based on the KA2284 integrated circuit (datasheet).

Step 7: Assembly Option 1 - Separate Modules

When opting to assemble the audio testbed as separate coupled modules, simply assemble the two audio amplifier and two level indicator modules as separate kits.

AUDIO AMPLIFIER

  • Start with the two axial resistors (not polarized)
  • R1 is 1K Ohm (brown, black, black, brown, brown)
  • R2 is DNP (do not populate)
  • R10 is 4.7K Ohm (yellow, purple, black, brown brown)
  • Next install the two small ceramic capacitors
  • C5 and C8 are both small "104" caps (not polarized)
  • Next solder in the 8pin DIP socket (note silkscreen orientation)
  • Insert the chip AFTER the socket has been soldered
  • The three electrolytic caps C6, C7, C9 are polarized
  • For caps, shaded half on silkscreen is "-" lead (short wire)
  • The LED is polarized with "+" marking for the long wire
  • Solder the remaining components
  • Connect speaker to "SP" header
  • Power with 3-12V (example: micoUSB breakout for 5V)

AUDIO LEVEL INDICATOR

  • Start with the two axial resistors (not polarized)
  • R1 is 100 Ohms (brown, black, black, black, brown)
  • R2 is 10K Ohm (brown, black, black, red, brown)
  • The KA2284 SIP (single inline package) is angled at pin 1
  • The SIP marking for the silkscreen shows a box for pin 1
  • Note that the two caps C1 and C2 are different values
  • Match them up to the PCB and orient long wire to "+" hole
  • Now D5 is red LED, other four D1-D4 are green
  • LEDs are polarized with long wire to "+" hole
  • The trimmer potentiometer and headers fit as shown
  • Connect signal like t audio input
  • Power with 3.5-12V (example: microUSB breakout for 5V)

Step 8: Assembly Option 2 - Integrated Platform

When opting to assemble the audio testbed as an integrated platform, select components from the four module kits (two audio amplifiers and two level indicators) are soldered to the exclusive audio testbed PCB along with two 40mm speakers and a microUSB breakout for 5V power.

  • Start with the axial resistors (not polarized)
  • R2 and R9 are 4.7K Ohm (yellow, purple, black, brown, brown)
  • R3 and R10 are DNP (do not populate)
  • R4 is 1K Ohm (brown, black, black, brown, brown)
  • R5 and R11 are 100 Ohm (brown, black, black, black, brown)
  • R6 and R12 are 10K Ohm (brown, black, black, red, brown)
  • Next solder the sockets for IC1 and IC2
  • Insert chips AFTER the sockets are soldered
  • Next solder four small ceramic caps C4, C5, C10, C11
  • The ceramic caps are marked "104" and are not polarized
  • The nine Electrolytic caps are polarized with a "+" for the long wire
  • C1 is 1000uF
  • C2 and C8 are 100uF
  • C3, C6, C9, C12 are 10uF
  • C7 and C13 are 2.2uF
  • The eleven LEDs are polarized
  • The short wire "-" goes in the hole near the flat side of the circle
  • Two red LEDs go to the outermost LED pad on each end
  • The four inner LEDs lined up on each side are green
  • A singe clear/blue LED (from one Amp Kit) is in the center
  • The KA2284 SIP (single inline package) is angled at pin 1
  • The USB breakout lies flat on PCB with pins through both boards
  • The 3.5mm jack, trimmers, and pots install as shown on board
  • Hot glue speakers onto PCB prior to soldering with trimmed leads
  • Power via microUSB breakout (5V)

Step 9: Signal Generator

The Function Generator Kit features an XR2206 Integrated Circuit (datasheet) and a laser-cut acrylic enclosure. It is capable of generating Sine, Triangle, and Square Wave output signals in the 1-1,000,000 Hz frequency range.

Specifications

  • Voltage Supply: 9-12V DC Input
  • Waveforms: Square, Sine & Triangle
  • Impedance: 600 Ohm + 10%
  • Frequency: 1Hz – 1MHz

SINE WAVE

  • Amplitude: 0 – 3V at 9V DC input
  • Distortion: Less than 1% (at 1kHz)
  • Flatness: +0.05dB 1Hz – 100kHz

SQUARE WAVE

  • Amplitude: 8V (no load) at 9V DC input
  • Rise Time: Less than 50ns (at 1kHz)
  • Fall Time: Less than 30ns (at 1kHz)
  • Symmetry: Less than 5% (at 1kHz)

TRIANGLE WAVE

  • Amplitude: 0 – 3V at 9V DC input
  • Linearity: Less than 1% (up to 100kHz) 10m

Step 10: HackLife

Send us a picture of you (or your dog/kid/robot) wearing your exclusive HackLife beanie hat! We want to update this placeholder collage with one showing HackerBox members all around the globe Livin' the HackLife.

If you have enjoyed this Instructable and would like to have a cool box of hackable electronics and computer tech projects descend upon your mailbox each month, please join the revolution by surfing over to HackerBoxes.com and subscribe to receive our monthly surprise box.

Reach out and share your success in the comments below or on the HackerBoxes Facebook Page. Certainly let us know if you have any questions or need some help with anything. Thank you for being part of HackerBoxes!

2 People Made This Project!

Recommendations

  • Toys Contest

    Toys Contest
  • Big and Small Contest

    Big and Small Contest
  • Make it Glow Contest 2018

    Make it Glow Contest 2018

8 Discussions

0
None
AaronH191

10 days ago on Step 8

Could post a schematic for the integrated unit?

The one shown has R3 and R10 which the instructions say are DNP.

I'm getting a buzz on the right side and I think it might be a Resistance issue (it cuts in or out at various thresholds on the right side Pot)

15439847098464638920056353418106.jpg
5 replies
1
None
mlarussaAaronH191

Reply 8 days ago

I had the same problem, but I replaced the LM386s with ones I had on hand. Worked much better - had a clearer, louder sound passing through the speakers.

Also, I switched out the linear (B10K) pots with log (A10K) pots. Volume is controlled easier now. Here's some explanation why logarithmic pots work better for volume: https://electronics.stackexchange.com/questions/10...

0
None
eburmanmlarussa

Reply 6 days ago

Similar issue with my project. I had to swap out a bad '386 with a good one that I fortunately had on hand. Everything seems to be working well now.

0
None
qvanderAaronH191

Reply 9 days ago

same here.. buzzing on right side.

0
None
hackerjutsuAaronH191

Reply 10 days ago

I'm having the same issue. Let me know if adding the resistors on R3 and R10 works for you. My hackerbox was also missing 1 of the 100uF 16v capacitors so I have a 25v 100uF being used on C8 which doesn't match with C2. So my assumption is that the buzzing/static sound on my board was coming from that. Also two of my green lights on the left side of the board does not work but the sound does come out with much static.

0
None
HackerBoxesAaronH191

Reply 10 days ago

The PCB schematic is in the image for Step 8. You can populate the R3 and R10 with 2K-4.7K resistors if you wish, but they are not strictly necesary.

0
None
Earthwormchris

9 days ago

My signal generator kit didn't have the xr2206 chip or dip socket. How do I get a replacement?

1 reply