Skip to contentSkip to author details

diy

A 4-post collection

My First Electronics Kit Build - the DSO138 Oscilloscope

Written by Michael Earls
 electronics  diy  oscilloscope

I recently ordered the brilliant Open-source DSO138 oscilloscope kit by JYE Tech.

It costs about $20 and is eligible for Amazon Prime shipping, so I thought I'd give it a try.

It sat in a pile of other electronic parts for the past few weeks while I waited on a new soldering iron kit and some other parts that I wanted to have on hand for the build.

I bought mine from Amazon. Be careful which supplier you order from as there are some counterfeit kits claiming to be from JYE Tech. Even though the design is open source, JYE Tech has a specific board layout that has been copied part for part with a few minor modifications and sold as a JYE Tech kit.

JYE Tech DSO138 Oscilloscope (on Amazon) Note: There are two versions of the kit, one that requires that you solder on the SMD resistors (13804K) and one with the SMDs already installed (13803K) so that only the through-hole components need to be soldered into place.

Since we're moving to a new house (we have to be out of our rental house by next weekend), I haven't been spending as much time on my electronics projects. I got the urge to work on it last night and started around 6 or 7. I worked on it until about 2:15 when I finally got so tired that I burned myself (twice) with the soldering iron.

Here is my experience building the kit. It should be noted that I am a very early beginner hobbyist with electronics, so my soldering skills are terrible. I got better at it as the night went on, but I think I used my desoldering tool about as much as I used the soldering iron.

I started by organizing all of the components based on their type.

Organizing all the parts Organizing all the parts

Rather than read the color codes on the resistors, I used my multi-meter to measure the resistance and then dropped one end of the resistor into one of the holes on the board. This made placing the components easy. This was also helpful for the few times that I incorrectly read the values of the components. There were a few instances where I went to place the component and there was already one in the hole. In those cases, I re-measured both components to determine the correct one for the position.

parts 1

parts 2

There were two resistors that were of a very high value that I had trouble measuring. They were valued at 2MΩ and 1.8MΩ. I went ahead and placed them the best I could. I would later regret this decision, but I'll cover that later.

After I had all of the resistors in place, I turned the board over and soldered them into place.

Soldering into place

I had a lot of trouble soldering the parts. I decided to switch my soldering tip to a sharp point. I was using a chiseled edge tip, but it was retaining solder. I think it's a combination of the tip, the unleaded solder, and my fear of burning the board (which kept me from properly heating up the components to take the solder).

Solder tip

The original tip I was using. I had trouble with this.

Solder tip

You can see how it was already dirty from the soldering work I had done. I eventually got in a groove and started doing better with my soldering, but not before a lot of rework.

I placed the ceramic disk capacitors next the same way I placed the resistors.

placing the capacitors

Once they were in place, I soldered them in.

Here is a picture of the completed bottom board.

completed bottom board

I had a terrible time soldering the three switches. I kept having to solder and re-solder because the leads were so close together.

Here is a picture illustrating the horrible job that I did. I actually had to rework some of the switches two or three more times after I took this picture. You can also see some incomplete solder joints to the right.

bad soldering

I then got to work on the LCD panel. I had to solder on the male header pins (I had just finished the 40-pin female connector on the main board).

LCD Panel

Here is the front side of the LCD panel (where the soldering had to be performed).

Front of LCD panel

After I got the screen completed, I plugged it all in and attempted to start it up. I was disappointed when I was greeted with a white LCD screen that had a fluctuating brightness. I was so distracted by it that I forgot to take a picture. It's easy to describe: a blank white screen.

I read in the support forums that if the LED on the scope blinks twice at startup, then your main board is working. I was happy to see that my scope's LED blinked twice at startup. That meant my problem was in the communication between the board and the LCD.

I spent the next few hours troubleshooting all of my connections. The scope has a test mode that toggles all of its interface pins from 0 to ~3.3v. This allows you to run a voltmeter over the pin test points and see if they are doing what they're supposed to do. The scope comes with a full schematic diagram, so I was able to refer to that to see where I needed to put my scope. At first, I used the test mode to try to isolate incorrectly attached pins (you can see the test leads above the LCD screen on the LCD panel. Each one of those holes represents the same number attached to the main board. If you get a signal from the test lead, then the signal is coming from the main board into the LCD board).

