Saturday, May 30, 2015

Softrock RXTX completed

After finishing up the receiver part of my Softrock Ensemble RXTX SDR transceiver with great success, I got really motivated to get the transmitter going. The last weeks I have followed AB4UG's progress building his own RXTX with great interest, and I got even more motivated to finish my own kit when I saw that he got the last component soldered on his RXTX.

Soldering the last component on the RXTX

Building the TX part was fairly easy after having built the RX part. The first thing after melting the last piece of solder on the board was to make a 50 ohm dummy load using a few resistors, and then to measure the output power with my scope. After that, I balanced the I/Q signals by playing with the TX image rejection settings in WSPR and by watching the transmitted signal on a RTL-SDR receiver. The RTL-SDR operated in a software direct sampling mode to make it work on the 20m band. This setup is not the best tool for this calibration task, but I think I came pretty close in my effort. I might check it up more thoroughly use a spectrum analyzer later.

RXTX is running WSPR

WSPR is an excellent choice for testing out a freshly built transceiver since it gives immediate feedback through Internet if anyone out there receives my signals. After a bit of fiddling, I got the RX mode running directly on I/Q in WSPR, and prayed to the radio gods that the TX would work as well. After verifying that the transmitter did "something" when connected to WSPR (it went hot), I left the softrock running for 24h with about 1W output. Then I just hoped that the black suited government frequency authorities would not kick down my door to revoke my amateur licence due to RF harmonics or for causing QRM on the image frequency.

Both RX and TX is now working in I/Q mode
Luckily the frequency authorities have not been kicking down my door (yet). On the contrary, during one night of operation I have gotten WSPR reports that my signals have reached most of Europe and even across the pond to America!

I can enjoy my working transceiver from my iPhone
I am truly amazed that my 1W transmitter (which I bravely soldered myself) can reach more than 7000 km. Notice that my "antenna" is just an indoor wire dipole (at about 5m length).

If you are listening on 20m and observe that my Softrock emits energy in the wrong parts of the frequency spectrum, please be kind to me. Please. I am a fresh amateur with very limited RF self esteem.

Summary of the build experience

I followed the excellent build guide of WB5RVZ step by step and it was really helpful. The most challenging part of the build was in fact soldering the through hole components on the awfully small soldering pads on the PCB. The SMT parts were mostly SOICs and 1205, which were easy. The Si570 (QFN) were the most challenging. I measured every resistor before soldering and took great care not to make any mistakes along the way. All in all, it was really an enjoyable build and the entire process building the transceiver took about 10-12 hours in total. The only mistake I did was to solder an opamp in the wrong orientation, but that was easy to fix.

Future work

The next step is to test out other WSJT digital modes such as JT65 and JT9 and to make some real QSOs. The goal is to make the Softrock operate stand alone on my Raspberry Pi2. 

Friday, May 22, 2015

Building a SoftRock Ensemble RXTX SDR


The last couple of months I have been listening a lot to the soldersmoke podcast. In case you do not know, it is two guys, Bill N2CQR and Pete N6QW babbling about building homebrew radios. I am very happy I found this podcast. It is highly inspiring, and by listening to the two experienced homebrewers I immediately wanted to melt some solder and build radios myself. Hence, I had to get myself a licence (got it last week: LB0MG) and start soldering radios.

As much as  I would like to be in the possession of a totally homebrew fundamentalist discrete component ham radio station (like Bill N2CQR), I concluded that I rather should start out with a kit. (I guess some homebrew fundamentalists threw up a bit now since I mentioned the word "kit").

Building the Softrock RXTX

Anyway, choosing a kit I might as well do it the modern way and build a SDR. I initially considered the PeaBerry SDR, but ended up with the Softrock Ensemble RXTX SDR Transceiver kit since I have the required sound card capabilities laying around after my previous synth projects.

The kit is nicely packaged and contains about 250 parts. Some through hole and some SMT.
I am pretty sure I will not do much contesting in any perceivable future so I choose to build the Softrock for the 17m, 20m, and 30m bands (two contest free bands).

There is an excellent build manual on the pages of WB5RVZ.  I addition I have had great use of some of the videos from W2AEW to understand the concepts of SDRs and to improve my toroid winding technique. He has some of the best engineering videos on the entire Youtube.


So far I have built the entire RX part of the kit and it has come along quite nicely. The SMT parts are rather easy to solder. Surprisingly enough, the through hole parts are a bit more challenging since there are very little space around the components, and the pads are really small and not gold plated. A lot of flux really helps.

The only mistake I did was that i lost the LT6231 SMT RX opamp (probably in the vacuum cleaner). Straight away I ordered two new chips from DigiKey and when they arrived at my door merely 36 hours later, I was so eager to get the RX working, that I accidentally soldered the small SMT chip in the wrong orientation. Hence I had to use the second one (glad I ordered two of them). But it worked! I got a small Image rejection problem, but traced it down to a setting in the sound card I used (Behringer UCA-202).

In the above picture you can notice the excellent indoor dipole "antenna" connected to the Softrock. The length of the dipole is about 5m, so It is not the best choice for receiving either of the bands. I guess some you antenna fundamentalists threw up watching this picture, but hey, the antenna sort of works. 

To please the homebrew fundamentalists out there, I used my 22 year old homebrew LM317 bench power supply to provide clean and pure 12V DC.

I connected the receiver to HDSDR, grabbing the I/Q signals. I have received SSB, RTTY, WSPR and JT65 on 17, 20, 30 and 40m bands. In the above picture you can see some digital signals popping in at 20m. I tried to use WSPR software directly on the I/Q signals from the radio but with little success. I had to output USB audio from HDSDR via a second sound card and then into WSPR.

