We Have ChatGPT At Home

The recent release of DeepSeek-R1 has posed a challenge to the established players in the LLM scene. While it may not be quite as powerful as the latest OpenAI models, R1 has demonstrated “chain of thought” and “mixture of experts” reasoning behavior, and can solve at least some puzzles requiring logical thought.

More interestingly for home users skeptical of relying on AI hosted in mainland China and under the control of the CCP, various “distilled” models of DeepSeek-R1 have been released, with parameter sizes ranging from 1.5B to 70B. All of these will run fairly reliably on $1000-class enthusiast PCs — and the smaller models will run nicely on even modest hardware.

Probably the easiest way to get up and running with these models is to download and install Ollama, which can download, load, and run models from a single command prompt. Once Ollama is installed, just type

ollama run deepseek-r1:14B

and Ollama will download, install, and run the 14B parameter distilled model.

These “distilled” models are actually “Qwen” (from Alibaba) and “Llama” (from Meta) base models, finetuned with reasoning data produced by DeepSeek-R1. The 70B model, in particular, seems quite stable and fairly capable of dealing with logical problems of moderate complexity. This largest distilled model was able to solve a word problem involving the ages of three people (three equations and three unknowns) 90% of the time or more. (It got the answer correct 17 times in a row and then got it wrong 6 times in a row, which strongly implies the memory is not being correctly cleared.)

Compared to GPT-o1 (and probably the new GPT-o3-mini), the distilled DeepSeek models seem to struggle with more complex questions. When asked how many gold ingots a Minecraft character can carry (via a disguised question about regular and “magic” boxes), the DeepSeek distilled models have trouble coming up with an optimal plan, whereas GPT-o1 came up with an optimal or nearly-optimal approach right away.

So while we may not have “ChatGPT at home,” it is still impressive to see models running locally that can not only carry on a conversation but can reason. I see “cloud computing” as a necessary evil at best, since ultimately “the cloud” is “somebody else’s computer,” and that somebody else could decide to stop providing the service at any time. From the perspectives of privacy, reliability, and democratization of technology, it’s nice to have the option to self-host.

And more competition is always a good thing. I don’t think it’s a coincidence GPT-o3-mini just rolled out. OpenAI wants to remain in the spotlight.

And maybe this will help “Open”AI decide to release actually-open models.

Posted in Current Events, Digital Citizenship, Machine Learning / Neural Networks | Leave a comment

Running On Empty: Adventures in a Kia Niro EV

When a recent flight to Maine to see my family was cancelled due to weather and replacement flights were significantly more expensive, I decided to do the reasonable thing and rent a late-model plug-in electric car and drive something like 1000 miles round-trip.

The Kia Niro EV that I rented.

The figures available online led me to believe that I would need 2-3 recharging stops of about an hour each. With highway speeds comparable to those of a gasoline car, this would mean 2-3 extra hours. So my 8-9 hour trip would turn into a 10-12 hour one. No big deal, I thought.

The trip got off to a dubious start right away, since although the website said the fuel policy was full-to-full, it started off at 57%. I then found out that this meant that I’d be lucky to get 100 miles before needing to recharge. Sure enough, I wasn’t even out of NJ before I was looking for a charger. And then (maybe due to cold weather) the 10%-80% charging time was closer to two hours than the 57 minutes quoted online for a Level 3 charger.

I eventually found a charger station, waited long enough for an available charger to remind me of the 1970s gasoline shortages, waited another two hours or so for the 80% recharge, and continued on my way. Five or six long charging stops later, I eventually made it to my destination. 500 miles took some seventeen hours; I finally arrived just after 5AM, having picked the car up at noon, driving and charging/napping continuously since then.

The charging situation really points out internal-combustion vehicles’ superpower — fuel energy density. One liter of gasoline stores 31.54 megajoules (MJ) of energy, or about 9kWh. This is about 1/7 of the Niro’s total energy capacity; the equivalent amount of energy to charge the Niro completely (0% to 100%) would take maybe a minute or so for a gas pump to dispense. Gas pumps can transfer an astonishing amount of energy per minute.

Many (most?) of the chargers I encountered along the way were “350kW” chargers, apparently capable of charging certain vehicles at something like 8x the speed I was getting from them, since charging rate is limited by both the charger and car capabilities. Admittedly, charging on a cold winter day didn’t help, but this is one of the places where higher-end brands like Tesla distinguish themselves. Decreased charging time would 100% be my top suggestion for improving the Niro EV.

Most EVs are (technically) capable of charging from a 15A wall outlet, but naturally my rental didn’t have the proper adapter cable. Two days later, Amazon came through with the correct charging cable, and I could start recharging. Since the outlet is limited to ~1.5kW, a full charge from a wall outlet can take some forty hours(!) I left it plugged in for a day and a half.

The J1772 / CCS charging port, located on the front of the Niro EV.
The top connector is for control and (slower) AC charging; the bottom pins handle fast(er) DC charging.
A J1772 Type 1 charging cable for the Niro EV (and others).
It charges at ~15A / 120V — and can take some forty hours to charge!

