GM12864-59N I2C LCD Display

Low power, low cost graphical displays are super useful for many embedded systems. My applications generally use them to provide status and a basic UI; high speed is not required. I am particularly fond of displays that can use the ubiquitous I2C communications bus since that doesn’t consume extra uC pins. I2C also makes it easy to retrofit peripherals into existing designs; I always bring the I2C bus + power and an interrupt line out to an expansion port.

I’ve used small (1.3″) OLED displays with I2C interface in several designs and they work great, but the screen is fairly small (albeit high contrast), OLEDs consume a lot of power, and you can’t leave ’em on all the time without burning them out (OLEDs have a limited number of on-time hours). So I decided to try an I2C LCD display.

The GM12864-59N by TZT is a 128 x 64 pixel LCD display with LED backlight. It comes in blue, gray, and black. It is available for $3.30 in qty 1 on AliExpress (if you’re only buying a few, this vendor has lower shipping cost). It combines the popular Sitronix ST7567S LCD controller (datasheet) with a 128×64 LCD display with 10+2 flexible connector. It comes with a pre-installed 1×4 0.100″ connector (3v3, GND, SCL, SDA) on a PCB with 4 corner mounting holes.

It’s almost perfect; the display works great and the ST7567S is both well supported with libraries if you don’t want to roll your own (e.g. U8G2 and U8G8 or this one derived from here) and provides a great deal of flexibility. The only problem is that the LED backlight (side light) is hard-wired to power (you can’t turn it off) which is fine for AC-mains powered applications, but a real bummer for battery-powered devices (where LCD displays are normally so attractive).

GM12864-59N LCD display with backlight

I tried disconnecting the backlight (remove the 100R current limiting resistor R5), but the LCD contrast is then so poor that it is unusable. It’s actually much worse than the picture below suggests which benefited from the optimal camera angle and the more sensitive camera sensor; for mere humans, the display is completely unusable without the LED backlight.

GM12864-59N without backlight

So this display might make it into my next AC-powered design, but for battery powered devices, I need something that lets me control the backlight.

Siglent

For decades, lab-grade test equipment came from either HP or Tektronix. There were other providers in niche areas (R&S, Anritsu, IFR, etc.), but nearly all lab-grade gear was too expensive for mere mortals. With few alternatives, hobbyists and small businesses scrounged eBay and corporate liquidations to find used gear from these manufacturers.

Times have changed and while those companies still make great test gear, the competition from China has steadily improved and in many (most?) cases, it makes more sense to buy new gear from a budget Chinese manufacturer than 20-40 year old big-name gear.

I’ve bought (and liked) products from Rigol and Owon, but my budget manufacturer of choice is, increasingly: Siglent. My recent purchases include:

Siglent (like Rigol) sells gear that is easily hacked to add functionality including bumping a lower-end model up to a higher model in the same line. This is smart marketing: it lets them get higher prices from larger companies that won’t hack while still providing very attractive price points to hobby and small business users who couldn’t otherwise afford the higher models, but are willing to hack the lower models.

For the most part, I’m quite pleased. The Siglent gear always seems to meet or exceed its specifications and the specs are quite decent. There is a huge community supporting them in places like eevblog with in depth reviews of SDS1104X-E, step-by-step guides to hacking the SDS1104X-E as well as usage, repair, and enhancement tips.

I buy much of my new test gear from Saelig and TEquipment, both of which have provided excellent service and I recommend. If you’re thinking about buying new bench gear, you might give Siglent a look!

Nordic Power Profiler Kit II (PPK2)

I do a lot of IoT development involving battery-powered wireless devices. These devices must have very low average power consumption to facilitate long battery life. They typically spend most of their time in a low-power sleep mode, drawing a few uA or even nA and then wake periodically to take measurements, operate controls, and transmit and receive messages. Transmitting can draw hundreds of mA.

So the dynamic range of current draw can span 5 orders of magnitude! Moreover active periods are often very brief (sometimes just tens of uS). Measuring that sort of highly dynamic power consumption with fast transient events is a big challenge.

Current is generally measured by measuring the voltage drop across a shunt resistor. Unfortunately, a shunt resistor large enough to allow measuring a few uA will introduce unacceptable voltage drop if trying to pass 500mA. So measurement devices must have many shunts and measurement circuits and be able to switch them in/out of line very rapidly while sampling the voltage drops across the shunts very fast.

My go-to device for this sort of dynamic power analysis is the Joulescope which is simply phenomenal. It has 1.5nA-1mA resolution (depending on the measurement range), samples at 2MS/s (250kHz BW) and switches shunts as fast as 1us. The software is excellent too. The only problem is: it’s expensive (around $1K), so it’s not something I can put on every bench or easily design into test fixtures.

