<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Aphid EV</title>
  <link href="https://bladlus.se/feed.xml" rel="self" type="application/atom+xml"/>
  <link href="https://bladlus.se/" rel="alternate" type="text/html"/>
  <id>https://bladlus.se/</id>
  <updated>2026-05-18T00:00:00+00:00</updated>
  <subtitle>Converting a 1961 VW Beetle to electric drive using a Nissan Leaf drivetrain. Build log and research notes.</subtitle>
  <entry>
    <title>Two years and a static site generator</title>
    <link href="https://bladlus.se/blog/aphid-migration/" rel="alternate" type="text/html"/>
    <id>https://bladlus.se/blog/aphid-migration/</id>
    <published>2026-05-18T00:00:00+00:00</published>
    <updated>2026-05-18T00:00:00+00:00</updated>
    <author>
      <name>lhelge</name>
    </author>
    <summary type="text">An overdue update on the project — and an explanation for why the build log has been quiet for the better part of two years.</summary>
    <content type="html">&lt;p&gt;Two years ago today I published &lt;a href=&quot;https://bladlus.se/blog/aphid-project/&quot;&quot; class=&quot;wikilink&quot;&gt;the first post&lt;/a&gt; on this
blog and laid out a plan: take a 1961 VW Beetle, drop in a Nissan Leaf
drivetrain, and document everything along the way.&lt;/p&gt;
&lt;p&gt;I had a lot of momentum at the start. Then… I went quiet. Sorry about
that.&lt;/p&gt;
&lt;h2 id=&quot;what-happened&quot;&gt;What happened?&lt;/h2&gt;
&lt;p&gt;Short version: life happened. This was never going to be steady,
consistent work towards a road-legal vehicle — it will likely take many
years, maybe even a decade. Things get in the way. The longer the gaps,
the more important it is to document what we’re doing so it’s less
tedious to pick the project back up.&lt;/p&gt;
&lt;p&gt;Once coding agents started getting good, I began building all kinds of
tools for myself. One was a Markdown note-taking app to replace Obsidian
at work, and that’s where I learned how powerful Markdown parsing can
be. From there an idea started forming: replace the Aphid EV Jekyll
site with something better suited to my writing — split between a
build log and a research wiki, and resilient to the occasional
two-year hiatus.&lt;/p&gt;
&lt;p&gt;I really liked the workflow of a static site generator building the
site straight from a GitHub repo; I just wanted it to work a bit
differently from Jekyll. I looked into Hugo, which seemed flexible
enough to do what I wanted, but I couldn’t find a theme I liked.&lt;/p&gt;
&lt;p&gt;I was fairly certain Claude and I could put together a working SSG over
a weekend or two. The real tipping point came when I tried Claude
Design — that was definitely the missing piece for putting together a
nice-looking theme on top of it.&lt;/p&gt;
&lt;p&gt;Here we are. If procrastination has a peak, I’m fairly confident I just
found it.&lt;/p&gt;
&lt;h2 id=&quot;so-what-is-aphid&quot;&gt;So what is aphid?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://bladlus.lhelge.se&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Aphid&lt;/a&gt; is a small static site generator
I wrote specifically for this project. The Beetle is already called
&lt;em&gt;Aphid&lt;/em&gt;, the project is full of leaf-eating jokes, and at this point it
felt rude not to keep the pun going.&lt;/p&gt;
&lt;p&gt;The previous site ran on Jekyll, which worked perfectly fine. I just
wanted something that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;treated the build log and the reference material as two different
things — a chronological blog up front, and a navigable wiki of
&lt;a href=&quot;https://bladlus.se/parts/&quot;&quot; class=&quot;wikilink&quot;&gt;Parts&lt;/a&gt;, components and decisions next to it,&lt;/li&gt;
&lt;li&gt;understood &lt;code&gt;[[wiki-links]]&lt;/code&gt; natively, so links to
&lt;a href=&quot;https://bladlus.se/wiki/inverter/&quot;&quot; class=&quot;wikilink&quot;&gt;the inverter&lt;/a&gt; or the
&lt;a href=&quot;https://bladlus.se/wiki/motor/&quot;&quot; class=&quot;wikilink&quot;&gt;EM57 motor&lt;/a&gt; get checked at build time
instead of rotting silently,&lt;/li&gt;
&lt;li&gt;built fast and let me iterate locally without thinking about Ruby.
&lt;em&gt;This site builds in less than 10 ms&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It now does, and the site you’re reading is the third one published with
it, at the new (proper Swedish) domain &lt;a href=&quot;https://bladlus.se&quot;&gt;https://bladlus.se&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;back-to-the-actual-project&quot;&gt;Back to the actual project?&lt;/h2&gt;
&lt;p&gt;The detour is over. The car still needs an EV conversion. The
&lt;a href=&quot;https://bladlus.se/wiki/vcm/&quot;&quot; class=&quot;wikilink&quot;&gt;DIY VCM&lt;/a&gt; still needs firmware. The &lt;a href=&quot;https://bladlus.se/wiki/batteries/&quot;&quot; class=&quot;wikilink&quot;&gt;battery pack&lt;/a&gt;
still needs cells. I’ll try to be a bit quicker with the next update —
no promises about how &lt;em&gt;much&lt;/em&gt; quicker.&lt;/p&gt;
</content>
    <category term="blog"/>
    <category term="aphid"/>
    <category term="meta"/>
  </entry>
  <entry>
    <title>The safety concept</title>
    <link href="https://bladlus.se/blog/safety-concept/" rel="alternate" type="text/html"/>
    <id>https://bladlus.se/blog/safety-concept/</id>
    <published>2024-05-31T00:00:00+00:00</published>
    <updated>2024-05-31T00:00:00+00:00</updated>
    <author>
      <name>lhelge</name>
    </author>
    <summary type="text">A short tour of how the Aphid is designed to fail safely — two redundant channels, one shared safe state, and a hard rule that no single fault is ever invisible.</summary>
    <content type="html">&lt;p&gt;Before any firmware gets written I want to be clear about how the car is
