Posts

Website roadmap

As an embedded engineer, I sometimes wish there were certain resources available at hand, instead of relying on poor search results or obtuse documentation. Digging through datasheets and specifications can be extremely time consuming, and even repetitive because I can’t remember how so many devices work. The internet is getting worse, so search results are getting worse. And more websites are SEO so the same old tricks will no longer bring the cream to the top of the bucket. Until efforts such as LLM search / summarize services, and/or Google goes the way of the dinosaur due to disruption from competitors, a simple solution is for humans to help themselves in a walled garden. I like walled gardens, at work I tend to want to protect my tools, equipment, and desk space because then I know where to find what I need to solve problems. And then I don’t have to waste time searching or learning for things which can be at hand. So I think I need to setup a discourse for embedded engineers at these co-ordinates. Device support itself should be limited and curated, I think, based on the huge success of RPI and Arduino ecosystems. In the end it’s all about usability and time to market, aka short development cycles.

Another issue is the verification space of embedded engineering, which is arguably the more important half of development. Until something is verified, don’t trust that it works. And unless verification is run regularly to gain regression, don’t trust changes! To put it bluntly, FPGA tools suck. I’ve used several different vendors and they are all kludge level clones. It would be so much better to have a build system I can understand. This lends itself naturally to the walled garden. A set of devices with forum support, good tools, quick answers to easy questions, and thoughtful verification hooks. So many teams must be repeating the same stuff over and over, and I would doom myself to repeat the same stuff over and over… unless I can take ownership of the problem myself and carve out a corner of sanity from the sea of errata and recipe based designs.

I don’t want to see embedded engineering go the same way as software, which I think has gotten worse at everything by trying to do everything and be everything. Just look at operating systems, the web stack, browsers… at the root is unfettered, unregulated, predatory corporations that resemble cancer more than anything else.. but that’s a separate conversation. /rant

Serial Board to Board Data Transfer

Distributed systems require robust node to node data transfer. FPGA’s are particularly suited for this work since they support high speed I/O. However, scope creep on the role of the FPGA in the system can result in extensive maintenance burdens for a team with regular turnover. In general, there are different kinds of firmware developers and the VHDL/verilog type seem to be more difficult to obtain… although the majority of the challenge is simply finding strong willpower and initiative to solve unfamiliar problems. Problems you already know how to solve are boring!

Anyway, a buffer or line driver to interface the logic to the physical world is desirable. For example, microchip offers the SY58600 and similar IC’s.

Credit Digikey
Credit Microchip

You got it, just a buffer logically speaking and therefore to a firmware person it is a non entity. Totally transparent. To a hardware person, the regular design tradeoffs apply. Switching characteristics, size, power consumption, cost etc. The cost of this thing is incredible, so maybe there’s a lesser variant if your switching speeds are lower. Up to 7 GHz is a lot.

So what logic might we choose to hook up and drive / receive signals? An interesting choice is the Titanium Ti35 from Efinix. At 5.5mm squared, a small and capable FPGA can provide all the serialization and deserialization, and synchronous logic needs required for most systems. Once signals are onboard, something like SPI would be fine to get data into a C environment. If real time is critical, RTOS and some synchronization help from the FPGA may be in order. But there is ample room for solutions in this FPGA, and the density appears superior from a brief comparison.

Credit Efinix

One problem is that there is no dev kit for this device readily available at the time of writing, and also nothing on shelves so far as I can see on Octopart / Digikey. These low end FPGA’s seem very competitive in cost and availability and I hope to see more interesting projects make use of them. It seems there is integrated flash memory to hold the bitstream as well! Save your board space on the CFG EEPROM, amazing.

At only 100 balls, the schematic and layout work should be in reach for hobbyists. Cost is currently unknown.

Maybe as a personal project I could create a dev kit for such applications. It would be a great learning experience. Combine with a convenient wireless friend like the STM32WB55RG and you could have a great platform for wireless bootloading, debugging etc. I’m sure interfacing between them at reasonably high speeds is achievable, although I don’t see dedicated SPI stuff in the FPGA, apart from the CFG pins. Maybe those can be repurposed on the fly, or the MUX to flash vs CRAM is in FPGA logic in the controller already.

