I’ve got an early Christmas present for you all! In conjunction with today’s final release of WSJT-X 2.0.0 (n.b. I’m not affiliated with that project in any way), I’m pleased to announce that I have now added the brand new 79-symbol FT8 protocol to my JTEncode Arduino library. The new version of the library is currently in testing and not available for upgrade in the Arduino Library Manager yet, so if you’d like to try it out, please download it from the development branch here and install it manually. After I’m confident that all is working well, I will release it to the main branch.
After having a lot of people asking me about it, last week I finally decided to take a crack at reverse engineering the FT8 protocol from the WSJT-X source code. I figured now was a good time since I’m in the final push to get OpenBeacon Mini out to production and a new version of the protocol was coming with the new v2.0.0 of WSJT-X. I had been awfully hesitant to tackle this in the past since all of the modulation algorithms are written in Fortran, a language that I do not know. There are no detailed technical descriptions of the protocol in plain English that I could find, so I would have to depend on reverse engineering the protocol solely from the code.
Armed with a F77 textbook I picked up at Goodwill and lots of Googling, I managed to make a big push over the last 5 days in order to give myself a Fortran crash course and learn how the algorithm works. With a ton of print debugging and by comparing the output of my code to the output of the official ft8code program from the WSJT-X package, I was able to nail it down.
If you are comfortable being on the leading edge of such things, please do give my library a try now and help me test it. It’s nice to see that the JTEncode library has been used in various ham projects out there, and at least once commercial product (other than the upcoming OpenBeacon Mini). I’m sure that the inclusion of FT8 will make it much more useful.
It’s time for a brief update on how things are going with OpenBeacon Mini, the successor to the OpenBeacon MEPT that’s been a long time in the making. For those who are unfamiliar with the new project, allow me to give a very brief overview of its capabilities. The OpenBeacon Mini is an automated transmitter for amateur radio operators that allows for automated transmission of messages using propagation study modes such as WSPR and QRSS, along with many of the other JT modes and CW as well. The carrier is generated by a Si5351A clock generator IC which is fed with a TCXO reference clock for frequency stability. Low-pass filter plug-in band modules allow operation on any single band from 630 meters to 2 meters. The OpenBeacon Mini detects which band module is inserted and sets the frequency accordingly, making band changes as easy was swapping out a plug-in module. The power and a data connection is provided from a USB micro B connection to any PC. Accurate time synchronization is accomplished through this connection, as long as the PC has time set through NTP. The user interface is a 128 x 32 px OLED display and 7 pushbuttons. As always with Etherkit products, all firmware, hardware design files, and and software is open source. Extra pins from the microcontroller and extra clock ports from the Si5351 are broken out for use in experimentation and expansion.
Something like this project has been on the back burner for a long time, and is finally now able to see the light. I intend to launch this as a crowdfunded product at the same time as my Empyrean microcontroller, which is at the heart of the OpenBeacon Mini. The Empyrean is an Arduino Zero derivative in the form factor of small DIP module perfect for breadboarding. I’ll have more about this initiative to post on the blog in the near future.
My first beta tester, LA3PNA, recently received his OpenBeacon Mini and had a chance to put it on a NVIS antenna for a few hours on 60 and 20 meters. As you can see from below, he received plentiful WSPR spots in that short amount of on-the-air testing.
I have another early beta tester working on getting his OpenBeacon Mini on the air soon as well. I am looking at getting one more early beta tester going with this PCB spin, just so that I can be very sure that the next PCB spin will iron out all of the kinks. If you are familiar with MEPTs, using the Arduino environment to compile and load firmware, and don’t mind a little bit of firmware roughness, I’d love to have you on board. Send me an email to milldrum at gmail dot com to let me know you’re interested.
This weekend, I plan to get OpenBeacon Mini going on 6 meters in order to see how it performs there. It should be a perfect time, since it’s also the weekend for the ARRL VHF Contest. Keep an eye on my Twitter account and this blog for further updates on this project.
Guess what? I realized that I had a bunch of microcontroller dev boards and such that I was probably never going to use, so I figured it would be time to put them up for sale, along with some other miscellaneous electronics stuff as well.
Since I’m waiting for circuit boards for OpenBeacon Mini to arrive, I want to keep the waiting time as productive as possible, so I’ve been working on the firmware. Specifically, one of my recent goals was to factor all of the modulation code out of the spaghetti mess that is the current state of the OpenBeacon 2 firmware (which is my starting point for OpenBeacon Mini).
In that vein, today I managed to finish up work on release v1.0.0 of the Etherkit Morse Arduino library. The majority of the coding work was done during my last few Twitch livestreams, so other than tweaking and cleaning up the code, most of the work today consisted of creating documentation and getting the repository in shape to be a proper Arduino library.
The way that this library functions is quite simple. Since timing in Morse code sending is critical, the end user of the library is required to provide a function that calls the library’s update method every one millisecond. This type of interface was chosen so that the library can be platform agnostic (since Arduinos come with different microcontrollers which have totally different timer functions). An transmit output pin and speed in words per minute is specified when the class in instantiated, and then all you have to do is call the class’s send method to send Morse code on the digital output pin. Alternately, you can have your sketch poll the class’s tx variable and act on it accordingly. Pretty easy stuff.
I’ve put in a request for the library to be included in the official Arduino Library Manager, so if you want to give it a try, wait a day or so for it to be listed there. If you really can’t wait, there are instructions in the README about how to manually install it. Hopefully you find it useful, and as always, please file your bug reports and suggestions for improvements as an issue on GitHub. Thanks!
If you watched my previous Twitch stream, you may have seen that I completed the layout of the first PCB spin of OpenBeacon Mini. Today I ordered the PCBs from DirtyPCBs, along with boards for my low-pass filter module, and more Empyrean boards in anticipation of wider beta testing soon.
I wanted to get these boards to the fab before we started to run into the wall of Chinese New Year (which I seem to do nearly every year). I think I’ve ordered them plenty early, and even paid a bit extra for express shipping, so hopefully they’ll be in-hand around the beginning of February.
In the mean time, I’ll be working on some more coding for the OpenBeacon Mini on my Twitch stream and some other ancillary stuff while I’m waiting for the boards to arrive. Stay tuned for further news on this blog.
I managed to finish the layout of the OpenBeacon Mini prototype PCB in KiCad this evening while livestreaming on Twitch. A 3D rendering from KiCad is above. It looks about how I sketched it out and wasn’t too nasty to route, so I got that going for me. So I’ll get on order off to the PCB fab soon. I’d like to get some PCBs completed before Chinese New Year, so I can’t delay very long.
While I’m waiting for my PCBs to be manufactured, there’s still plenty to do. Twitch streaming is kind of nerve-wracking for me yet kind of fun, so I plan to do more. I have a little more gear on the way that will allow me to also Twitch stream from my workbench, so that you can spy over my shoulder there as well. I even have a USB webcam for my microscope so I’ll be able to connect that to Twitch for your viewing pleasure. Stop by sometime on the livestream and chat me up.
I’m happy to report that I managed to pull off my first Twitch stream today, and even got a handful of viewers. There were some initial problems, as I was trying to stream at 1080p, but my wifi connection from my office just couldn’t give enough bandwidth for that to work. After restarting with the stream set to 720p, people were actually able to see my stream. Today’s work was on OpenBeacon Mini. I assigned footprints to the netlist and made a first pass layout of the PCB. I do intend to stream again soon, perhaps even tomorrow. Hopefully I’ll be able to finish the PCB layout on the next session.
Per my last blog post, I’ve completely deleted my Patreon account. Those days are over and are not coming back. I’m still not sure what will replace it, or if anything will. It is already difficult for me to ask for money in return for mostly intangible benefits. Losing the Patreon monthly income will hurt a bit, as that was the funds I was using to pay for OpenBeacon Mini (and other project) development. I only sell a modest amount of the Si5351A Breakout Boards via Etherkit; basically just enough to pay for keeping the lights on there for now.
So allow me to start using this blog again for what I was doing on Patreon, sans the locked content.
OpenBeacon Mini has a schematic finished and I’m just about ready to lay out the PCB. Empyrean (my Arduino Zero derivative) testing is going to be delayed a bit while I figure out how to fund the beta batch. Those two projects are going to be my main focus and I hope to be going into release with both of them by Q1 2018. Further down the line, I don’t want to speculate too much, but I’ll probably tidy up and finish some half-finished smaller boards that I want to add to my Etherkit lineup in order to fill out the catalog with some more RF products.
I’ll work on ramping up the blogging here, using my own site much as I was using Patreon: to post smaller updates about project progress. I always felt the need to make more substantial posts here, which often deterred me from writing. I believe that was a mistake. Expect to see more content in line with microblogging here in the future. Thanks for hanging in there.
If you’ve been reading my blog for any amount of time, you’ve probably observed that I’m a big fan of all things open source, especially on the hardware side of things. One area where OSHW seems to be lagging a bit is in the test & measurement department, so it was a very pleasant surprise for me to stumble upon a fairly new channel on YouTube about a month ago.
As you can see from the first video, the presenter (sorry, I couldn’t find the name of the bloke who makes these videos) gives an overview of the cheap logic analyzers on the market that can be loaded with open source firmware and then gives a very detailed demonstration on how to use the devices with the nifty open source Sigrok T&M suite (especially the PulseView GUI tool) and how to use a Linux environment and scripting to take measurements.
If you have any interest in this space, this is definitely a channel to which you should subscribe. There is also a show notes site that has links and other resources for the videos.
Using C++ in Arduino
In another case of me stumbling upon something which takes me down a rabbit hole, last week I was watching coding videos on YouTube when this one was recommended in the comments of another:
It’s quite a long video, but if you have any interest in coding and are an old fart who grew up with 8-bit personal computers (or are at least a fan of retrocomputing), then the time will pass quickly on this one. It sounds crazy, but the presenter (Jason Turner) of this talk was able to make a game for the Commodore 64 in modern C++! The way he did it was to create a tool to convert from the 80386 flavor of x86 assembler to 6502 assembler (well really 6510 in this case), which apparently is more feasible than you may think. His development environment is an online tool called Compiler Explorer, which for some reason I only learned about with this video. It automagically spits out assembler from C++ compiled from a variety of different compilers. In this case, the Turner created a custom local version of this tool to do the 6502 conversion.
I was gobsmacked at multiple times in this video. Many of the newest C++ features (from the C++17 standard) were used. With some careful coding, Turner was able to produce code with literally no overhead from all of the C++ features. The compiler was able to optimize many lines of C++ down to a handful of assembler op codes. Just watch it, you’ll be amazed as well.
This video, in conjunction with the series of posts that Hackaday has been running about using C++11 in Arduino, has convinced me that it would worth it to investigate the use of C++ in the Arduino coding environment. Arduino library coders already have to use a base level of C++ when they write for the ecosystem, but most people who write sketches do it in vanilla C-style (well, the bastardized Arduino version of it anyway). After seeing that talk, I had a lot of preconceptions of C++ overhead blown away. The ability to use the modern features of C++11 sound tempting indeed, so I plan to do some investigations into the feasibility of incorporating more C++ patterns into Arduino sketches, and I’ll be posting my findings here. Stay tuned.
KiCad PCB Rendering Tool
I have a habit of skimming my RSS reader (yes, I’m one of those old fogies who still uses one) in the morning while drinking my coffee, opening tabs of interesting things to examine in further detail later, while simply reviewing the rest of the new posts. Sometimes that means it takes me a bit to get back around to something intriguing among my many browser tabs.
Such is the case with this article from Hackaday. It’s just a short blurb about a new open source Python tool for making 2D renderings of KiCad boards. The attached demonstration image certainly looked nice. When I finally got around to downloading the code from GitHub and trying it out on one of my designs, I was pleasantly surprised. The script made a very sharp SVG rendering of my board, but unfortunately, there are only a handful of components in the PcbDraw-Lib library, which meant that most of my stuff didn’t get rendered.
Since I’ve been looking for a way to make nice illustrations of my PCBs for documentation and promotional purposes, I decided that I’d invest some time in adding components to the library, since I think the project has a lot of promise. After about half a day of muddling through making component drawings in Inkscape by studying datasheet engineering drawings, I was able to output a complete render of my Empyrean board, which you can see above. I’m quite happy with the result.
I’ve got a pull request in for the components that I’ve created so far, and as I continue to use the tool and fill out more of the library, I will continue to submit them upstream. While it’s still pretty rough around the edges, this project gets a strong recommend from me.