Monday, March 23, 2015

Receiving JT65 with RTL-SDR

A couple of weeks ago I bought a RTL-SDR (software defined radio receiver) dongle with the 820T2 tuner chip. You just cant beat the fun/price ratio on this one. For 11$ (with free shipping) it is a bargain, and it is a great way to learn about radios (at least the reception part).

A bargain on AliExpress

Initially I used Gqrx on my Mac to communicate with the RTL-SDR, but eventually I had to resort to SDR# on Windows 7, as it has a bit more features. I have the impression that most radio (and ham-stuff) is made for Windows rather than Mac or Linux.


Apparently not much activity on 10m, but JT65 lurks there in the noise
Even with the standard antenna I had no problem receiving FM broadcast between 88-108 MHz, DAB around 200 MHz, some public transport transmitting FM on 151 MHz and some sporadic narrow FM around 140 MHz. I could also see that there was a lot of activity on 434 MHz and 868MHz bands from car keys, weather transmitters, baby calls and so on.

A few JT65 signals in the WSJT-X waterfall
However, what I really wanted to receive was amateur radio digital modes JT65 and PSK31 on the HF bands (preferably on 10m and 20m). I made a half-wave dipole for the 10m band (28MHz), and soldered the coax directly on the board. The RTL-SDR seem very noisy on HF and all I got initially was a weak RTTY signal on 10 m (which I was unable to decode), and a brief SSB-reception. I guess that one reason for the bad performance is that the strong FM broadcast signals on 88-108MHz interferes with the lower frequency bands.

Receiving JT65 in WSJT-X

However, after a bit of tweaking with the audio levels in SDR# and WSJT-X, I was able to receive some JT65 messages. It was incredibly fun to receive signals from Spain, Russia, South Africa and Brazil (among others) on this 11$ stick and my home-made dipole antenna. (Now I finally understand what the amateur radio people are so intrigued about.)

Received JT65 on 10 m from ZS6KMD in South Africa (9715km)
JT65 on 10m from PY2RED in Brazil (10550km)

Obviously, there are some improvements that can be done with the RTL-SDR to help HF reception. A FM-broadcast bandpass filter would eliminate the interference from the strong FM broadcast transmiters. As I am mainly interested in HF, and do not care about the performance above 30MHz, a simple low-pass filter at 30MHz will probably also do the trick.  Better shielding and filtering on USB can also help. Many folks are also using an upconverter, for example the Ham-it-up, which is undoubtedly the way to go to improve HF sensitivity.

Although I might try to improve HF reception on the RTL-SDR later, I will rather go building a Softrock RXTX SDR Tranceiver. The said kit is already on my workbench, and the soldering iron is hot. More to come...

Wednesday, February 25, 2015

DIYcrap audio mixer #3. FV-1 Reverb

This is part 3 of "building an audio mixer with effects". For part 1 go here, and for part 2, go here.



The mixer is working fine, and already has got two PT2399 circuits for delay. But now it is time to add some reverb. For reverb I decided to use an FV-1 based design. Experimental Noize has some nice small boards built around this chip, preprogrammed for different purposes. I decided to go for the SKRM-C8-R02 Mono-In/Stereo Out reverb and delay module.


I wanted to use a rotary switch to select between the different programs. The SKRM data sheet proposes to use a 74HC148 8 to 3 Line Priority Encoder for this purpose. Hence, there is a need for a small PCB to mount the SKRM and the 74HC148 (in addition to some additional components). Although I have used KiCad and OSH Park for PCB production previously, I wanted to test Fritzing for this small project.



I drew a quick diagram in Fritzing, swithced to PCB-view and the auto-router took care of the rest (at least most of it).


After a about ten days the card arrived in my mailbox.


The board came out quite nicely. Although I am very satisfied with the result, I do not think I will use Fritzing for my next project. OSH Park and other alternatives are way cheaper, and I think the Fritzing software is a bit limited compared to Eagle or KiCad (and even if the Fritzing-software is very simple to use, Eagle and KiCad are not that difficult to learn). The files are available at the Fritzing-site in case you are interested.


It took about 10 minutes to add the few components :-). It is only a 74HC148, a capacitor and a pull up resistor network.