Hence my latest tool: the Nordic Power Profiler Kit II (PPK2) which is sort of a poor-man’s Joulescope. It has many of the Joulescope’s features, but all are spec’d significantly worse. It’s also 1/10 the price. It also has one feature that the Joulescope lacks and is quite useful. The PPK2 is a credit-card sized device, powered by one or two micro-USB cables (depends on how much current you need…in my case, one is usually enough). It samples much slower (100Ks/s max) and is limited to 5V; resolution varies from 100nA to 1mA depending on the shunt range, it doesn’t measure voltage at all (so you can’t use it to observe voltage drop), and the software is significantly less mature. It looks like a bare board, but the components are actually covered/protected by a clear acrylic shield so it’s bench/desk safe.

On the plus side it has a built in programmable power supply that can output 0v8 to 5v0 (drawn from the USB supply). That by itself is an incredibly handy feature. With the Joulescope, I need it and a bench power supply to power the DUT. The ability to power a 3v5 DUT *and* monitor its dynamic power behavior while only tying up one USB port and the bench space needed for a credit-card-sized device is super-cool. It also has 8 digital inputs you can use as a poor-man’s logic analyzer to correlate digital events (e.g. turn on transmitter) with power consumption. The Joulescope has such inputs too.

So far, I like it. The measurements match my Joulescope nicely – except for very fast transient events where the Joulescope shines and the PPK2 suffers. The built-in programmable supply is awesome. The software needs some work. Most critically, the data logger needs a continuous mode where it fills the RAM buffer and then wraps; the software currently fills the buffer and then stops, requiring a manual restart to keep monitoring current consumption and resetting all counters. This is particularly bad when what you want to do is measure average power consumption over a long period (e.g. a day or a week). At 100Ks/s, the RAM buffer fills very quickly so you can’t monitor the DUT at high speed for more than 500s. At 1Ks/s you can monitor for 13h, but fast events will be missed or improperly measured which defeats the purpose of such devices. What’s needed is a continuous mode that wraps when the RAM buffer is full but keeps accumulating average, max, and total power used. (Nordic are you listening?)

Overall, I’m pleased with the PPK2 so far and expect to buy more for use on benches and in test fixtures. If you can’t afford a Joulescope (or just want a super-compact USB-powered variable supply), the PPK2 seems like a great choice.

Siglent SDG2042X hack

I purchased a used Siglent SDG2042X which is a 40MHz arbitrary waveform generator with bonus 200MHz frequency counter to replace my aging 25MHz arbitrary waveform generators. Test gear from Chinese manufacturers like Siglent and Rigol has steadily improved over the years and is now quite competitive. Despite my appreciation for the amazing quality of old HP/Agilent gear, in many cases, it makes more sense to buy something new from Siglent.

This generator works well and is feature-rich, but I was curious about an easy hack mentioned on eevblog (see The Siglent SDG2042X Thread) that describes how to upgrade it to 120MHz which turns it into the top of the SDG2K line: SDG2122X.

It turns out that the hack does indeed work and is easy to do; see results below. I don’t know if manufacturers intentionally leave these hacks available to make them attractive to hobby users while still selling the higher priced models to businesses who would be less prone to hack them, but either way, it’s much appreciated (and is a very nice signal generator)…thanks Siglent!

Note that the scope in the pic below is also easy to hack to 500MHz at 5Gs/s and moderately easy to hack to enable all optional functions.

The bonus frequency counter works quite nicely too, providing details like min/avg/max, sdev, duty, and frequency deviation in ppm relative to a reference frequency you specify. It needs about -10dBm (200mV) of signal at 200MHz, but lower levels at lower frequencies (e.g. it works at -20dBm ~= 63mV at 35MHz). Because the SDG2042X can be slaved to an external 10MHz standard, the generated frequencies and counter measurements can be very accurate; I usually keep it and other gear slaved to an external DOCXO standard.

STLink V3-MINIE