Edit: There are buffers / repeaters with equalization. These kinds of IC’s are often categorized strangely. The electrical signal is one thing, and the marketing and application notes for the IC is another. For example, over at Digikey one can find PECL interfaces in the “Signal Buffers, Repeaters, Splitters” category or the “Drivers, Receivers, Transceivers” category. At least they do all fall correctly under “ICs -> Interface”. But within this category, I’ve found rather similar ICs in three different categories. It makes the parametric search tricky.

Zoomable UI for navigating large systems

I have worked on a very large system integrated from many parts of late, namely towed array sonar. Part of the challenge of working on a large, complex system is the lead time of individuals who will digest and synthesize all the information required to develop a working mental image of the system.

To mitigate this, I think there is potential in the concept of zoomable user interface, or ZUI. In a ZUI, details are rendered the further you zoom in. The fascinating program treesheets implements this to an extent:

Go try it out: https://strlen.com/treesheets/

This is a great program. The ability to invert a hierarchy seems particularly clever. However, the learning curve is steep and entering a state of flow, efficiently organizing your thoughts in this sandbox takes a certain something.

Another example is here: https://josephernest.github.io/bigpicture.js/index.html

This example provides more clarity on why a ZUI is useful. Because a user inspecting the high level is shielded from detail, but can traverse a structure. This is the mode of a new manager or director approaching a complex product. They don’t need -all- the details, in fact many discussions end up taking longer than they need to because us bottom level engineers have something to prove and needlessly chatter about the complexities of development.

Again, try it out so you can see what I mean.

So, a ZUI is conceptually a human to information interface that can help the human navigate complexity by organizing detail hierarchically. If you are a niche developer, you would live in one small corner and live and breathe the finer details, perhaps never really grasping the function of the system as a whole. That’s okay too, in fact most complex systems should nominally remove the need for someone to understand the whole thing through strict partitioning and interface design.

Take it to the next level, and perhaps one could have a ZUI in VR and swipe around a design like Tony Stark.

Embedded DMA controllers

Moving memory around is often more important than instruction execution speed. It can also be more difficult. This is extremely true in distributed embedded systems, where a number of nodes make up a system with some objective. The problem becomes even more interesting if the arrival and departure time of said memory is constrained in time. LL has a fascinating paper concerning the management of clocks and the ordering of events.

A recently posted article on Hacker News discusses the DMA controllers available on the RP2040. Some STM32 devices also feature DMA controllers. The speed and usability of these cores, and the speed of the memory can be important to the system design.

These are an important feature to know about and make use of if real-time operation of your main processor cores can impact the greater system.

The presence of the PIO controllers on the RP2040 is another powerful addition. These features bring embedded microprocessors closer to their FPGA counterparts.

Development Efficiency and tools

Today I had some space to breathe and used some resource to look at systemic improvement, rather than just purely iterating on dev cycles.

Recall the existence of Conda, which I had slim to no experience with but got exposure to during my MASc. https://docs.conda.io/en/latest/

It appears to have grown in scope and is a great tool to have in the box.

Add to this windows PowerToys, a productivity suite that has window snapping and tile presets. This can hopefully allow me to launch into a dual monitor workflow in seconds, and use the same exact window layout all the time. Granted recently I have not had the privilege of a good monitor setup, but in the past it was very effective. Over time my domains have increased and now I probably need to support several different battlestation configs

I got VSCode to evaluate VHDL plugin. Maybe its better than notepad++?

I will take this chance to record some of my thoughts regarding the exceptional home IC fab series from http://sam.zeloof.xyz/

This is the coolest home project ever… so add it to the list. Regular tube microscopes use a 10x eyepiece and the zoomiest standard objective lens is 40x.

Wire bonding is also interesting and need not necessarily use an old wedge bonder from the 70s. Linear rails, heating beds, and ultrasonic transducers are all possible to DIY… a replacement wedge bond needle could also likely be procured without trouble.

High speed signaling on MCU’s