I quickly realized that I had deeper work to do, so I went to bed frustrated. I woke up this morning ready to do more troubleshooting.

I decided to go deeper into my troubleshooting and use the continuity tester on my meter to test each individual pin on the LCD screen to make sure it was, in fact, connected to the main board. I found two or three pins that were not connected, so I decided to rework the soldering job on the LCD header.

While I was working on the soldering issues, my trusty assistant came to join me and offer his advice.

Trusty assistant

After about 30 minutes of reworking the LCD panel header, I retested. There didn't seem to be any issues, so I plugged it all back in. Still no luck. I had a white screen.

I decided to rework the female headers on the main board because I had seen examples of other people's soldering work and mine looked very bad in comparison. Apparently, I was using too much solder. I also didn't hold the iron on the pins long enough to let the solder flow to the pads and stick to the pins.

So, one-by-one, I held the iron to each pin for three seconds. I used the solder sucker to remove excess solder and added solder where necessary. The joints looked much better when I was finished.

When I plugged it in, I was happy to be greeted by the boot up message. However, it still wasn't right. Remember those bad resistors I told you about earlier? Well, they manage the voltage level of the incoming signal. Since I wasn't sure which resistor was which (they were both very small and had five bands each. I couldn't tell what was what and my meter wouldn't give me a reading on them).

Here is a picture of the horrible looking 1.8MΩ resistor (R2). I destroyed the board around it when I swapped the two resistors (R2 and R4) late last night thinking that would help. I just made a bigger mess.

Resistor mess

I ended up making my own 2MΩ and 1.8MΩ resistors by putting resistors in serial. The 2MΩ was easy, I just took two of my 1MΩ resistors, put them in series, and soldered them in the place of the bad resistor.

When it came time to "make" a 1.8MΩ resistor, I ended up using four values:

  • 1MΩ
  • 680kΩ
  • 100kΩ
  • 20kΩ

It's a definite hack, but my resistor measured correctly (it was actually closer to the desired value even accounting for the tolerances - I was using 1% tolerance components).

Here are a few pictures of my 1.8MΩ resistor hack...

Resistor hack

Resistor values

Four resistors

Four resistors assemble!

Resistors assemble!

Soldering the resistors in a series

finished resistor

The finished monster

Finished and covered

Covering the whole assembly with electrical tape and doing some basic wire management. If you look at the top left of the picture, you can see my 2MΩ replacement (R4).

It took me a while to get a useful signal, but when I did, I was excited to finally get to see it.

First signal

This oscilloscope does not have a very impressive range, but it's just for hobbyists and learners. It taught me a lot about circuit design, component placement, and soldering skills.

I'm going to use it to monitor the signals coming from my synthesizer experiments. Some of the LFOs have frequencies that can't be heard, so it would be nice to have a scope to see if they're working the way I want them to. Plus, it's another technical display on my desk. :)

Controlling a 40106 Oscillator from Raspberry Pi

Written by Michael Earls
 diy  electronics  Lunetta  programming  development  synth  raspberry pi

I have been working with electronics lately moving slowly toward my end goal of creating circuits that can "create" their own "music".