Then I slammed the SKRM on top of it, soldered the connectors, and started jamming with some heavy reverb. But wait, I forgot one thing, namely to securely mount the PCB inside the mixer. A simple solution is to screw standoffs to the front panel, but the screws would interfere with the front panel design. I could also glue the standoffs to the front panel, but I just hate to glue things together when there is a slight chance that I might want to dismantle it later.



Hence, I created a plate to screw the PCB standoffs to, that is fastened with the rotary switch. It is designed in OpenSCAD and 3D-printed.


The above picture show how it looks like inside the mixer. Notice that the plate (in pink) is fastened together with the rotary switch.



The above picture show how the mixer looks like inside. The SKRM is driven by a LM7805 which is connected to the +12V rail (the blue heatsink can be seen on the bottom part of the picture). The circuit draws about 170mA, even if the data sheet states it should be less than 75mA. The reason? I do not know.



DIYcrap mixer. Now with reverb.

Monday, February 2, 2015

Building an enclosure for Mutable Instruments Shruthi-1

About a year ago I ordered a Shruthi-1 PCB and a Four Pole Mission PCB from Mutable instruments. After sourcing the components, it was a quick and enjoyable build. The synth has, however, been sitting in my drawer for a long time waiting for an enclosure.



First, I thought of buying the metal enclosure from Mutable Instruments. Besides the fact that the metal enclosure costs ¢55 (not a bad price, but still), I had, due to financial reasons, used different buttons than those recommended my Mutable Instruments. Since I had no intention to change those, I had to make my own enclosure.


Before bragging about my design I have to inform you that there is an excellent downloadable enclosure out on Thingiverse:284637. I tried it, but I just could not get it to print nice on my small RepRap Huxley.


I used OpenSCAD since it is Open Source and pretty nerdy. The box is pretty simple (and boxy), but takes only a couple of hours to print and consists of only three parts.


I created small cylinders for the LEDs. In this way they are highly visible on the front panel although the PCB is about 10mm below the panel. The cylinders also ensures that there is no light leakage from one LED opening to the next.


The final case looks ok. However, the Shruthi is not the easiest synth to use, at least when none of the buttons are labeled in any way. Therefore, I waned to create a panel with labels on.




Using the command "projection(cut=false)", the 3D drawing of the front panel can be converted to 2D. Then it is possible to export a DXF-file which can be imported in Inkscape. I learned this technique from this blog.


Once imported in Inkscape, I can create some text and stuff on the front panel. I used the same approach as I did on my mixer, and printed the front panel on some piece of colored thick paper.


Before laminating the paper, I cut out the opening for the display with an exacto knife and punched 3mm holes for the LEDs with a drill bit.



I had to extend the buttons with some Sugru to make the hight appropriate for the front panel. Looks a bit strange, but it works surprisingly good.




This is the final unit. You can download the design files on thingiverse if you like, and hack the heck out of it. The OpenSCAD-file is parametrized and it should be fairly easy to alter the design for whatever buttons you might have.


Here goes some additional pictures.

The front panel is secured with the nuts on the five potmeters.


The back plate is secured with the plastic nuts on the audio jacks.

Thursday, January 22, 2015

DIYcrap audio mixer #2

This is part 2 of "building an audio mixer with effects". For part 1, go here.

The mixer is coming along quite nicely. Thanks to the excellent documentation on the Music From Outer Space web site and the professional quality on the PCBs, I had no problem soldering the four boards together.

The DIYcrap audio mixer
The picture above shows how the mixer looks. The different features of the mixer will be explained as we go. First, lets take a look into the assembly of the mixer.

Testing how the jack plugs and the knobs fit the front panel layout
As explained in part 1, I created the layout in Inkscape. I printed out a test on normal paper, just to check if all the knobs and plugs fitted nicely.

Running the paper through the laminator

After a few minor errors had been sorted out, I printed out the overlay on a piece of orange paper (I wanted the mixer to look a bit vintage and a bit seventees), and laminated it. This is the method proposed by MFOS and is by far the most economical approach to making synth front panels.

The panel is glued to the aluminum Bud-box

After the front panel was sorted out, it was time to fit the PCBs.

