Skip to main content

Posts

Ninja causing OOM!

 Ninja has been around for a while, since 2012 or so. Ninja is a small build system with a focus on speed.  https://ninja-build.org/ I had heard of it and an engineer I worked with at Cybex I think was using it as his build system. Ninja's goal is to be faster than GNUmake,   the de-facto make utility.  David Rothlis did some benchmarks on ninja  and the no-op build (a build with no or few changes vs. a clean build) is significantly faster with ninja. I just started hacking on Kicad  for fun. Kicad is an excellent open source electronics design tool that I've used to design and build several PCBs. Kicad devs recommended using ninja for builds as its faster. Why not? Ninja has been around for a long time, so it should be pretty well developed, and it's a good opportunity to see how it works. If it works well it could be a good thing to adopt across a number of other projects that are presently using GNUmake. So I'm off building Kicad, MacBook fans are c...

UTM (qemu on OSX) only boots into uefi shell after installing Ubuntu 22.10 (solved!)

I've been meaning to try out running Linux and Windows virtual machines on my x86 MacBook Pro using qemu . I've been using Parallels for several years. Parallels is a nice application and works well but I'm always getting bugged to purchase upgrades. Parallels provides free updates on minor version upgrades only, say 13.0 to 13.1. With so many prompts to purchase upgrades it feels like Parallels could release a bit more minor versions and a bit fewer major versions. Rather than just purchase an upgrade to Parallels I figured I'd try out qemu via the UTM application . UTM wraps qemu with a helpful gui and comes as a packages Mac application. And UTM supports both x86 and M1 systems (as qemu also supports these systems). Creating an Ubuntu VM with UTM didn't go as smoothly as with VirtualBox or Parallels but it was the settings I chose that messed me up. Here are two things I ran into when installing Ubuntu on UTM. #1. Configure the qemu instance to use a 'Display...

OSHPark accepts Kicad board files directly?!?!

I'm working on a small filtering board to filter out high frequency noise from an RC servo power and signal. It's a simple 2-layer board with large traces and large (>= 0603) parts. That means it's within the capabilities of pretty much all online quick turn board fabs. Wrapped the design last night, time to order the first set of prototype boards. A few of my favorite quick turn board fabs are  jlcpcb and OSHPark . These will be hand assembled, otherwise I'd probably use jlcpcb as they'll assemble boards and have a ton of passives in their catalog of available parts. All of my ECAD work is done with KiCAD so you can imagine my surprise when I spotted this mention on the OSHPark site of " drag and drop your KiCAD files "?!?! Looking at their help page it turns out OSHPark will directly accept a KiCAD .kicad_pcb file, no pre-processing necessary. I'm not sure how long OSH has had this support, maybe its been a while and I just noticed it, but its a ...

Lessons learned from my first indoor time lapse video

We had a case where some small ants were showing up in our kitchen. I put down some ant bait and thought it could be interesting to look at a time lapse of the ants gathering the bait over a period of several hours. I've got an old GoPro Hero 4 that can record a time lapse at 4k, so I set that up on a little GoPro tripod thing, plugged in a battery pack and started recording. Several hours later I started editing and quickly realized that I had missed a few things in terms of preparation, oops! Let me point out a few of them here in the hope that you can avoid these issues if and when you record a time lapse. Inconsistent lighting As soon as I started editing it became apparent that pretty much each frame differed greatly in brightness. I'm guessing this was due to clouds. It took hours in post-processing to adjust add key frames to adjust the brightness thousands of frames. While the final result looked much better, avoiding the issue entirely with consistent brightn...

Follow up on 'The questionable future of NFC in the wake of Apple's iBeacon'

In February, 2014 I wrote an article about Apple's lack of support of NFC and their use of Bluetooth Low Energy (BLE) based iBeacons . Well, I was totally wrong! Samsung introduced NFC support in the Galaxy S3 in May 2012. Apple held out until September 2014 when the iPhone 6 was released with NFC support. Since then Apple Pay, using NFC functionality on the iPhone to make payments, has gotten huge.

Mental models

Mental models are a valuable tool for engineers. I do engineering as a day job. Often diagrams, drawings, and other visuals will be created to help convey information to customers and facilitate discussions. Visuals, while always leaving out some details, and in fact the challenge of creating visuals being knowing what details to leave out, helps immensely with audience engagement. gitGraph commit commit branch feature commit commit commit checkout main commit commit merge feature A random git feature branch development model diagram A visual's layout, colors, blocks, arrows etc are far easier to consume than a wall of text. In spite of their relative simplicity when compared to text, they can be constructed to represent complex systems, relationships, processes etc. We create a lot of visuals to help convey information to others, are we using them enough when conveying information to ourselves? st...