As part of that journey, I have had to establish some baby steps in order to get there. Here are the basic steps I have accomplished so far:

  • Acquire a Raspberry Pi (or other microcontroller) - I chose the Raspberry Pi zero due to its small size (and great price- $5). I recommend the Raspberry Pi starter kit from Adafruit as it has everything you need to get started
  • Acquire basic electronic components - I ordered a lot of passive components (capacitors, resistors, transistors, jumper wires, breadboard, etc.). I've found that the best place to start is Amazon.com, then head over to Mouser Electronics for the little stuff (in big quantities), then All Electronics as a last resort. Adafruit Industries is the best place to buy add-ons, full kits, and great peripherals for your electronic projects.
  • Install an operating system on the Raspberry Pi - I am using Raspbian
  • Configure the WiFi using the serial cable (I don't have a USB hub, so I only had a single USB port on the Pi. This meant that I couldn't install the WiFi adapter and a keyboard & mouse). Once I had the serial adapter, I used PuTTY (I'm on Windows) to connect to the command line and configured WiFi from there
  • Once WiFi was configured, I installed an RDP server so I could use the Remote Desktop client to log into the desktop on the Pi. I rarely use this, but it's nice to have a desktop from time-to-time.
  • Install mono (cross-platform .NET runtime) - I use the C# programming language at my day job, so I'm comfortable with it. The Raspberry Pi supports many different programming languages, so pick the one you are comfortable with.
  • Install monodevelop on the Pi - monodevelop is the IDE that runs on Linux for developing .NET applications. This was not required, but I wanted to see if it would work. It did, without any issues.
  • Once I had the .NET runtime (mono) installed on my Pi, I opened up Visual Studio 2015 Community edition on my Windows 10 machine, added the raspberry-sharp-io NuGet package, and developed a simple application that toggles pin 7 (turning it on) when it starts up, waits for the user to press the ENTER key, then toggles pin 7 again (turning it off).

Here is the source code for my application (I learned the essentials from the raspberry-sharp-io wiki page):

using Raspberry.IO.GeneralPurpose;
using System;

namespace LunettaControl
{
  class Program
  {
    static void Main(string[] args)
    {
      var led1 = ConnectorPin.P1Pin07.Output();

      using (var connection = new GpioConnection(led1))
      {
        connection.Toggle(led1);

        Console.WriteLine("Press [Enter] to quit");
        Console.ReadLine();

        connection.Toggle(led1);
      }
    }
  }
}

Now I had to set up a circuit on my breadboard that controls a 40106 oscillator so that I can turn it on or off using C# and the Raspberry Pi.

Here is my schematic:

Gated Oscillator Schematic Revision 2

The Raspberry Pi is providing +5v that drives the 40106 and the 4093.

The oscillator (pins 1 and 2 of the 40106) is cycling at a fairly low frequency, as controlled by the 1M resistor and the 470nF capacitor (I haven't timed it as I don't have measuring equipment, though I will be able to write some with C# when I get into input pin management on the raspberry-sharp-io library).

I can now use this to control each individual oscillator on the 40106 independent of one another.

The key to making this work is the NAND gate (pins 1, 2, and 3 of the 4093). When combining the signals from the Raspberry Pi (Pin 7 in this case) and the output from the oscillator on pins 1 and 2, we can control the output on pin 3 of the NAND gate.


IC 4093 Quad 2-input Schmitt trigger NAND Gate

4093 Quad 2-input Schmitt trigger NAND Gate IC


40106 Hex Schmitt trigger IC(Logic Gates)

40106 Hex Schmitt trigger IC (Logic Gates)


That means that when Pin 7 of the Pi goes high, it will raise pin 1 of the gate. Then, each time the 40106 oscillates (it is constantly oscillating as long as power is being sent to the IC), it will trigger pin 2 to go high, which causes the gate to go high on pin 3, thereby causing the transistor to pass +3v to the LED and lighting it up (I wanted to isolate the voltage of the LED from the +5v that's driving the oscillator and gate circuit as a proof of concept for managing components with different voltage requirements).

This schematic is actually bad design. I have a few errors (mostly due to using the transistor incorrectly, as well as using an NAND gate rather than an AND gate).

It seems to be working now, but I'm not sure if it's absolutely correct.

The frequency of the blinking is controlled by the oscillator (because pin 7 of the Pi is staying high based depending on whether or not the program is running). When the program stops running, pin 1 of the gate goes low and the gate remains closed, thereby stopping the blinking (oscillator output). Currently, the LED stays lit. I'm guessing this is caused by using a NAND gate rather than an AND gate.

I'd like to thank the following users for their assistance in getting this circuit working (from the electro-music.com Lunetta forum)

Also, the excellent Intro to Lunetta CMOS Synths document helped me get started. Without it, I would not have known what CMOS chips to buy initially.

Intro to Lunetta CMOS Synths

Here is the thread I created on electro-music.com for my question on gating an oscillator:

Clock signals through a Transistor

The following video is similar to my first video about blinking an LED using C#, but this time, the blinking is the result of the oscillation of the 40106, not a timer built into the program. This program simply toggles pin 7 to the "On" position until the user presses the key and then toggles it off again. This video was created before I modified the schematic and removed the indicator LED.

Why I really got back into electronics

Written by Michael Earls
 electronics  diy  music  hobbies  Lunetta  art

Why I really got back into this hobby

A few weeks ago, I stumbled on a DIY synthesizer community based on synthesizers called "Lunettas" (after Stanley Lunetta, the guy who pioneered the process). I'll let you read about it if you're interested.

Intro to Lunetta CMOS Synthesizers

Lunetta on Breadboard

Basically, Lunettas are CMOS-based (usually) integrated circuits that are setup to generate clock frequencies within the range of human hearing. The circuits are created using very inexpensive chips containing "oscillators", very much like the more expensive Moog or Eurorack alternatives (one Lunetta CMOS with six oscillators costs less than $0.50 while a single simple Eurorack oscillator costs about $150). However, the sound from Eurorack modules is more "mature" and musical, while Lunettas tend to be a bit "beepy" and chaotic.

An example of a Lunetta Synth

WARNING! Obnoxious beeping ahead!

I hope to change that by removing the annoying beeping sounds from the resulting output of my Lunetta device and replacing them with more musical results.

The possibilities are endless when you combine CMOS-based (along with some passive components to change clock frequencies driving the components) with a Raspberry Pi and software.

I have a lot of ideas, but every time I get a new Idea, I research the underlying theory and get caught up in the science of it all. The idea behind Lunettas is that they're supposed to be experimental and a way to just play around with circuitry to make cool sounds. I'm applying an enormous amount of brain energy thinking of ways to control the sounds based on theories like the General Theory of Generative Music (GTTM).

Honestly, I just need to sit down and play with these circuits before I can build my ultimate "smart" machine that "composes" its own music.

One of my biggest desires in life is to create a machine that can create art based on minor inputs from me and a little guidance along the way. I want it to "learn" how to listen to music, develop its own "tastes" and then create "music" based on what it has "learned". All of those words in quotes are because I'm not really trying to build a self-realizing AI, I just want to build a machine that creates art.
Google AI Deep Dream Artwork

After 30 years, I have returned to my favorite hobby

Written by Michael Earls
 electronics  michael  programming  diy  projects  hobbies  computing

The past

When I was a teenager, I was a major nerd. Well, actually, I have been a major nerd for my entire life, but it really started to emerge during puberty.

On my exterior, I was a "metal head" who wore Iron Maiden and Metallica t-shirts, ripped up blue jeans (I don't think my father will ever forgive me for cutting up a perfectly good pair of new jeans so I could wear - this is so embarrassing - a zebra patterned leotard under it like some sort of Whitesnake poser. I only did it once, and regretted it for the rest of my life).

Anyway, awkward teenage clique memberships aside, I was into all things "computery" (as I had been since my parents bought me my TI-99/4A computer in 1982).

In Junior High, I bought a makeup kit that had latex appliques for your face that gave the appearance of a skull. It came on a piece of plastic that was shaped like a skull. By filling it with plaster (which I later replaced with a papier mâché alternative), I could get a skull shaped face.

I drilled holes in the center of the eye sockets and glued red LEDs to the insides of the holes. I then ran the wires to a AA battery pack, soldered it all together with a switch, painted them with a paint called "Fleckstone" (which gave the appearance of being made from granite) and gave them to my friends to hang in their locker.

FleckStone

I named it "Norman" (after Norman Bates from Alfred Hitchcock's famous movie, Psycho.

Psycho!

I also read a lot of computer magazines.

One day, one of my computer magazines featured an article on how to make your Commodore 64 talk. A light bulb as bright as a supernova lit up over my head and I immediately turned to the article.

I cut the parts list out of the magazine and asked my dad to take me to Radio Shack to buy the parts. My father was very frugal and did not part with money lightly. I remember one time begging (my memory of it is clear, I was extremely obnoxious about this) for him to buy me an ambulance GoBot (the long lost predecessor to Transformers). This persisted for a few days until he finally got tired of hearing me whine (sorry dad) and bought it.

GoBots, Unite!

We had a rule in the house, we only got gifts for Christmas, Easter, and our Birthday. There were a few exceptions from time-to-time (like a brief behavior modification scheme recommended by one of my teachers in elementary school when I stopped doing my homework (because I was spending all of my time writing BASIC programs on my computer after school) that failed miserably because my father believed that hard work was its own reward - and I'm glad he did, because it taught me, ever so brutally, that you have to work to survive in the real world). Incidentally, I ended up working hard doing EXACTLY the thing that kept me from doing my school work for all of those years - and it pays better!

So, my dad agreed to pay for the parts (thank goodness electronics parts (even at Radio Shack retail prices) are so inexpensive). My grandfather had already given me a lot of parts (he was a vocational high school teacher at the time and had a lot of cool stuff). One of the items my grandfather gave me was a capacitor from a microwave. When he gave me the box of parts (along with an awesome work/test bench that had a built in adjustable power supply and a breadboard), he pulled the capacitor out and specifically warned me to never hook that up to AC power. He said if I ever charged it to its full capacity, it would kill me upon discharge. So, I never even touched it (because I knew that I wasn't mature enough to fully understand how it worked). My dad bought everything that I needed for my project and we came home.

SP0256-AL2 in its original package

The SP0256-AL2 Speech Chip

There was no Internet to refer to back then, so I had to figure out how to read the schematics. My grandfather had given me a "cheat sheet" that had the symbols and what they meant. I believe the magazine also had a small section on how to decipher the plans.

I got started right away. I built the circuit on a breadboard using the schematics in the magazine. The plans that came with the chip were slightly different, so I studied both to try and figure out why they differed.

I never could get the stand-alone audio amplifier working (using the well-known LM386 chip), so I took the advice of the author and ran the output pin to a hole in one of the input jacks on the C-64 for audio (probably the cassette interface). One of my goals for the near future is to get a working audio amplifier going with the LM386 chip (I got one with my starter box the other day).

The female plug that attached to the C-64 was too long and had to be physically cut with a hacksaw to make it the correct size. I also had to solder every single pin that I was using on it, then attach the leads to my breadboard.

SP0256-AL2 on Breadboard

This picture shows the SP0256-AL2 on a breadboard with an Arduino microcontroller

The magazine article explained that the crystal specified on the datasheet that came with the chip was extremely rare, so they offered up an alternative crystal that caused the pitch of the final voice to be higher than it should be.

Once completed, I began the arduous task of typing in the program from the back of the magazine that I could use to trigger allophones one after the other to make my computer talk. I then altered the code so that I could put in some common words without typing all of the allophones each time.

My best friend at the time was dating a girl and we (probably just me) decided to prank call her and have the computer say an offensive sentence. I remember it well, but the adult in me is preventing me from sharing due to its graphic nature. It wasn't too bad, but it doesn't bear repeating.

I still have that chip lying around on the same breadboard I used to make the project. I see it from time-to-time (usually during a move when we're packing boxes).

A few years back

Back in 2009, I made a "robot" for Laurie to use in the classroom for teaching special education preschoolers. I created it using off-the-shelf parts from Radio Shack and a little bit of soldering. It had a button on the back that lit up the eyes when you pressed it. It reinforced correct answers to questions. It was quite boring. I always wanted to print up a fancy sticker to put on the face and body, but never got around to it.

Cerkit the Robot

Cerkit the Robot - A preschool teaching aid

The present.

I recently ordered a bunch of components off of the Internet. Included in my purchases were 2 Raspberry Pi Zeroes. The Raspberry Pi zero is a full computer on an extremely small motherboard (~1 x 2 inches). It can run Linux and even has an HDMI output so you can plug it into a TV.

Raspberry Pi Budget Pack

Link: Raspberry Pi Zero Budget Pack

I also bought some other components to support my projects.

Last night, I spent about four hours playing with a 555 timer Integrated Circuit (IC).

555 Timer IC Circuit

It just blinks a light at a frequency depending on the resistance coming from the blue potentiometer. As I turn the pot, the light blinks faster or slower.

I tried to use a second 555 timer IC triggered by the output of the first so that I could have a light blink twice for every cycle of the first timer, but I couldn't get that to work before it was time to go to bed.

I then put together a simple circuit to help me learn how to use transistors. I used a momentary switch to trigger current through a NPN transistor to turn on an LED. That was fun as I never really grokked transistors when I was younger.

When I created my domain name in 1996, I had every intention of eventually writing about electronics (hence the name cerkit). Even though at the time, I used the name cerkit as a shorthand way of referring to the "Cerebral Kitchen.

It works both ways now as I can include non electronics stuff, as well.

Ultimately, all of my hobbies (as well as my 20+ year career experience as a programmer) are coming together in a symphony of exquisite mental pleasure.

I have been "cerkit" for a very long time. My BBS handle was "cerkit", and I use it whenever I can (someone beat me to it on Soundcloud, so I have to be "cerkit-music").

I like that it hints at electronics, but also allows me to be the Cerebral Kitchen, too.