The PCBs
The PCBs are mounted on the back-plate of the Bud-box. From left to right in the above picture: Power supply, MFOS auto panner, two MFOS Echo FXXX (on top of each other), and MFOS panning mixer.

MFOS auto panner
Two stacked MFOS Echo modules
The MFOS panning mixer
All the MFOS-components are now mounted in the mixer cabinet and works flawlessly. The stuff that remains are, the SKRM FV1 reverb unit, a highpass filter, and a distortion unit. 

Testing the mixer with a function generator and oscilloscope
Thats it for now. The next part will (probably) cover installment of the the SKRM FV-1 module i purchased from Experimental Noize.

Thursday, December 25, 2014

Converting a BK Precision 2831A bench multimeter to 220V supply

I just came across a BK Precision 2831A bench multimeter (for free). I do not know the age or the general reputation of the unit, but it seems to be a rather low-end 3-1/2 digit multimeter. Nevertheless, another multimeter might come in handy.

An old BK Precision 2831A (on top of something else)

The device is supposedly only meant for the US marked and is labeled 120V, so I could not test it right away. First, I thought of buying a 120V/240V transformer, but good quality ones does not come for free.

It is labeled 120V on the back side

Based on the labels on the circuit board (GDM-558D), it seems like this unit is a relabeled GW Instek multimeter of some kind. It is probably ins the same family as the GW Instek GDM-8034 (or the GDM-8135, although it has a circuit board marked GDM-625A). The accuracy of those two devices (DC volt) are 0.5% and 0.1% respectively, whereas the BK is reportedly 0.1%.

The circuit board also has some markings indicating that the transformer has two primary windings that can be coupled in parallel for 120V usage (marked as 114V on the circuit board) or in series for 240V usage (marked as 234V on the circuit board).

Typical configuration for switching between 110V and 220V with two primary windings.

Normally, units with such a transformer has a switch on the back, making it usable for both 120V and 240V mains supply, but this multimeter has no such switch. However, there are some resistors on the board that can be replaced to allow for the higher voltage setting.

Zero-ohm resistors configured for 120V (117V)  mains supply

Zero-ohm resistor configured for 240V (234V) mains supply

All there is to do is to remove the two resistors (and resolder one of them), and voila, the multimeter is ready for european voltages. In addition, the main fuse should be reduced to about 2/3 of its original size.

As indicated on the first image, the multimeter now works on 230V (or 220V/234V/240V or whatever). I cannot report on the quality on the device itself, such as the accuracy in taking measurements, but it seems to be fairly close to my Fluke 8050A so at least it is not damaged or anything. Hurray!



Monday, December 1, 2014

DIYcrap audio mixer #1

Introduction


During the last year I have built four synthesizers: a MFOS Noise Toaster, a x0xb0x, a Shruthi, and a Sonic Potions LXR drum machine. Hence, now I have an urgent need for an audio-mixer, and I have decided to build one, DIYcrap-style.

Modules


The mixer is based on the MFOS Stereo Panning Mixer. This circuit board uses TL071 and TL072 opamps and gives four mono input channels each with panning two effect send loops. In addition there are two stereo inputs, a headphone amplifier and stereo out to drive an external amplifier or recording unit.

I also need some built-in effects. The first effect is the MFOS ECHO FXXX. This is a PT2399-based delay module, and I am going to use two of these. Hence, they can be used in parallel (for awesome stereo effects), in serial (for super-long delays), or individually on two different mono-sources.

The second must-have effect is Reverb. I will use the SKRM-C8-R02 Reverb/Delay from
www.experimentalnoize.com. This unit is based on the Spin Semiconductor FV-1 and comes preprogrammed with a few stereo reverb and delay effects. With some additional circuitry it should fit nicely with the stereo mixer.

The last effect I am going to add is distortion (or fuzz). I have yet to create this module but i might try out the MFOS fuzz module to begin with.  The fourth module is also from MFOS and is a Stereo Auto Panner. Hopefully, this unit will provide some cool effects. Lastly, since delay and reverb does not fit nicely with low frequencies, I am going to add a variable high pass filter for the effect out part of the mixer. I might give this variable 20-200Hz filter a try.

Panel