Predictions for 2022+

Hello! I wanted to record some thoughts I had on predictions for ths coming year, if only to provide a record to check against in the future. Hope you enjoy and feel free to drop a comment with your thoughts! #1. Intel announces a new ISA to compete with ARM >30% - Not particularly likely in 2022 but more likely in 2023 and beyond Apple is selling a TON of Macs with M1 processors and these processors are very fast. TheRegister writes Arm's market share in PC chips was about eight per cent during Q3 this year, climbing steadily from seven per cent in Q2, and up from only two per cent in Q3 2020, before Arm-compatible M1 Macs went on sale. Apple's ARM based processors use an ISA (Instruction Set Architecture) that is newer and better designed than the x86 one used by Intel and AMD. While switching ISAs is a huge undertaking, users of the x86 ISA have higher power consumption and larger silicon area to perform the same operations. #2. Recognition for SAR-CoV-2 / C...

Tesla was the only EV choice for Hertz

Hertz goes with Tesla The news that Hertz is purchasing 100,000 Tesla's has pushed the stock above $1000 its market cap over $1 trillion. This deal was an excellent move by Hertz and about the best one to get into the EV game that they could have made. #1. The Tesla Brand Tesla is a household brand, yet it has no advertizing budget. Tesla is also struggling to keep up with vehicle sales, achieving a 73% increase in vehicles shipped between 2020 Q3 and 2021 Q3. Hertz has gained a unique association with the Tesla brand. Interested in renting an EV or a Tesla? Hertz is that company now. #2. Worry free trips due to Tesla's charging network Charging on trips is one of the most stressful parts about having an EV, although this is getting better each year. No one worries about driving someplace and not finding a gas station but finding a charging station is a real concern with an EV, even in 2021. When I got a Tesla Model S in 2016 there were far fewer charging sta...

CPUs and instruction set architecture (ISA)s - Introduction

As programmers we often work several layers above cpu instructions, working with tools that make our lives simple, easy, and stress free! Hahah, of course that isn't the case. We face different challenges at different levels in the system. It really is amazing to think about what goes into a typical appliation level software stack, for example: These millions+ lines of code that a Linux, Windows, or web application is running on top of means the details of the hardware and processor are abstracted to a far away land. Processor features and the Instruction Set Architecture (ISA) often don't matter from a functional perspective. Tools, OSes and other systems take care of lower level details. You might choose a particular processor or processor family for specific attributes, but often as long as you've got a compiler and other tools for that processor you don't really care what ISA is being used. Goal Care about CPU and ISA? Application develop...

Tips for JLCPCB for PCB manufacturing and SMT assembly

JLCPCB is an offshore (Chinese) low cost quick turn PCB manufacturer that can also perform PCB assembly (SMT components only). I've had a half dozen or so boards built by them so far and their SMT assembly service has saved me countless hours of populating SMT passives (resistors, capacitors, inductors) under the microscope. Here are some things I've learned while using jlcpcb that will likely save you a TON of time and effort. #1. JLCPCB's parts library is NOT the same as LCSC's JLCPCB (PCB fab + assembly) is related or owned by the same company that owns LCSC (parts supplier, think DigiKey, Mouser, Arrow) BUT JLCPCB's parts library is only a relatively small subset of LCSC parts . You'll want to search JLCPCB's parts catalog for parts, these are the only ones that JLCPCB can populate on your PCBs. Don't do what I've done and put together a BOM for a PCB using LCSC parts and then find out that 90% of these parts aren't availa...

Is Windows 11 Microsoft's way of asking people to consider OSX and Linux?

If you've been keeping up on tech news you've likely seen the positive stories reassuring you about the upgrade to Windows 11: Windows 11: Just say no | Computerworld No, you don't have to upgrade from Windows 10 to ... - CNET WHY did I get my hopes up? - Windows 11 Announcement There are a number of unpallatable things being pushed in Windows 11 ( specs ): "You need a Microsoft account" - what? why do I need this? any privacy concerns? "Trusted Platform Module (TPM) version 2.0" - again, why is this necessary? Windows 10 works fine without it... Shifting CPU requirements - A month ago the Windows 11 compatibility tool said you needed a pretty new CPU (for no technical reason anyone can figure out), now it looks like a wider range of processors are supported. This is a remaining area of confusion. Not excited about Windows 11? There are some options: Switch to OSX (via Apple) or Linux Remain on Windows...

GE's GeoSpring Hybrid electric water heater