In terms of driving, the Niro EV is a fun little car. Even in Eco mode (which I used for nearly the whole trip), it’s responsive enough to be driven safely — and in Sport mode, it’s actually fairly zippy (if you’re expecting normal-car performance and not Tesla’s Plaid Mode.) Visibility is good, steering, acceleration, and brake pedal respond predictably, and the car feels stable. Comfort is good enough, especially for a small car. There is plenty of cargo space, too; I’m a pack rat but didn’t even have to put the rear seats down in order to bring home several boxes’ worth of flea market finds. There’s at least one 12V power outlet, and several USB-A and USB-C outlets. Keeping the car charged was a challenge, but my phone stayed on 100%.

For drivers not used to modern conveniences, though, the driving-assistance functions steal the show. I was expecting some form of cruise control, since that’s been available since at least the 50s, and should be standard by now. The Niro turns out to not only have cruise control, but adaptive cruise control that can maintain a set speed and/or a set following distance to the car in front of you, slowing down and speeding up as needed. This greatly reduces driving fatigue.

There’s also a lane-keeping feature, which will actively steer the car to keep it in its lane (as long as you keep a hand on the wheel). Naturally, there’s a nice rear-view camera, too, as well as modern GNSS navigation and Bluetooth audio/phone connectivity. It will even help you find EV charging stations, although apps like PlugShare are far more up-to-date.

The driver’s display on the Niro EV, in its natural habitat (hooked up to a charger).

Living in the city, I usually don’t really have need for a car, and actually hadn’t driven to speak of since the Before Time. At one point, I had more miles driven backwards than forwards in the past two years’ time, and more miles piloting a boat under sail than both driving directions put together. In terms of familiarity with modern cars, my previous daily driver was a 1997 Ford Escort, which is probably less sophisticated than some 2024-model mopeds out there — gas pedal, brake pedal, speedometer and gas gauge, and not a whole lot more. Crank windows!

Lane-keeping seems to use video (probably mounted in the rearview mirror assembly), while adaptive cruise and the “front safety features” rely on a radar transceiver hidden behind a black plastic plate mounted underneath the front license plate. Coming back home through a snowstorm, I learned that this radar panel is prone to collecting snow and slush, and with enough snow built up, the radar stops working.

When this happens, the Niro throws a bunch of errors, disables the “smart cruise” features — and unfortunately, it doesn’t let you fall back to an old-school (“stupid?”) cruise mode, where the car simply maintains a set speed. Lane-keeping still works, but until you stop and clear off the snow, you’re stuck controlling the car’s speed manually with the pedal like it’s still the 1900s. (I’m guessing the lawyers didn’t let them run the cruise control in degraded mode since this might be confusing to drivers.)

Fortunately, on a long road trip, your next charging stop is never very far away, and once the radar plate is once again clear of snow, you’re back in 2024 flying your short-range spaceship. And at least you can run the heated seats and climate control while charging.

I love living in the future. I just wish it would charge a little more quickly.

Posted in High Voltage, Power, Reviews, Toys | Tagged , , , , , , , , , | Leave a comment

Mini Museum: Arduino Uno

The Arduino Uno has been an important part of the electronics hobbyist scene its release in 2010 (as a refinement of earlier boards such as the Arduino Duemilanove.)

A typical Arduino Uno R3 microcontroller board.

I picked one up in 2011 to see what this new “Arduino” craze was all about, and discovered what is still to this day the easiest way I’ve found to get a microcontroller-based whatever up and running. The Arduino IDE, and especially the included libraries and example sketches, make programming as easy as it gets (at least, for the era before LLMs could plausibly write most simple sketches for you.)

Due to its popularity over the past fourteen years or so, the Uno is still somewhat relevant in the Maker community, although it is inevitably being replaced by newer boards such as Espressif’s ESP32. But the IDE and libraries have proven so popular and easy to use that even newer boards like the ESP32 can be readily programmed in the Arduino IDE, once you have downloaded and selected the appropriate core.

The example in the Museum is a garden-variety Arduino Uno R3 board — the “default” model of Arduino. If someone talks about an “Arduino” project and doesn’t specify which board they used — it’s a good bet it’s this one. The Uno is, at least currently, the poster child for all things Arduino, and it deserves its small but important place in the Museum.

Working with a 16MHz, 8-bit microcontroller with 32kB of Flash in 2024, on a workstation with an AI-capable GPU with over a thousand cores does seem quaint — but the Arduino ecosystem (mostly, the libraries) was and is absolutely a revolution in hobby electronics.

Arduino Uno specs:

  • Microcontroller: AVR Atmega328P (20MHz, 8-bit, 32kB flash, 2kB RAM, 1kB EEPROM)
  • Operating voltage: 5V (USB, or 7-12V DC supply via onboard regulator)
  • Analog input pins: 6 (A0 through A5; these can also do basic digital I/O)
  • Digital I/O pins: 14 (6 capable of PWM output)
  • Interface: USB-B
  • Compatibility: Windows / Linux / Macintosh
