I know it’s been quiet on the blog front. It’s because I’ve been working through some tricky issues with OpenBeacon Mini firmware. A long story, but the gist of it is that a timer subtlety was causing some hard-to-troubleshoot problems causing inconsistent transmit timing for WSPR. I’ve finally overcome that particular family of bugs, and now have the transmit working reliably. As you can see, I’ve put OpenBeacon Mini on the air for the first time and it’s receiving spots. Now that I’ve confirmed that the basic functionality is working, I need to fill out a few more firmware features and then actual beta testing can start, which shouldn’t be very long now.
On another note, I’ve also been doing more PC and PC parts hustling on OfferUp in order to fund an upgrade to my main workstation. I managed to snag a Ryzen 5 1600 for a good price at $159 at Fry’s, since the new Ryzen refresh CPUs were just released. I’ve been using it for a few weeks now and it’s a fantastic processor. It also handles OBS much better than my old i3, so when I do get back into streaming on a more regular basis, my stream quality should be even better yet. From my testing, I should now be able to push out 1080p 60 FPS video to Twitch with no problem now.
Stay tuned, as the news around here should pick up again.
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.
As mentioned in the last Wideband Transmission, I recently viewed a presentation from CppCon 2016 which convinced me that a lot of my preconceived notions about the (lack of) suitability of C++ for use in microcontroller applications might be misplaced.
The standard lore (go ask Wes Hayward W7ZOI his opinion of lore) states that C++ is inefficient in generating the compact binaries that are required when using a device with very limited program storage and RAM space, as you will find with microcontrollers (especially 8-bit controllers). Given that C is a probably fairly categorized as a mid-level language, and that C++ easily falls into the high-level language category with its much larger feature set, it seems natural to believe that there has to be an overhead cost to pay when using C++ over C. Yet, if you take the time to watch that video, you can see that it is possible to use advanced features of C++ and incur little to no overhead in the binary.
Not to say that you can just blithely use C++ without the possibility of incurring an overhead penalty. I’ve tried it and had some horrible results, and chalked my experience up to the old lore being correct as a general case. But that’s obviously not true.
What I intend to do with this series is to look into ways that the features of C++ (mostly C++11 at this point) can be leveraged in the Arduino environment to take advantage of the advanced features of the language (and perhaps even things such as the Standard Template Library) while incurring no or perhaps a very small penalty in flash and RAM usage.
As most of you are probably aware, Arduino is based on C++, and every Arduino library coder has to use at least minimal C++ functionality in order to create a library. However, in the name of abstracting away much complexity, Arduino sketches are written more in C-style than modern C++. That being the default case, there’s no reason we can’t incorporate more C++ coding techniques into our Arduino sketches, as long as doing so serves our purposes of being able to use the higher-level abstractions without paying a penalty.
Before seeing the above presentation, I had already been thinking about this topic because good old Hackaday has been running a seriesofarticlesaboutit. While I may cover some areas previously addressed by said articles, I notice that many (but not all) of the previously mentioned posts don’t delve into making the measurements of how implementing the C++ coding patterns affect code and RAM size (or perhaps execution speed). Data is king, so I intend to provide as much of it as possible so that you can see actual proof of the effects of migrating to C++ coding.
Just so you know where I’m coming from, let me tell you about where I’m at in my journey as a coder. I’ve been writing C for microcontrollers for a fair bit of time now, and I think I’m at least proficient at it, but not an expert by any means. I’ve dabbled in C++, but never really written any major programs in it, so I’m on a learning journey here as well. I’m sure I probably won’t do everything perfectly or the most efficiently, but by holding to what the data tells me, I think I can provide some useful information to all while I learn some new things for myself.
Areas of Investigation
At this point, I don’t have a list of topics for this series that is set in stone. I do have some initial ideas for investigation, but plan to follow other leads as they present themselves and as I learn more about this topic. From my initial notes, here are some potential topics you may see in future posts:
C++ Standard Library and Standard Template Library usage
Using lambda functions/inline functions
Variable declaration: auto vs explicit
Other C++11 features, such as the new for loop syntax that functions as a foreach
Please feel free to comment below if you have some other topics of potential interest.
In order to maintain consistency across the series, I intend to use the same microcontroller platform in all articles. The controller of choice will be my Empyrean Alpha board, which is basically an Arduino Zero minus the debugging circuitry on a form factor that can be plugged into a solderless breadboard, just like the Arduino Nano and related products. The Empyrean Alpha uses an Atmel ATSAMD21G18A microcontroller, which runs with a 48 MHz clock speed and has 256 kB of flash program memory and 32 kB of RAM, which is ample for many types of projects.
Hopefully in the near future, I’ll be selling the Empyrean Alpha and its little brother Beta through Etherkit, so stay tuned for further news on that.
The Arduino environment for ATSAMD microcontrollers uses the arm-none-eabi-gcc toolchain, which has a variety of very nice tools that are available in addition to the compiler. One of those is arm-none-eabi-size, which can give a breakdown of the flash and RAM usage of a sketch simply by feeding it the file name of the ELF file that the compiler generates. For example:
jason@oberon /tmp/arduino_build_994621 $ arm-none-eabi-size -B foreach_test.ino.elf
text data bss dec hex filename
9732256178011768 2df8 foreach_test.ino.elf
jason@oberon /tmp/arduino_build_994621 $ arm-none-eabi-size -B foreach_test.ino.elf
text data bss dec hex filename
9732 256 1780 11768 2df8 foreach_test.ino.elf
From the above, you can see the text section, which indicates size of the program in flash memory, the data section, which is the initialized variable storage in RAM, and the bss section, which is allocated but uninitialized variable storage in RAM. Pretty easy to use and interpret. We’ll talk about this tool a bit more in the first investigation so that we have a good understanding about it.
Most likely, I’ll also be using the Compiler Explorer tool, as was used in the video above. It looks like a very handy way to quickly and roughly demonstrate how code changes affect the assembler output from the compiler.
Now that we have the preliminaries out of the way, I’m ready to start tackling this series. Watch this blog for the first installation, which will be coming soon. My patrons will have early draft access to articles in the series, and will have a chance to chime in there with suggestions to help me with the final article on nt7s.com. See you soon!
It has been awfully quiet on the public front here for sure, but I have been working on quite a bit of things behind the scenes here at Etherkit Galactic HQ. It’s been a challenging year since I last wrote about the personal things going on here, but things have been going reasonable well after a rough half-year immediately following that post. I’m just about ready to attempt to revamp Etherkit, however there are still a few challenging roadblocks to overcome, and I could use a bit of guidance.
The most difficult issue is trying to re-bootstrap the business financially. I’m currently only selling the Si5351A Breakout Board, which obviously isn’t enough to expand a business upon. The possibility of a capital infusion unfortunately broke down, and so the only practical way forward at this point is most likely another crowdfunding campaign.
As mentioned in the opening paragraph, I have been working on various projects, and so I do have some candidates. Many of the projects that are in the works or only even in the planning stages require the use of a microcontroller, and so last year I decided to make my own Arduino-compatible microcontroller board family which I can then use as the heart of many of these products. I’ve taken a real liking to the Arduino Zero because of its speed and features, but the cost is fairly high and the standard Arduino form factor isn’t great for many purposes. Therefore, I have decided to make a new standalone board derived from the Zero which I call Empyrean, and you can see in the photo at the top of the post. It comes in two flavors: Alpha and Beta. The Alpha is based on the Atmel ATSAMD21G18A microcontroller, same as the Arduino Zero. The Beta uses a controller (ATSAMD21G16B) with a bit less flash and RAM than the Zero (but still more than an Arduino Uno), but is also priced similarly to the ATmega328 line of microcontrollers. Both come on a small board similar in size to the Nano and has nearly all of the same circuitry of the Arduino Zero except for the EDBG support.
It is true that there are a flood of Arduino clones out there and this makes entering the market with another one somewhat crazy. My value proposition for Empyrean is based on the confluence of breadboard-friendly form factor along with a wallet-friendly price. My target price point is around $15 for Alpha and $10 for Beta. While that is a fair bit more than your typical eBay Nano clone, Empyrean would also be quite a bit more powerful than a Nano, in both clock speed and available memory. So my question to you, dear reader, is whether you would be interested enough in this product to back a crowdfunding campaign in order to have it made? I do plan to make a serious push on a radio soon, but it would be nice to ramp up the business before that, while also solidifying the microcontroller platform that will be used in future products. Let me know what you think in the comments, or send me an email.
In the mean time, I thought I’d let you know that I’m working on a Rev D board spin of the Si5351A Breakout Board. You can see a prototype in beautiful OSHPark purple above. The most significant changes in this revision will be to change the coupling of the reference oscillator to the Si5351 XA input pin to meet datasheet specs and to panelize the board in preparation for future pick-and-place operations (they are currently hand-assembled!).
Perhaps even more interesting is that I also hope to be able to soon offer a frequency calibration report with every board sold. Thanks to LA3PNA, I am now in possession of a decent 10 MHz GPSDO to use as a lab reference, which will allow me to measure the frequency correction value accurately enough for hobbyist usage. I now have a small printer on hand, and so now what I need to do is add new code to my board test script to measure the correction value and print it for inclusion with each board sold. Stay tuned for notification when I’m ready to go live with this; hopefully soon.
Let me reiterate: I’d love to hear your thoughts about the above proposals. I’m interested in serving the needs of my customers. Thank you!