2019-02-24 update: Wrote this back in 2014 and only got around to publishing it now after making some final edits. After the final repairs listed here the hot water heater worked without issue until we moved a few years later. It felt, and still feels, like this was just one of those products that was launched with known issues and that it should have had some design changes. Instead they kept shipping the same design for a number of years inspite of knowing a number customers would have to deal with them. In this case the condensate pan was made of inappropriate material for the fitting attachment that was intended for use, and the condenser had a design or manufacturing flaw that caused a serious galvanic reaction. It's too bad that so many people had a negative experience with this relatively new technology given how energy efficient heat-pumps can be. - Chris 2013 We've had a string of issues with our new GE GeoSpring Hybrid water heater. Many reviews on Amazon ...

CANbus on the Omega2

Omega2S Omega2+ If you are as big a fan of the Omega2 as I am I'm guessing you want to do as much with the platform as possible. Recently I've been looking to get a low cost Linux system on a CANbus, to sniff on some traffic. What are the options for adding a CAN interface to your Omega2, either when you are designing a solution or looking to easily add it to an existing system? eLinux has a great guide on a number of CANbus adapters that I'd recommend to anyone looking to integrate CAN into their system. Interface Typical use case Available on Omega2 / Omega2S serial (via SLCAN) Design-in/Add-on Simple protocol but not considered reliable, efficient or fast by Linux CAN developers . SPI Design-in Not usable , the Omega2 (MT7688 cpu) is only half duplex SPI Software SPI Design-in Higher cpu load than hardware SPI USB Design-in/Add-on Available (Omega2 has one USB host port) Note that all of the design-in options could be used ...

Some interesting ways to use gmail's address rules

Gmail address mapping Gmail has some interesting rules that it applies to email addresses. Gmail ignores periods, '.', and all of text after the plus, '+', character up until the '@. Others have written pretty extensively about the situation, I'll try to be brief here. Using periods to make email addresses easier to read You can insert periods to make your email address easier to read, Email sent to Will go to John.Doe@gmail.com -> JohnDoe@gmail.com j.doe@gmail.com -> jdoe@gmail.com Unique email addresses for each site Using '+' you can use unique email addresses when registering with websites. This can make it easier to figure out who might be selling your email address. Email sent to Will go to JohnDoe+somesite@gmail.com -> JohnDoe@gmail.com JohnDoe+anothersite@gmail.com -> JohnDoe@gmail.com If spam starts arriving on one of these site specific emails you can be pretty sure ...

Golang modules - everything, even your application, is a module

I’m new to golang modules . Here are some of the things that I wish I had known when I started using them. There is no reason to set GOPATH One of the things I struggled with was how to reconcile modules with the single workspace directory recommended in the golang docs and what was previously where GOPATH would point. With go modules you wouldn’t normally set GOPATH. Everything is a module Everything is a module. Even your application. This is something not immediately obvious or mentioned anywhere. Every module has to have a name If you aren’t planning to import or share your application/package then you can use a non-repository name like myapp . When you initialize go modules you can do: go mod init myapp If you’d like to share this as a module you’ll want to use its web location instead like: go mod init github.com/user/repo Packages need to be fully qualified If you had a subdirectory of your application called mypackage then you’ll have to adjust your impo...

Graco Swing By Me - Battery to AC wall adapter modification

If you have one of these Graco battery powered swings you are probably familiar with the cost of C batteries! The swing takes four of them and they only last a handful of days. I'm not sure if the newer models support being plugged into the wall but ours didn't. If you are a little familiar with electronics and soldering, here is a rough guide on how you can modify yours to plug in! I wasn't sure how exactly to disassemble the swing side where the batteries were. I was able to open up the clamshell a bit but throughout this mod I was unable to determine how to fully separate the pieces. I suspect that there is some kind of a slip plate on the moving arm portion. The two parts of the plastic are assembled and the moving arm portion with the slip plate is slid onto the shaft. Because of the tension in that slip plate it doesn't want to back away, and because of the mechanicals that portion of the assembly doesn't appear accessible in order to free it. I was...

Oscilloscope assisted debugging

Concept External test equipment is a powerful but often overlooked tool for debugging particular kinds of software problems. In particular, test equipment like oscilloscopes and logic analyzers are well suited to investigating timing related issues on embedded systems. Why is test equipment suited to helping with issues related to timing? Oscilloscopes and logic analyzers can easily provide microsecond or better measurements and, unlike software based monitoring approaches, they aren't affected by other software running on the system. Embedded systems are ideal for this approach as they both provide the io outputs required for timing measurement, and often lack the advanced debugging facilities found in desktop/laptop processors and operating systems that would make this approach less necessary. At the conclusion of  debugging some 1-Wire bus contention issues  I was still seeing CRC errors reported periodically. Here is how I used an oscilloscope to track down the lik...