From my perspective the RX test was a great success. Even with the indoor "antenna" I received WSPR on 30m from 60 different transmitters over a 24h period, and even across the pond. You might see LB0MG in the above map: Yeah, that's my Softrock sniffing RF from the ether, placed in an attic in Norway. 

I even got reports coming in from K1JT (yes, the Nobel laureate, Joe Taylor, that created WSPR) himself and got a bit starstruck. It is funny to think about the fact that he was transmitting his modest 5 Watts from New Jersey, and that my home soldered Softrock received his RF vibrations all 6000km away, even with a crappy piece of wire as antenna. The radio gods are undoubtedly on my side on this one.  

Now, I am eager to generate some RF myself and will get on finishing the TX part.

Thursday, May 14, 2015

OpenPanTilt electronics

It has been a while since I made the OpenPanTilt prototype. It is now available on Thingiverse:655790 and I am quite surprised about the feedback and attention it has gotten. Billions of people have now downloaded the design files (at least 430) and millions have asked me about the electronics (at least three individuals). It is about time that I provide some details. (I also plan to publish a few more time lapse videos to show this magnificent piece of equipment in action.)

The electronics consist of an Atmel ATMega328P-PU a.k.a barebones Arduino. The AVR is run on 16MHz and driven by 5V from a 7805 regulator. It can be bootloaded using something like this. Two optocouplers drives the camera (shutter and focus). I guess any optocoupler will do, but I used 4N35. Besides from a reset switch and some filtering caps here and there, thats it.

The stepper motors are driven by easydriver stepper motor drivers. I made room for three of these on the board, so it can drive a camera dolly in addition to pan and tilt.

The schematics was created in Kicad. This was my first project in Kicad, and since I was impatient, I used the autorouter in Kicad according to the instructions at Wayne and Layne.  I think the autorouter performed well for this small project.

When the board seemed fine, I created the gerber files using this guide at Toymaker Television. Notice the "mirror X-axis" when creating the drill file. Finally, I submitted the gerbers to OSH-park. The project can be found at OSH-park if you are interested.

The PCBs have excellent quality and the soldering goes like a blast.

Two Easydriver stepper motor drivers are fitted on the PCB (room for one more).

The user interface is simply a TM1638-based 8x7segment display with control buttons. It was ordered from China and can be found everywhere on the interweb. I soldered some wires going from the TM1638 PCB to my own panel mounted control buttons.

In the above picture you can see the extremely simple user interface. It works as follows:
  1. Use the buttons to pan and tilt the head to the desired start position.
  2. Press P1 (programs the start position).
  3. Use the buttons to pan and tilt the head to the desired end position.
  4. Press P2 (programs the end position).
  5. Press Start. The Pan/Tilt head will now return to the start position and will start shooting.
You can optionally press the Menu button before programming to set the interval between each step and each picture.
This is extremely easy, but it works. The display shows the number of pictures shoot and the current pan/tilt position. I choose to use a 7-segment display just because I like the old school looks of it. A 20x04 LCD with a rotary encoder would, of course, be more sensible.  

The box has connectors for 12V DC, camera (shutter and focus), Pan stepper motor, Tilt stepper motor and an auxiliary stepper motor.

Some mistakes 

I did some mistakes while building the control unit. If you want to build something similar, you should try to avoid these.

First of all, the 12V power header for the stepper drivers was was reversed on my PCB layout, meaning that the driver did not initially get any power.

Hence, I had to modify the mounting of the easydrivers a bit (notice the white wire on the above picture). No big deal, but it means that you should not order these boards from OSH-park, even if the board was selected amongst the staff picks of the week. :-)

A second error on the board is that there is no protection whatsoever on the 12V DC. No diode, no polyfuse, no fuse. Nothing. At least a diode should be placed in there, somewhere.

A third thing that I was not aware of is that the easydriver board must be connected to a load. Without a load (i.e., a stepper motor), the driver IC will burn up. Totally stupid, but I burned up two boards this way, and had to wait forever to get some new boards from Shenzhen, China. Thankfully, they are easy to replace.


Ok. Thats it. I learned a lot while building OpenPanTilt. And, best of it all, it works. If you want to build something similar, or have comments, please let me know. I know Josh Sheldon was inspired by OpenPanTilt and has developed some of the ideas further, and I must say, with impressive results.

Wednesday, May 13, 2015

Motion sensor to detect sneaking toddler

Once the kids are asleep at night, you can finally relax. Aahh. Maybe you want to stress down with a violent splatter movie with the volume at 11? In this situation you definitely do not want the kids to sneak around in the house behind you and watch the movie in secrecy. In that case you will have a lot of explanation to do. (Dad? What happened to the man's brain?). Or maybe you and your spouse are in your bedroom making new kids..? You definitely do not want the existing kids to interrupt such a beautiful moment. And difficult questions could possibly be asked.

The trick is to use a motion sensor outside the toddlers bedroom and a portable doorbell with visual and audible alarm. All possible crisis is henceforth avoided.

I bought one of these Nexa doorbells, and a...

... Nexa IR detector.

The problem with the doorbell is that is also chimes when someone are walking around in the house during daytime. It also chimes to loud for the intended purpose. Therefore, I added a volume control, that also serves the purpose as a on/off switch.

The doorbell is a simple design built around a 433MHz receiver

A 100k audio pot for the junk box does the job. I also tried with some resistors to limit the 100k pot with mixed success. It does not matter much for this purpose.

I drilled a hole in the front panel, and ...

Voila. A doorbell with a nice blue LED and fully adjustable volume with a Moog style knob. I glued some eyes to the doorbell to make it seem a bit more friendly.