There are three things every STM32 developer wants from a debug dongle:

  1. Power (3v3, 1v8)
  2. SWD
  3. UART

    So I was excited when ST released their next gen debug interfaces (STLinkV3) and had included support for 1v8 targets and a UART. Was third time a charm? Unfortunately, not. Although the UART and support for lower-voltage targets is a welcome addition, ST made three unfortunate moves with the MINIE that are hard to fathom:
  1. Most notable was their attempt to force use of the STDC14 connector by *only* providing a 0.050 pin header for connections to the target via a fairly fragile connector. It would have been *much* better for it to have a shrouded 2×5 0.100″ pin header (like the “aluminum shell” STLinkV2 clones show below). These would allow use with the ubiquitous Dupont jumper wires that litter every developer’s desk. A tiny PCB with an SMT 2×5 female 0.100 on one side and STDC14 male on the other could have easily adapted to STDC14 when desired, but it’s much harder to go the other direction.
  2. It can’t power the target. Even the sub $3 STLinkV2 clones can power targets at 3v3 and 5v. This is incredibly useful, adds virtually no cost (5V is available from the USB i/f and there’s already a regulator on the STLink for its own uC). An STLink that has SWD, UART, and Power is exactly what every STM32 developer wants…now you need the MINIE and an external power supply!
  3. Finally, there’s the USB-C female connector. Even new laptops have very few USB-C ports (but many USB-A ports); the desktop situation is even worse. The interface itself is only USB 2.0 and the board and can’t supply power to the target, so I can see no rational reason for this choice. I suspect some PLM who has never done any development decided this would be “forward looking”.

The sub-$3 “aluminum shell” STLinkV2 clones nail the mechanical design. They can also power 3v3 and 5V targets. It’s only missing a UART and 1v8 support to be perfect.

So what to do?

You can keep using STLInkV2s, but as designs increasingly move to 1v8, that becomes a problem, requiring a high-speed voltage converter…The STLinkV2 runs an STM32F103 which only runs to 2v0 so you can’t just replace the regulator…and the STLink V2 lacks a UART.

There are adapter boards to convert STLink V3 STC-14 connector to 0.100 pin headers; I covered these in an earlier post discussing the STLink V3-PWR (which does supply power and is a single device solution for most STM32 development/debugging). However, the adapter boards just add another set of wires to clutter your bench and come loose at inopportune times. Fortunately, ST provided an edge connector on the V3MINIE for an imagined board-to-board configuration, and although they spaced the pads at 2mm, you can make them work for a 2.54mm pin header.

The JTAG/SWD pins map to SWD as:

  • TMS = SWDIO
  • CLK= SWCLK
  • TDO = SWO (which I rarely use)

It’s easy to solder a 2×5 0.100″ (2.54mm) pin header onto the 2mm pads; just center the middle pin on the middle pad and the other pins are close enough that you can easily make it work.

The soldering here is sloppy, but it shows the concept. The 2×5 pin-header is rock solid when mounted and provides access to all of the pins I use. The UART-side pins (shown to the left) are obvious.

Next time I’ll use a shrouded connector, to prevent accidental contacts and also to have a place to put a small label for each pin (you can’t see the silkscreen for the edge connector contacts when the board is in the 3D-printed enclosure)

ST has also kindly placed an STL file for a 3D-printable case on the product page (under CAD Resources). If you’re using Cura to slice the model, you’ll also need to uncheck the “Union Overlapping Volumes” box in the Mesh Fixes section of the print settings or it will fill in the STDC14 opening. Otherwise, it’s a very nice, compact enclosure with an excellent snap-fit and it holds the PCBA securely.

The original version of the enclosure posted on ST’s product page had the opening for the STDC14 connector slightly shifted and so you had to cut it a bit to make room for the connector. Within a day or so of reporting this to ST (8/2/2023) they had fixed the issue and sent a new STL file to test and it fit perfectly. I expect it will replace the original version shortly.

Go ST!

Next up:

  • Figure out how to get the SWD functionality working from the 0.100 header pins
  • Find a solution for powering the target. If you know of any, please let me know!

ST: if you’re listening, PLEASE give us a nice compact dongle like the V3MINIE but with a USB-A connector, pads for 0.100 pin headers, and 3v3 and 1v8 power outputs.

CPU cooler upgrade for Dell G5 5000

One of my main PCs is a Dell G5 5000. I bought it several years ago because it was relatively inexpensive, I’ve had good luck with Dell workstations, and it had the powerful (for the time) i7-10700F processor with 8 cores, 2.9GHz base, 4.8GHz turbo, and a fairly efficient 65W TDP.

Unfortunately, Dell cheaped-out with the CPU cooling, topping the CPU with a small “pancake” cooler that lets the CPU run so hot that it thermally throttles under load. I needed a better solution, but Dell’s case and motherboard design are proprietary and won’t accept popular 3rd party coolers such as the Pure Rock Slim 2.

Dell VWD01 Heat Sink