supposed to fail. There are two ways the Aphid can hurt someone:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The motor produces torque it shouldn’t — unintended acceleration or
braking.&lt;/li&gt;
&lt;li&gt;Something exposes the high voltage rails when they shouldn’t be live.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The convenient thing is that both are addressed by the same safe state:
&lt;strong&gt;open the battery contactors&lt;/strong&gt;. No HV at the inverter means no torque,
and no HV anywhere means no shock hazard.&lt;/p&gt;
&lt;div class=&quot;markdown-alert markdown-alert-important&quot;&gt;
&lt;p class=&quot;markdown-alert-title&quot;&gt;Important&lt;/p&gt;
&lt;p&gt;No single fault is ever allowed to cause a dangerous situation, and no
single fault is ever allowed to go undetected.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;motor-torque-control&quot;&gt;Motor torque control&lt;/h2&gt;
&lt;p&gt;That rule pushes the whole design toward dual-channel everything: two
accelerator sensors that have to agree, two pedal-supply lines that have
to land in spec, two microcontrollers in the &lt;a href=&quot;https://bladlus.se/wiki/vcm/&quot;&quot; class=&quot;wikilink&quot;&gt;DIY VCM&lt;/a&gt; watching each other.&lt;/p&gt;
&lt;p&gt;The accelerator and brake inputs are read by both the main MCU and the
monitor MCU and cross-checked. The monitor MCU also watches the EV-CAN
bus and verifies the torque the main MCU is actually requesting matches
what the pedal is doing. If anything disagrees, the monitor MCU drops
the high-side feed to the battery contactors and the car coasts to a
halt.&lt;/p&gt;
&lt;h2 id=&quot;the-interlock-loop&quot;&gt;The interlock loop&lt;/h2&gt;
&lt;p&gt;The high-side feed doesn’t just go straight from the monitor MCU to the
contactors. It runs through an interlock loop that also passes through
the lid switches on the &lt;a href=&quot;https://bladlus.se/wiki/pdm/&quot;&quot; class=&quot;wikilink&quot;&gt;PDM&lt;/a&gt; and the &lt;a href=&quot;https://bladlus.se/wiki/inverter/&quot;&quot; class=&quot;wikilink&quot;&gt;Nissan Leaf traction inverter&lt;/a&gt;, and through
the dashboard e-stop. Open any of them — service the drivetrain, hit the
big red button, or have the monitor MCU decide something’s off — and
the contactors drop.&lt;/p&gt;
&lt;h2 id=&quot;that-s-it-more-or-less&quot;&gt;That’s it, more or less&lt;/h2&gt;
&lt;p&gt;This blog post is the short version. The full reference, with the error
table and the definitions for “accelerating torque” vs “braking torque”,
lives in the &lt;a href=&quot;https://bladlus.se/wiki/safety/&quot;&quot; class=&quot;wikilink&quot;&gt;Safety architecture&lt;/a&gt; wiki page. The matching design constraints on
the VCM hardware are in &lt;a href=&quot;https://bladlus.se/wiki/vcm-requirements/&quot;&quot; class=&quot;wikilink&quot;&gt;VCM requirements&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Next up: actually starting on the firmware.&lt;/p&gt;
</content>
    <category term="blog"/>
    <category term="safety"/>
  </entry>
  <entry>
    <title>The Aphid project</title>
    <link href="https://bladlus.se/blog/aphid-project/" rel="alternate" type="text/html"/>
    <id>https://bladlus.se/blog/aphid-project/</id>
    <published>2024-05-18T00:00:00+00:00</published>
    <updated>2024-05-18T00:00:00+00:00</updated>
    <author>
      <name>lhelge</name>
    </author>
    <summary type="text">Kicking off an EV conversion of a 1961 VW Beetle using a Nissan Leaf drivetrain — and explaining where the name comes from.</summary>
    <content type="html">&lt;p&gt;The name &lt;strong&gt;Aphid&lt;/strong&gt; comes from the small bug that lives among the leaves of