One of the biggest challenges with the mixer is to create the front panel. Inspired by the latest Soundlab MkII from MFOS I decided to use the BUD-box AC-423. It is a 17x7 inch box in aluminium.
The status now is that I have soldered most of the boards and I have created the first version of the front panel in Inkscape.


First prototype of the layout (some text is missing)

The design is inspired by other MOTM-style synth-panels, like this one.

I also got useful tips about creating front panels in Inkscape here. Schaeffer is a popular choice for manufacturing the front panel. A more DIY-ish solution is to use LazerTran. However, I will probably just laminate an A3 paper and glue it to the AC-423 in the first version.

This project is still work-in-progress, and I will use this blog as my build log and as a place-holder for all the links I collect. 

Sunday, July 27, 2014

Wordclock based on Arduino Yun

Introduction

This year, as every year, I did not have the faintest idea what to give my brother to his birthday, I decided, quite boldly, to build a birthday present with my bare hands. I figured out that everybody needs a clock, and that building a WordClock would be a funny challenge for myself.

The purpose of a WordClock is to present the time of the day using letters instead of numbers. I believe that the idea stems from the ClockTwo from Biegert & Funk (http://www.qlocktwo.com).
There are also other versions available for purchase (for example dougswordclocks.com.) as well as a myriad of DIY-designs. For example, this one, this one and this one, all on Instructables.

My DIY WordClock


















Although the DIY-designs are fine, they are certainly not as sexy as the original ClockTwo, (and neither is mine). My design differs from the other alternatives (at least the ones I have found) in the following ways:

  1. It presents the time in Norwegian
  2. It has the possibility to show minute-precision time using the letters.
  3. The time sets itself automatically using NTP (including daylight savings time).
  4. It has a web-interface, so the user can use his smart-phone to adjust some clock settings.
  5. It has a light sensor so the intensity of the LEDs can be automatically adjusted to the light in the room. (I know, other clocks has this as well)
To accommodate automatic adjustable time, I based the clock on the Arduino Yun, which besides being a standard Arduino with an Atmel AVR, runs Linux on a separate processor and can connect to WiFi and the Internet. The parts needed for this build is:
  • Arduino Yun ($75 at Adafruit)
  • 100 RGB LED-strips ($29.95 for 32 (1m) at Adafruit)
  • A light-sensitive resistor (negligible cost)
  • A resistor to match the above as a voltage divider.
  • A micro USB connector
  • A 2A 5V powersupply
  • A acrylic front plate
  • A frame, or something to hold the electronics and the acrylic front 
As the astute reader will notice, this is not the cheapest of the builds (although cheaper than the ClockTwo). However, thanks to the RGB-led strips it is relatively easy to build, compared to soldering and mounting 100 LEDs, and it also provides the unique ability to address every LED individually, and control their color.

The build


The first I did was to connect the light strip to the Arduino to check that all LEDs worked. All the strip needs is 5V, GND and two pins on the arduino.


The LED-strip connected to the Arduino


After verifying that the strip worked with some code provided from adafruit, I divided the strip in ten sections of ten LEDs, glued them to a 35cm x 35cm plate and soldered them together in a back-and-forth pattern.

The 100 LEDs glued to a plate, showing off with a rainbow pattern.

Since all the letters must be able to light individually, we do not want the light from one letter influence the neighbor letters. Hence some sort of frame must be built around each LED. I created a simple 2x4 design in OpenSCAD and let my 3D-printer do the job. Unfortunately, I only had black PLA, and since white is preferred to increase reflection from the LED, I spray-painted the frames. The result is shown below.


3D-printed frames fixed to the backplate with sugru.

The complete grid layout consists of ten 2x4 frames and five 2x2 frames. Obviously, I could have printed a 10x10 frame to cover the entire clock but that would have required a 3D-printer with approximately 35x35cm build areal.


The light sensor

To be able to fit the light sensor, a custom 2x2 frame was printed. On the top you can see the IKEA-frame which holds everything.

The 100 LEDs now have one little compartment each

With all the small 3D-printed frames glued to the back-plate with Sugru, it was time to figure out  a way to create the front-plate. This was by far the most difficult part of the project.

Front plate made in acrylic

The front plate is a 40x40cm acrylic photo print from http://www.idekor.no/. I made the lettering layout using a monospace font in inkscape, converted it to pdf, and then png, uploaded it to the online photo-service and hoped for the best. Frankly, even if the letters and the spacing between them was excellent, the result was a disaster, since the black was not entirely black. It was more grayish, and partly transparent.

Modifying the acrylic plate with some transparent plastic printouts

Since the sole purpose of the acrylic print was to isolate letters from background, I had to modify the acrylic by adding two layers of transparent plastic printed with the same pattern. Obviously I could have printed a new acrylic plate (maybe using a different online service), but sine I had already spent a small fortune on this one, and I was running out of time (this was a birthday present remember) I had to deal with what I had. To diffuse the light i used a layer of greaseproof paper.

The back of the clock with the nice IKEA painting

In the above picture you can see the back of the clock with 5V power at the bottom (white USB-cable taken from a Kindle), four wires to the LED-strip (top left) and two wires to the light sensor. The wires are connected to a custom Arduino-shield, which also powers the Yun. I used the original IKEA-picture since it was sturdy and perfectly fits the frame.

Old clock and new clock

I wondered for a while on how to fasten the acrylic front plate to the wooden frame. First I planned to drill holes in the acrylic plate and screw it using 75mm M3 bolts. Then, for some reason I read about fractured acrylic and did not dare to drill holes in my precious plate. Hence I decided to glue it in place. Using glue also had the benefit of allowing micro adjustment of the position of the acrylic plate over the 10x10 frame.


Well, the decision to use glue turned out to be fatal. Somehow I forgot that the acrylic plate was semi-transparent even in the black areas, and some of the glue can be shown from the front side of the clock. Typical DIYcrap mistake. Other than that, it was excellent.

How it works

Since this was a birthday present, I wanted an individual touch of the clock. Hence, while the clock boots, it shows the name of the owner of the clock. The letters in the name is used to indicate the progress in booting as well as outputting some status information. Even if the clock will probably boot very seldom (if ever) it is great for debugging purposes, so lets follow the process.


First the clock says that Arduino is working by showing a green "A". You may say it is sort of superfluous, since the LED-strip will not work without the AVR, but thats missing the point (and the fun).


After about a minute, Linux is running, (L is green). We can also see that we got Wireless connection (signal strength 5/7, since L,F,O,R,D is green), and we got an IP-address from a DHCP server (D is green).


Now, we have a connection to the internet (I is green). A connection to the Internet is simply verified by pinging google.com. If this address somehow dies (if google goes bankrupt), the letter "I" turns blue, but the clock will still operate.


Now, the letter "N" shows that we have received the time from a minimum number of four NTP-servers and we therefore believe that the time is set correctly in Linux.


At last, the letter "E" indicates the ambient light in the room as perceived by the light sensor at boot time. Red indicates low light, green indicates medium, while blue (as in the picture) means that there is a lot of (sun)light in the room, and the LEDs are set to maximum intensity for the time being.  (The intensity-adjustment is of course performed continuously as the clock operates, regardless of the amount of light during boot time). 



Using a simple web-interface, the user can select some additional features using his smartphone. A rainbow pattern for example, is always supercool. Since the Yun uses Bonjour and UPnP and all that stuff, the web-page can easily be found on the local WiFi using the arduino.local address.


A standard WordClock can only show the time in five-minute intervals. An additional feature that can be enabled using the web-interface is the ability to show minutes. This is performed by letting the letters K,L,O,K presented a different color. In the above picture, the three letters K,L and O means that we should add three minutes to the time showed. Thus the time is not five minutes to (fem på) "something", but rather two minutes to "something".

The verdict


I am quite satisfied with the build. Obviously, I did not choose the cheapest method, but the combination of the RGB LED strip and the Arduino Yun turned out to be a very fun and rewarding combination. I am certainly going to use the Yun in other projects as well. Had it only been a bit more affordable.

Another downside with the Yun is the limited codespace on the 32U4 microprocessor. With the bridge library, the LED-strip library and all the other stuff I almost hit the ceiling in code space. I even had to omit some super cool features that simply did not fit the 32Kb space on the controller.

Update! Download code