Posted in Arduino, C, Coding, Digital, Electronics, Mini Museum, Tools, Toys | Tagged , , , , , , , , , | Leave a comment

Components: Capacitors

Capacitors: More Than Just Stored Charge

Capacitors are everywhere in modern electronics, from tiny capacitors on microprocessor boards to the massive ones that help start large motors. They are essential components, often taken for granted, yet understanding how they function can give us insights into everything from power smoothing to signal processing. In this post, we’ll explore the fundamental properties of capacitors, their behavior in circuits, and some practical applications.

Various types of capacitors. (Image: Wikimedia)

Basic Mathematical Model: How Capacitors Work

At its core, a capacitor is a device that stores electric charge. It consists of two conductive plates separated by an insulating material (the dielectric). When voltage is applied across these plates, positive charge builds up on one plate, and negative charge on the other, creating an electric field. The amount of charge a capacitor can store per volt applied is called capacitance, measured in farads (F).

Capacitors Oppose Changes in Voltage

A key property of capacitors is their ability to oppose rapid changes in voltage. This property, related to the equation I=C*dV/dt, means that when a voltage across a capacitor changes, the capacitor either charges or discharges to oppose this change. In other words, capacitors “smooth out” sudden shifts in voltage, which makes them valuable in both DC and AC applications.


Capacitor Behavior at DC and AC

Behavior at DC

In a DC circuit, once a capacitor is charged to the applied voltage, it essentially behaves like an open circuit. No more current flows, and the capacitor simply stores charge. This is why, in many DC applications, capacitors are often used for energy storage or smoothing, as they can provide short bursts of power when needed but do not continuously conduct current.

Behavior at Increasing Frequencies

In AC circuits, capacitors act very differently. As the frequency of the AC signal increases, capacitors allow more current to flow. This behavior is due to their impedance, which decreases with frequency, given by Z=1/(jωC), where is the angular frequency. This property makes capacitors useful for filtering applications, as they can “pass” higher frequencies and “block” lower ones.


Basic Uses of Capacitors

Power Decoupling: Filtration and Smoothing

One of the most common applications for capacitors is in power decoupling. In digital circuits, especially where microprocessors and other ICs are present, there are often rapid fluctuations in current demand. Without decoupling capacitors, these fluctuations can lead to noise on the power supply lines, which can disrupt the operation of sensitive components. By placing capacitors across the power supply, these spikes in demand can be smoothed out, as the capacitors act as local charge reservoirs.

AC Coupling of a Signal

Another vital use for capacitors is in AC coupling, which is essential for isolating the DC component of a signal. In audio circuits or amplifiers, capacitors are often used to “block” any DC bias while allowing the AC (signal) component to pass through. This is commonly referred to as “capacitive coupling,” and it ensures that each stage of a circuit can be biased independently while still passing the signal along.


Sample Circuits Featuring Capacitors

Let’s look at a few practical circuits that demonstrate how capacitors are applied:


  1. Low-Pass Filter: One of the simplest applications of a capacitor is in a low-pass filter, where it’s paired with a resistor to create a circuit that allows only low frequencies to pass while attenuating higher ones. In this case, the capacitor blocks high-frequency components, acting as a filter to remove noise or unwanted high-frequency signals.



  2. RC Timing Circuit: Capacitors are also crucial in timing circuits. When combined with a resistor, the time it takes to charge or discharge a capacitor can be carefully controlled, creating predictable delays. This concept is essential in applications like timers and oscillators, where precise timing is needed.



  3. Decoupling Network: For digital systems, capacitors are often placed close to ICs in parallel with a power supply line to act as decoupling capacitors. By filtering out transient voltage spikes, they ensure the ICs receive a stable power supply.



Additional Capacitor Considerations

Capacitor Types and Their Applications

Not all capacitors are created equal. Depending on the application, you might encounter ceramic capacitors, electrolytic capacitors, tantalum capacitors, and more. Each has unique characteristics and is suited to specific tasks. For instance, ceramic capacitors are generally used for decoupling due to their low equivalent series resistance (ESR) and stability, while electrolytic capacitors are often preferred for bulk storage in power supplies due to their high capacitance values.

ESR and Leakage

A capacitor’s equivalent series resistance (ESR) is another important factor, particularly in high-frequency applications where lower ESR capacitors are desirable for efficiency and stability. Additionally, capacitors aren’t perfect insulators and often exhibit leakage, where a small current continues to flow through them even when fully charged. This leakage can be significant in sensitive circuits and should be accounted for during design.


Conclusion: Small but Mighty Components

Capacitors may seem simple at first glance, but their unique properties make them indispensable in nearly every branch of electronics. Whether they’re being used to smooth out power, couple AC signals, or provide precise timing, capacitors are essential tools in the engineer’s toolkit. Understanding their behavior and how they can be used to manipulate signals or control power can deepen your appreciation of both the versatility and elegance of electronics.

This article was coauthored by GPT-4o.

Posted in Components, Electronics | Tagged , , , , , | Leave a comment