plants. The Swedish name is &lt;em&gt;bladlus&lt;/em&gt;, which translates to leaf louse —
which sounds like the perfect name for when you combine the drivetrain
from a Nissan Leaf with a VW Beetle, or a Bug.&lt;/p&gt;
&lt;p&gt;I’ve learned from similar projects in the past that blogging about it is a
great way to document the work for myself. As an added bonus, I hope to
collect a lot of information around doing an EV conversion for anyone else
who’s interested.&lt;/p&gt;
&lt;h2 id=&quot;the-timeline&quot;&gt;The timeline&lt;/h2&gt;&lt;h3 id=&quot;history&quot;&gt;History&lt;/h3&gt;
&lt;p&gt;When I was a kid, my dad restored an old VW Beetle that he used to drive to
work. I remember riding in the back seat that didn’t have any seatbelts. I
remember the smell inside the car on a warm summer day. Most of all I
remember the very distinct sound of the air-cooled four cylinder boxer
engine.&lt;/p&gt;
&lt;p&gt;More or less since I graduated from university 15 years ago, I have been
working with electric vehicles in some form. All this time I’ve had an idea
that it would be really fun to make an EV conversion of an old VW Beetle.
It would be such a mindf**k to glide around in one completely silent.&lt;/p&gt;
&lt;p&gt;My younger brother is a much bigger car enthusiast than I am, especially
when it comes to old VW cars. A few years ago he managed to buy the exact
car we had when I was a child, even though he probably never rode in it.
Since then it has been parked in his barn waiting for a purpose.&lt;/p&gt;
&lt;h3 id=&quot;today&quot;&gt;Today&lt;/h3&gt;
&lt;p&gt;I recently turned 40, and as a birthday gift my brother bought me a used
Nissan EM57 motor with a very specific project in mind…&lt;/p&gt;
&lt;h3 id=&quot;future&quot;&gt;Future&lt;/h3&gt;
&lt;p&gt;This will likely take us many years before we have something that can be
used to drive around on public streets, if we ever get there. My plan is
at least to document this with as much detail as possible on this blog.&lt;/p&gt;
&lt;h2 id=&quot;the-plan&quot;&gt;The plan&lt;/h2&gt;
&lt;p&gt;The plan is to restore the car to a nice condition. In addition to that,
replace the internal combustion engine in the VW with the electric drive
unit from a Nissan Leaf but keep the original gearbox locked in 2nd or 3rd
gear. We want to do this in such a way that the car can be registered as a
modified vehicle and be road-legal to drive in Sweden.&lt;/p&gt;
&lt;p&gt;The donor components — see the &lt;a href=&quot;https://bladlus.se/wiki/motor/&quot;&quot; class=&quot;wikilink&quot;&gt;Nissan Leaf EM57 motor&lt;/a&gt; and the
&lt;a href=&quot;https://bladlus.se/wiki/inverter/&quot;&quot; class=&quot;wikilink&quot;&gt;Nissan Leaf traction inverter&lt;/a&gt; — come from a Gen 2 Nissan Leaf. The vehicle
control side is custom; see &lt;a href=&quot;https://bladlus.se/wiki/vcm-requirements/&quot;&quot; class=&quot;wikilink&quot;&gt;VCM requirements&lt;/a&gt; for what that module needs
to do.&lt;/p&gt;
</content>
    <category term="blog"/>
    <category term="aphid"/>
    <category term="vw"/>
  </entry>
</feed>