Fortunately, Dell makes a much more effective cooler (part # VWD01) for the G5’s higher-end XPS cousin that fits the G5 and is a perfect drop-in replacement for the pancake cooler: unscrew the 4 screws at the corners of the pancake cooler, unplug the fan wire, remove the cooler, clean the old thermal paste off the CPU, and install the new cooler. The new cooler comes with a perfect layer of thermal paste pre-applied so you just line up the screws, plug in the fan, and screw it down. The corners of the heatsink have numbers (1,2,3,4); screw the screws down in that order and gradually (i.e. screw 1 down 1/2 way, then 2 down 1/2 way, then 3, then 4, then back to 1 to screw it down more…until the screws are tight).

The Dell VWD01 routinely sells new for around $25 on eBay which is less than half the price of most third party coolers. It is also the only upgrade I’m aware of that is a drop-in replacement for the custom Dell case/motherboard.

So how well does it work?
With the old pancake cooler, my CPU idled around 45-50C and would quickly reach 95-100C (and then thermally throttle) if placed under load. With the new cooler, my CPU idles around 35-38C and even with all cores at max load, stays around 75C indefinitely; it never thermally throttles. At idle, the fan is silent; at max load you can hear it, but it is not loud. I monitor temperatures, clock frequencies, and core loads using OpenHardwareMonitor and put the CPU under stress using the Stress CPU feature of CPU-Z (I recommend both programs).

SDG1025 Firmware Update

I upgraded my SDG1025 to the latest firmware (1.01.01.39R7) from Siglent (available here). It seems to have fixed an annoying issue: the need to select the language each time it started.

Of note: the update process is straightforward, but initially I tried it using a freshly formatted 32GB USB flash drive and although it recognized the drive, it did not see the .ads file on it. I tried it with a very old (128MB) flash drive and it saw all the files on that drive and the update process went smoothly.

If Siglent ever releases new firmware for the SDG1025, I hope they will consider moving the very useful frequency counter feature selection to the top menu level (which has room for another choice on the soft keys). Right now, it takes 4 button presses to get to it which is excessive.

STLink V3-PWR

Update 2023-July: I no longer recommend using this until ST software support improves. At present, there are simply too many issues and it is a frustrating experience. The software seems somewhere between alpha and beta quality: the software that does work has major issues and many important software applications (including from ST) don’t work with it at all (including openocd which works fine with other STLink V3s).

I do a lot of design and development work using STM32 microcontrollers. The low-cost STLinkV2 hardware debug tool is part of what has made these processors so successful: the ability to quickly, inexpensively, and easily flash and debug firmware is a big deal. ST has gone a long way to make life easy for developers and we love them for it!

I have boxes of STLink V2s and clones; I use them all the time. Recently, I’ve started migrating to the STLink V3 and this post covers their most expensive variant: the STLINK V3-PWR which integrates some interesting features including:

  • SWD debug tool (flashing, debugging target)
  • USB-to-serial converter
  • variable power source for target (1v6 to 3v6 in 100mV steps)
  • dynamic current monitoring (100nA to 500mA) with 100ksps (50kHz BW)

It has additional hardware capabilities (SPI, I2C, GPIO, JTAG) that I haven’t tried yet (and it’s not clear that software support for them is ready).

Key Strengths

  • The STLink v3 is fast for flash/debug – even faster than the V2 (which was plenty fast)
  • The integrated serial interface works perfectly and saves another plug
  • Nice injection molded enclosure
  • The variable power source lets me test devices at voltages other than 3v3 and 5v which is more useful than it sounds…it’s often important to understand how the DUT will operate at 1v8.
  • The ability to monitor dynamic power consumption during development is incredibly useful. I didn’t fully understand this until I started using a Joulescope and realized how much added visibility it provided. I now routinely develop with the DUT powered through a Joulescope so I can better “see” what’s happening. The V3-PWR dynamically switches between 4 current ranges to provide a huge dynamic measurement range without imposing excessive burden voltage.

Cost:

  • $95 is crazy expensive for an STLink and serial dongle (V2 clones and serial dongles are individually available for as little as $2 from AliExpress in nice compact aluminum shells).
  • $95 is crazy cheap for a dynamic power monitor that covers a wide enough current range for IoT development is hard to come by for even a fraction of the price. The Joulescope, is roughly 10x the price (but much more powerful).
  • If ST make the design public as they did with the V2, we can expect to see the price decline dramatically once Chinese clones appear.

Hardware Limitations:

  • 100ksps (50kHz claimed BW) sounds great, but in reality, that sample rate doesn’t provide enough resolution to understand the dynamic power consumption of many IoT devices. It’s super-common for battery-powered devices to wake briefly (uSeconds), do something, and go back to sleep. This is one of the major differences with the Joulescope (2Msps, 300kHz BW).
  • No pass-through current/power monitoring. Batteries have higher impedance than most line-powered supplies and that impedance varies with temperature and other dynamic feactors (e.g. passivation). The V3-PWR lets you observe the consumption of the DUT, but not its dynamic interaction with a battery. (another difference with the Joulescope).
  • Power to the DUT is via ~3.5mm screw terminals…not banana jacks, not pluggable screw terminals, not even lever terminals…this was the wrong place to save a few cents.
  • Connection to the computer *requires* USB-C or the rare USB-A port that supports both data and charging. Maybe this isn’t a big deal or even a limitation, but it’s worth being aware of.

That Dang STC14 connector

  • The biggest DOH! with the entire STLinkV3 series is ST’s adoption of a 50-mil “STDC14″ connector. 0.050” (1.27mm) connectors are simply awful, particularly for developers. Many targets won’t have the same STDC14 connector and now you can’t use the ubiquitous 100-mil dupont jumpers as we did with STLinkV2. Instead, you need a breakout board to adapt the 0.050 pins to 0.100. You can get inexpensive STDC14 breakout boards from OSHPark (9 PCBs for $11.10 shipped) and mount either these nice but very expensive and somewhat fragile Samtec connectors (left) or these much cheaper and more rugged CNC Tech connectors (right).
    OSHPark STC14 breakout board with Samtec and CNC connectors

Software Limitations

  • No cumulative or average power measurement. This is a huge deal for battery-powered devices (and one that ST can and should add to their software). Understanding average power consumption is key for most battery-powered IoT devices. The sampling limitation might limit accuracy, but this is an easy-to-implement and important missing feature.
  • The UI is limited (something ST will also hopefully improve over time). It provides a graphical display of current measurement (see below), but is missing features we’ve come to expect from scope-type equipment such as: horizontal or vertical cursors to make and document precise measurements, automatic axis scaling, adjusting the time-base dynamically, etc. ST software developers would be smart to license Joulescope software for the V3-PWR.

When the software associated with the V3-PWR matures, it will get a thumbs up from me. If/when cheaper clones start appearing, I’ll probably have a box of these to replace my STLink V2s. If ST provides an API, these could also form a very useful building block in many factory test fixtures.

Competitors

  • Nordic Power Profiler Kit 2 (PPK2) – similar price, wider voltage/current ranges, can measure external current sources (i.e. battery), but no debug/serial functions and no enclosure.
  • NXP MCU Link Pro – half the cost, but you must select one of two current measurement ranges using a jumper and neither of those ranges fully cover my measurement needs. Within the selected range, the MCULink dynamically switches between 2 sub-ranges, allowing good dynamic range, but not on the level of the other devices. It also has more limited power supply capabilities (two fixed voltages: 1v8, 3v3) and has no enclosure.

Disk Abuse

I left the monitor running overnight at a high sample rate with acquisition time set to infinite. It turns out that this writes a ton of data to the disk and by morning it had chewed through 160GB of disk space! Even worse, it’s not obvious where the disk space went! So for other users who find this issue, the power acquisition log files are in Users/myUserName/AppData/Local/Temp/Power_Monitor/Acquisition.

ST could significantly improve the software application (STM32CubeMonitor-Power) by adding a few features, some of which seem quite easy:

  • Checkbox to En/Disable logging (off by default) so you can watch power consumption as you develop/test.
  • Link to the acquisition logs folder so users can find it easily
  • Stop/play button so you can pause acquisition to measure an event and then resume
  • Cumulative power usage counter (so you can confirm expected average power consumption over a long test)
  • Cursors (current and time) so you can measure and document events
  • Auto-scale of the Y-axis should adjust to mA when appropriate. A scale from 0..500000uA is just silly and it’s surprisingly annoying to try to distinguish 15000 from 150000.

Internet Security

We all know things are ugly out there, but things are particularly ugly in the growing world of connected devices where security is often an afterthought or under-powered for the modern internet.

I was reminded of this yesterday when I needed to recover the root password for an internet device (with the permission of the device’s owner who had forgotten it…so it was legit to hack). Like many such devices, it used a scaled-down older linux kernel, BusyBox, and an old-fashioned /etc/passwd file where salted passwords are stored md5-crypt hashed. (format: $1$<salt>$<128-bithash>.

Fortunately (but also worrying), a popular hacking tool (John the Ripper) makes short easy work of such files. And when I say “easy”, I mean ridiculously easy and when I say “short”, I mean weak passwords are cracked in seconds. If you have access to the passwd file (let’s call it passwd.txt) you would just run the command “john passwd.txt” and in a few minutes, voila: out pop the decrypted passwords. You can enhance JtR with (big) lists of common passwords; there are free lists here and you can also buy lists. You can run JtR on a multi-core machine with a word list using a command like:

john –fork=8 –wordlist=mywordlist.txt filetocrack.txt

In the past, I wouldn’t make a post like this for fear of encouraging hacking, but these days, that fear is misplaced. Tools like JtR (and many much more powerful) are so easy to use and so widely available that *any* hacker at any level knows about them. So rather than keeping head in sand, it’s time to bite the bullet and start assessing (and fixing) your products’ security.

  1. Hire someone to help with security if:
    • your system stores plaintext passwords
    • your passwords aren’t salted before hashing
    • you don’t have a delay before re-entering the password after a few failed attempts
  2. If your products run on small/old linux kernels and/or otherwise use md5crypt for password hashing, consider upgrading and hash passwords using at least SHA256.
  3. Prompt users when they are entering new passwords for what makes a quality password: use an obscure phrase rather than single words or a word with some numbers or some variation on their username.
  4. Store usernames and passwords separately such that only the root user has access to the password file (/etc/passwd and /etc/shadow)
  5. Check new passwords against known lists of pwnd passwords and warn the user.
  6. Run tools like JtR against your own passwd stores and if it quickly guesses your passwords, know that hackers will be doing the same thing.
  7. If possible, don’t use passwords at all on internet-facing systems; use public key certificates instead.
  8. In your own (home/business) networks, segregate insecure devices (i.e. nearly every internet-enabled appliance: cameras, TV streamers, doorbells, etc.) from your computers and storage systems. Devices belong on the guest network or separate VLANs…not on your main WiFi/LAN.
  9. Don’t use the same passwords in internet appliances that you use for things you care about. Assume the internet devices have been cracked. The security in internet appliances is usually *vastly* worse and when hackers crack that doorbell/camera, you don’t want that giving them access to the rest of your network, bank account, etc.
  10. Ideally, use a different, good password for every account. Use a free tool like PasswordSafe to keep your passwords secure; encrypt the safe where your passwords are stored with a single very good password that you don’t use anywhere else and then you can store it on the cloud (OneDrive, GoogleDrive, whatever) so you have easy access to your passwords, but hackers don’t.

Rooftop Solar Panels

You can view my current solar production here

Update 6/4/2023

The array has been up for a year so it’s finally time to look at annual production. The system produced 12.868MWh over the last 12 months; that’s less than the 14.7MWh the vendor expected and the 15MWh the government calculators predicted. It’s hard to know exactly why; it was an unusually rainy winter and I have a large river birch in front of the house that has grown to shade several of the panels. I could have it trimmed to increase production, but shading the house also reduces energy consumption so it’s hard to know exactly what to do.

I was also disappointed that the first 6 months of SRECs seem to have vanished into thin air. Even though the system was running for the last 6 months of 2023, the SREC exchange stated that that they would start selling my SRECs in 2024 which begs the question: what happened to the SRECs from 2023! Nevertheless, we received a check for the expected amount for the first quarter of 2024 and hopefully will from now on.

Re-working the numbers using an average 12.5MWh, since panel output is expected to decline over time. 12500kWh/yr x $0.143/kWh = $1787.50/yr. This means that return on investment should happen in roughly 8.1 years. A little longer than the 7.4 initially estimated, but not far off and if the panels really last for 25+ years, they are still a good safe investment as well as being good for the environment. Overall, I’d do it again.

Update 10/12/2023

It’s been an odd summer with extended periods of attenuated sunlight due to huge Canadian wildfires and more summer rain than usual, so I don’t know if this is going to be representative, but total energy production for the first four full months: June, July, August, Sep was 5 MWh which is a little less than I’d expected.

I don’t know whether the system will reach the 14.7MWh annual estimate provided by the vendor this year, but it seems unlikely because it would need to produce 9.7MWh over the next 8 months or nearly 1.2MWh/month which seems doubtful given winter’s shorter days. I’ll update again periodically until there is a full year of production history.

Production as of Oct 12, 2023. Note, May was a partial month as the system was being installed.

As expected, energy production tops out around 7.8KW based on 27 x 290W inverters = 7830W those peaks rarely happen and when they do, are brief, so the selection of 290W inverters seems correct. This means that the “10.8kW” system really is a 7.8kW (peak) system.

Update 5/27/2023

I switched the system on Tuesday evening and Wednesday was the first day of solar production. The system produced 57.2kWh. As expected, the system clips at nearly 8kW, but it was a sunny day and the system produced more than expected!



My utility company lets you see hourly consumption and production thanks to smart net metering; it lags a couple of days, but my energy bill went from $7 the day before to -$2.14 on Wednesday:

I’m looking forward to lower electricity bills and will post a detailed analysis of the costs vs. credits after I’ve gathered a few weeks of data.

Original Post

I’ve been waiting for years to install rooftop solar panels. In the past, the math simply didn’t work: the panels might barely pay for themselves over their lifetime: a poor investment. However, costs have come down and it finally makes sense.

The specifics are complicated and in this post, I’ll try to cover the factors that went into my decision and the resources I used. First, I did not want to lease panels; entering into a 25-year consumer contract seems undesirable for a host of reasons including that I don’t know if I’ll be in this house for 25 years and don’t want to incur the cost of moving panels or making the sale of the house contingent on a buyer having to take over the lease (that might not make sense for them). So I will be purchasing the equipment outright. For folks who can’t, I suggest using a home equity loan (which will have a much lower interest rate) rather than borrowing from a solar vendor or leasing.

Q-Cells Q.PEAK DUO ML-G10+

Panels: I’m going with Q-Cells panels (Q.Peak Duo BLK ML-G10+) which are 400W panels that seem to strike the right balance between cost, warranty (25 years) and efficiency (20.4%). EnergySage (a great resource) rates them as excellent and resilient against snow/wind/hail/fire. They have a linear output decline warranty and so should still be delivering 86% of their rated power after 25 years. Q-Cells is a South Korean company and Tesla uses Q-Cells panels so there’s a reasonable chance they will be around in 25 years if I have a warranty claim. If you were buying them on the open market, these panels cost about $326 each. We’ll be getting 27 of these ($8.8K) to produce up to 10.8kW (more on production later).

Inverters: Enphase IQ8+ microinverters were recommended by the company we’ve chosen for installation. These are also rated as excellent by EnergySage and also have a 25 year warranty. One microinverter is used for each panel (i.e. 27 microinverters for 27 panels).

The jobs of a microniverter include:

Enphase IQ8+
  1. Maximum Power-Point Tracking (MPPT): draw power from each panel at a rate that maximizes the panel’s output and thereby extracts as much power as possible from the sun hitting each panel at a given time and ambient temperature. Having one device per panel allows optimizing power for the individual conditions of each panel (e.g. when some are in shade/under-snow/whatever).
  2. Convert the roughly 36VDC panel output to 120VAC which is what is used in your home’s wiring.
  3. Communicate with each other and with monitoring equipment over the 120VAC household wiring using power-line-carrier (PLC) communications (so no extra wiring is needed).
  4. Shut down power production if the power from the main electric grid (the power company) fails so that they don’t back-feed power into the grid which could endanger line crews working to restore power on lines they expect to be powered off. (More on this later too).

The IQ8+ inverters offer high (97.7% peak) efficiency and can provide up to 300W peak, or 290W continuous output power. But “wait” you say: if the panels can produce up to 400W, why use inverters that can only provide 290W continuous output power? The answer is that the 400W panel rating is a little bogus. Panel maximum output ratings are under ideal lighting conditions (1000W/m^2) that generally won’t happen unless you are on the equator at noon. Under the more realistic NMOT lighting conditions (800W/m^2), the 400W (max) panels will produce about 300W. There are also losses in the wiring from the panels to the inverter, and 2-3% loss within the inverter due to conversion inefficiency, so 290W rated continuous output power inverters are actually a good match for the “400W” panels. IQ8+ microinverters retail for $189 each and can be had for $167 each. We’ll be getting 27 of these so around $5.1K total.

Production: the installer estimates 14,726kWh produced in the first year; this will decline 2% after the first year and then gradually over the 25-year life of the equipment until it is 86% of the initial production. They estimated the production ratio for our roof at 1.36. This matches pretty closely with the NREL (government) solar calculator that estimates 15,050kWh/year. Production is much higher in Mar-Oct than in Nov-Feb, but that’s also when we use much more electricity (for A/C). Another great site for estimating what your house can produce is Project Sunroof.

Return-on-Investment: so how does this all work out? The financial case for the panels is complicated and built on several factors, some of which will change over time:

  1. Initial system cost: $28.6K
  2. Energy that you produce and use. This directly offsets energy you would otherwise buy from your local utility. In my case, that power costs about $0.143/kWh. So every kWh the panels produce and I use saves me $0.143.
  3. Excess production. Production that is in excess of what is used (unlikely in my case) can be sold back to the utility at wholesale rates (around $0.05/kWh) through a process called “net-metering”. I’m going to assume none of this.
  4. Solar Renewable Energy Credits (SRECs) – Utilities are required to increase production of energy via renewable sources. One way they can meet this energy requirement is by getting credit for your production. So you can sell these credits on an open market and receive a payment for each MWh you produce. EnergySage explains it better here. Since it’s an open competitive market, the rate being paid for SRECs will vary by location and over time. You can check local SREC rates at SRECTrade here. In my case, in Maryland, the value of each SREC is worth about $59/year; these will decline over time (see estimated values here). A 10.8K system generates about 12 SRECs/year.
  5. Tax Credits: Currently, there is a 30% federal tax credit for solar installations and Maryland offers another $1K credit.
  6. Energy inflation vs. other safe investment returns. – I could put the money I’d spend on panels into another investment of comparable risk (very low) and it would generate revenue. OTOH, energy costs are subject to inflation and so I’m going to call this a wash and ignore it.

So let’s do the math:

  • 28.6K up-front for the system includes the materials (panels, inverters, combiner, mounting system) which I estimate cost around $17.5K. I’d guess around $5K for labor and permits, leaving room for about $6K profit for the installation company (which is very little on that size purchase). The company (Revolution Solar) is a family business owned by a neighbor so they’re giving us a break on pricing; my entire experience with Revolution Solar has been fantastic and it’s not just me, they are very well reviewed on EnergySage. I highly recommend them.
  • There’s a 30% Federal Investment Tax Credit (FITC) which returns $8580 and a $1K state tax credit which brings my cost down to $19K.
  • Production declines over time so let’s use a 14MWh/year estimate and assume that we use all of the power produced: 14000*0.143=$2002/year energy savings.
  • SRECs also decline in value over time; over the next 8 years, we can assume an average of $47/month or $564/year * 7.5 years = $4230
  • So: $19K – $4230 SRECs = $14,770 we need to recover in energy savings
  • $14770 divided by $2002 energy savings/yr ~= 7.4 years

This is good enough. ROI might push out past 7.5 years if we don’t use all the power that’s produced, but we are pretty heavy consumers of electricity and given that electric vehicles are likely in everyone’s future, that’s unlikely to change. Fusion will eventually come online and drive electricity costs down, but that’s not likely in the next 20 years and in the interim, solar provides some protection against increases in energy prices, should provide a nice return in years 8-25, and we can be a little greener to leave the world a better place for our kids.

Update 5/2/2023

The panels are installed and we’re waiting for the final inspection and approval. We had to replace our roof as part of the process because it was 20 years old and would otherwise need to be replaced a few years after installation which would incur the cost of removal/re-installation that would make it much harder to cost-in. The solar company (Revolution Solar) did a fantastic job on both the roof replacement and the panel installation. They worked quickly and efficiently, cleaned up well, and gave us favorable pricing. I was particularly taken by the extra effort to do things like hide the electrical conduit which they even painted two colors to match our siding and trim, and they placed the external connection boxes behind hedges so they’re well hidden. The panels themselves are black with black trim and are therefore fairly unobtrusive against the shingles.

I was surprised by how large the panels are:

Emergency Backup Power: my only disappointment with the Enphase system is that they don’t have a cost effective solution for providing emergency power during a grid power outage. When an outage is detected, the inverters shut down so even though there are panels on the roof producing power, you can’t use it. The backup solution Enphase offers for $7-8K is nicely automated, but that’s just too costly given how rarely we have an extended outage (we haven’t had one in more than a decade) and the comparatively low cost of gas emergency generators.

The problem is driven in part by the fact that the solar tie-in is on the line-side of the breaker panel which precludes using the panel itself to disconnect the photovoltaics from the grid. It seems like a better design would be to connect the PV circuits into breakers on the load side of the breaker panel and replace the main breaker with a PLC-enabled smart-breaker that signals the inverters to resume production when the main breaker is opened. This would protect linesmen from backfeed, let homeowners select and power critical circuits (fridge, freezer, sump pump, etc.) using their existing breakers for a few hours a day during multi-day outages. It wouldn’t be pretty, but it would do what’s needed and shouldn’t cost anywhere near $7K. I realize there may be code or other things that preclude this. It would need to be apparent to the homeowner that to completely cut power to the loads would then require throwing both the main breaker and the solar panel load-side breakers. Hopefully, as solar becomes more common, panel makers (Square-D, Eaton, etc.) will start producing smart panels designed to support solar generation.