Achieving Gbps data rate using low cost, low power micros can be challenging. Typical core clock speeds are in the range of 100 MHz and usually only a few pins have high speed peripherals behind them. Add other requirements such as wire length, type of signaling like differential etc… and eventually the usual bag of tricks doesn’t come up with anything. RS-485 can’t switch fast enough, etc. GPIO pins are very slow when they use ISR. Achieving 10 MHz signaling can be difficult enough.
One way through this is to use FPGA’s, since they can generally handle I/O as fast as the oscillator. SERDES transceivers, LVDS I/O’s and other special pins and IP cores abound. I3C looks promising. However it would be nice to just use a micro and a peripheral.
An interesting strategy arises when you look at the RP2040 and how it has programmable I/O, which is a scheme that allows higher speed GPIO usage. Read more here or Google for lots more blogs.
https://blues.io/blog/raspberry-pi-pico-pio/
Consider also the old IP from National Semiconductor, now under TI.
https://www.ti.com/lit/ds/symlink/ds90ub914a-q1.pdf?HQS=dis-dk-null-digikeymode-dsf-pf-null-wwe&ts=1654106313718&ref_url=https%253A%252F%252Fwww.ti.com%252Fgeneral%252Fdocs%252Fsuppproductinfo.tsp%253FdistId%253D10%2526gotoUrl%253Dhttps%253A%252F%252Fwww.ti.com%252Flit%252Fgpn%252Fds90ub914a-q1
FPD link III it is called, and the silicon looks great. Maybe there is a use case where the RP2040, at only 133 MHz, can actually support a 75 MHz peripheral, 24 of 30 GPIO pins are used, and achieve a cool 1.4 Gbps. That would be alright!

Recycling 18650 Lithium cells

I tore down another 21 laptop batteries, so I have about 200 cells now. If they each could deliver 1000 mAh, I guesstimated there’s enough energy to:
Boil 1L of water.
Run a fridge for 1/5 of a day.
Cook a whole chicken.
Keep a cell phone charged for 60 hours.

Lithium ion 18650 cells usually have more than 1000 mAh capacity. If I had 1000 batteries things start to get serious, because I could entertain the idea of running some appliances entirely from solar or wind energy. The key with batteries is to avoid deep discharge cycles.

This project is more for fun and learning rather than money. If it broke even I would consider it a success. But, maybe if my setup lasts long enough it could save some money. I’m only $80 deep so far. With what we pay for electricity in this province, and how it’s increasing every year, maybe this is the right path for me.

At this stage I need to work on testing the batteries and building charge and discharge circuits. I plan to design and build everything myself to better my skills as an electrical engineer.

CubeSat patch antenna

Can you spot the difference? I had made several mistakes measuring 0.3 up to 1mm. These antennas were made on a precision mill able to place a 0.254mm bit down to the 0.0254mm. Needless to say my mistakes were way outside of tolerance… Thankfully our technicians are forgiving and kind!

This patch antenna works at 3.4 GHz and uses sequentially rotated feed to achieve circular polarization.

The power of SDR

Recently consumer grade software defined radios have become available, largely because of a few IC’s offered by Lime Microsystems, Analog Devices. There are other offerings from Texas Instruments and Maxim Integrated, but I have yet to see many products with these chips available for the public.

At the low cost end there are the TV tuner dongles which can act as SDR receivers. Notably Nooelec and RTL-SDR blog have great offerings. You can go from knowing nothing to receiving images from weather satellites for the cost of eating at a restaurant.

These receivers cover the GNSS spectrum and recently a few chunks of code have surfaced on github.

GNSS_SWRX_NOOELEC_SDR from user pdblunt

gnss-sdr from user gnss-sdr

Since I know patch antenna design, and LNA MMICs are now cheap and easy to find in the right spectrum, I would like to develop a kit for this kind of activity. It would be cool and lower cost than a lot of commercial GPS solutions.

Another nice touch is that if the code is portable, any fully fledged SDR system such as one using HackRF (or even better a USRP device) can integrate GPS receiving with just an antenna switch and active antenna.

Image and caption from: https://gnss-sdr.org/conf/

That’s the power of SDR, the ability to have a flexible transceiver that does a bunch of different things.

With the onward and upward march of battery technology and efficient, performant SOCs, SDRs have complimentary technology that will totally change the paradigm for wireless communication systems.

A 3.4 GHz antenna for satellite communication

Patch antennas are really great. They can achieve high gain in arrays, and also CP using a variety of techniques. One is sequential rotation, where array elements are rotated and phase shifted to follow the polarization of the EM wave.

One area where CP is important is satellite communication, because the orientation of the satellite relative to ground station is difficult to ascertain and control. It is simpler to use RHCP or LHCP to avoid polarization loss. This patch antenna is designed for 3.4 GHz and can fit on a 2U or 3U CubeSat.