Bug Update – Let’s get it started

I’m learning about cars through my 1974 VW Beetle. This is my initial report.

Condition when purchased

When I bought the car, it did not start. The battery was dead, and when we jump-started the car it would not run for very long. According to the owner the engine was fairly new, but had been sitting for close to 2 years. I had test driven so many of these cars that I could at least tell that the body was pretty solid. It had some minor rust spots but nothing major. Everything the owner had said was plausible. So I made a deal to have it towed to a garage, and base the price on what the mechanic’s inspection.

The mechanic confirmed almost everything the owner had said, with a couple exceptions. So we negotiated a price and then I had them fix those issues.

Current Condition

The mechanic gave me a summary of the issues to get the car running. I had them fix the minimum amount to get the car home.

The initial assessment:

  • Bad battery (immediately replaced)
  • Distributor and Ignition Coil
  • Bad gas from sitting
  • The ignition switch is very temperamental

For each part I replace, I plan to research and explain what it does. So I am learning about the car as I replace parts.

Everything we want to talk about in one picture

The Ignition Coil

An Ignition coil transforms the battery’s low voltage to a high voltage. This is required to create a spark for the spark plugs to ignite fuel. At it’s simplest form it’s an iron bar with 2 separate coils of wire wrapped around either end:

  1. The first, or primary wire is only wrapped around the iron a few hundred times
  2. The second, or secondary wire is wrapped around many thousands of turns more

When an electric current (from the battery) is passed to the primary, a magnetic field is generated. The field stores the energy and it builds up. When the current in the primary is interrupted, it transfers its energy to the secondary coil. This causes a spark to jump across the air gap between them.

As stated earlier, this spark is what is needed to ignite fuel in the engine’s cylinders. You might remember that an engine has more than one cylinder. That’s where the distributor comes in.

Read more:

The Distributor

The Distributor transfers the high voltage from the coil to the correct cylinder. Since there is more than one cylinder in the car, it must “distribute” the voltage to the correct cylinder at the correct time.

This is done with a rotor system spinning inside the cap of the distributor. There is a contact inside for each cylinder. As the rotor spins past each contact, the electrical pulse is transferred to this contact. This transferred pulse is sent to the spark plug attached to the correct cylinder.

As you can imagine, the timing of this process is very critical. These parts will wear out because of the high voltage involved. Weird things start happening when the timing is off. When you get a tune-up, one of the things they will replace is the rotor and wires.

In modern cars they do not use distributors anymore to distribute the energy from the coil. Instead they use smaller coils – one for each spark plug or one coil for every 2 spark plugs.

I thought it was interesting that in cases where 1 coil serves 2 spark plugs, they use a technique called “wasted spark”. The coil generates 2 sparks per cycle to both cylinders. Yet, only one works to ignite fuel, the other is wasted since the cylinder isn’t ready.

Read more:

Bad gas

How does gas go bad? It has to do with the complicated recipe used to make it. I’m going to gloss over the details, but it’s a somewhat interesting process. I recently watched an episode of Modern Marvels about gasoline. I would recommend you do anything else than watch a TV show about gasoline. But if you’re bored you might find it interesting.

If you store gas for too long, the mixture tends to break down. Some hydrocarbons evaporate out of the gas. Heat, oxygen, and humidity also influence the mixture. After time it starts to form solids called gum, which can start blocking the fuel lines.

Read more:

Getting rid of bad gas

It may not be enough to drive off the bad gas – the fuel has left deposits all throughout your system. Water may be present from heat changes and humidity. Water will separate from gasoline, and it’s bad for engines. For example. it can freeze in supply lines as low temperatures.

You could have the old gas flushed out of your system, but it is an expensive process.

A cheaper method is to use a fuel additive, such as a product called Seafoam. It will clean the fuel system of fuel deposits. It seems to have a solid fan base of people who swear by it. There are other brands that do the same thing, and I’m not interested in promoting one product. The term “fuel additive” is a vague term, there are other additives that have different benefits. So I’ll use the terms “fuel additive” and “Seafoam” interchangeably.

How do fuel additives work?

It is not easy finding how an additive like Seafoam works. I found some people who try to make a home-brewed version. I have no interest in making my own additive, but it was helpful to understand how it works.

The mixture of the additives are 3 basic ingredients:

  1. Pale Oil – a kind of mineral oil that assists in lubrication
  2. Naphtha – a liquid hydrocarbon mixture that assists with cleaning. It has a variety of uses, such as kerosene or to dilute heavy crude oil when shipping. I believe it helps clear gum and varnish by diluting them, and by making the gas burn a little hotter
  3. IPA (or Isopropyl alcohol). It’s a drying agent. It causes water in gasoline to become soluble, and will be consumed with the fuel when burned.

How to remove bad gas

This is the process required for cleaning my fuel system:

  1. Replace your fuel filter
  2. Add some fuel additive, such as Seafoam, and fill the tank with a high-octane gasoline
  3. Run through the tank
  4. Add more Seafoam, re-fill the tank with high-octane gas, and replace the fuel filter
  5. Run through the tank again
  6. Re-fill the tank with normal gas, and replace the fuel filter

Essentially you run through two tanks of fresh gas, replacing the fuel filter in between each tank.

Read more:

Fuel filter

The function of a fuel filter is straight forward. It’s attached to your fuel line between the fuel tank and the engine. It keeps dirt and other large particles out of your engine.

The ignition switch

I’m living with it for now, but it is rather temperamental. While trying to start the car, I may need to wiggle the key, sit and wait, or recite poetry.

There is a chance that the real issue is that the car sat for so long. It may only need to be driven for a while and the ignition will work itself out fine. We will see.

Lego Saturn V Rocket

Picture of reading Lego instructions

We finished our Lego Saturn V! Just in time to celebrate the 50th anniversary of the moon landing.

I like to pick projects to do with my kids. Sometimes it’s just a puzzle, and other times it has been Lego. This was one of those projects.

You can find a ton of reviews for this set online, and it seems like I am the last person to complete the set. The reviews are true – it’s a great set, well thought out, and very large. You can even add some lights and sound if you want.

Motivating your family

I have found my kids don’t necessarily want to do something if I ask them. Instead, I have had a lot of luck just starting a project in a common room, and they kind of gather on their own. For instance, I’ll start a puzzle and pretty soon someone shows up. They usually start by asking me what I’m doing. They might make fun of it. Soon they start watching. Then they start helping me. Coincidentally, this also works on my significant other 🙂

How to find one

These sets used to be hard to find, but that doesn’t seem to be the case anymore. If you are having a hard time find this set or another set like it, there are some websites that will alert you when a set is back in stock. In hindsight, I probably could have waited longer for a used set to show up online.

If you are looking to save a little money, you might do well to find a used set. For me, I was only interested in the rocket – I did not care too much about the lunar lander and stand. If I would have waited an extra year I could have saved a lot of money. You might do well to find a set that is missing some of these accessories. At least for me, tracking down missing parts can be part of the fun of constructing a set.

Here are some other Lego projects I have worked on:

Using Arduino to ignore button presses

arduino diagram

How I programmed an Arduino to accept a button press and then ignore subsequent button presses

I am working on an art project that involves a button. The button will start the device, but ignore any extra button presses for a set amount of time. This post focuses on my small journey, and a few things I learned along the way.

My Background

I have a very basic knowledge of electronics. I have an Arduino starter kit, and I played around with the tutorials until I understood the basics. After that I moved on. I figured I could always pick it back up again if needed.

The Requirements

  • Start a garage door opener (I’ll refer to it as the “opener” from now on)
  • Use the opener’s wired-button terminals/leads/pins to control it. These are the same leads that you would use hook up to a button on the wall in your house to use your garage door opener.
  • The opener has 2 terminals/leads – if they touch together, the opener will start
  • Use a button to communicate with the Arduino. It will decide if it should (or should not) use those terminals to start the opener

Hardware

I need 2 buttons: One to communicate with the Arduino, and the other one controlled by the Arduino. To do this I need something called a Relay.

What’s a Relay

A Relay is a fancy switch that is controlled by electricity. It does this with an electromagnet. Imagine a light switch – you add some parts so that if you hold a magnet to one side, the switch will flip. Take the magnet away and the switch flips back off. Wrap that into a box and you have a relay.

  • If no electricity is running to the Relay, then there is no magnet. The switch is off
  • If electricity is running to the Relay, then the electromagnet is on. The magnet attracts the switch to the other side and turns the switch on

You can hear a Relay when it switches. It makes a distinct “click” noise. You find them in a lot of everyday things, like your windshield wipers.

That’s the basics. Yet there are a few more features:

  • The Relay can do the exact opposite. It can be ON when no electricity is running, and turn OFF when the electricity is on
  • Relays are used to operate high voltage electronics, while protecting sensitive equipment. The Arduino can only handle about 5 volts. It could never power a household light bulb. To do this you wire the light bulb with the full power, and use a relay to control that power. The Arduino is safely behind the Relay, protected from the high voltage.

A relay typically has 5 pins:

  1. Input 1: the positive (+)
  2. Input 2: the negative (-)
  3. a common (or COM): this is one half of the thing you are switching
  4. Normally Closed (or N/C): when power is on, the switch is on
  5. Normally Open (or N/O): when power is off, the switch is on

I read a couple articles before this started making sense to me. This one helped me the most: https://www.instructables.com/id/How-Electronic-Switches-Work-For-Noobs-Relays-and/

My Relay

My Relay had no labels and looked different from most of the tutorials. I figured it out by connecting a couple alligator clips to a 9v battery. After connecting them to the pins on the relay, I listened for the click of the magnetic switch. After that I used my volt meter to determine which pins were Normally-Closed and Normally-Open.

The hardware layout

Relay Setup:

  • I connected my ~5 on the Arduino to one pin on the relay, and 5v on the Arduino to the other pin
  • The Common (middle) lead connects to one terminal on the garage door opener
  • The N/C (Normally Closed) pin connects to the other terminal on the garage door opener

Button Setup:

  • The button setup is like all the other button tutorials
  • I connected ground (GRD) on the Arduino to one end of the button
  • I connected ~9 on the Arduino to the other end of the button
My first time drawing a diagram in fritzing!

The Code

Intended behavior:

  1. When the button is pressed (or LOW) on ~5, I trigger a “button press” using the relay for the garage door opener (it starts)
  2. I then run a delay for a set amount of time
    • the delay allows my code to ignore everything until after the delay has finished

Quick notes:

  • I use the built-in LED on the Arduino to show when it is ignoring button presses (LED_BUILTIN)
  • I write debug messages to the serial. Not a big deal but it makes the code a little more busy looking
/**
 * Ignore button presses after accepting the first, for a set amount of time
 * Jason Jerome
 */

int gDoorPin = 5;
int buttonPin = 9;

String msg = "seconds to wait: ";
int secondsToWait = 20;

void setup()
{
  Serial.begin(9600);
  pinMode(LED_BUILTIN, OUTPUT);
  pinMode(gDoorPin, OUTPUT);
  pinMode(buttonPin, INPUT_PULLUP);

  digitalWrite(gDoorPin, HIGH);
  Serial.println("Hi - ready");
}

void loop()
{
  if (digitalRead(buttonPin) == LOW)
  {
    Serial.println("button pressed");
    digitalWrite(LED_BUILTIN, HIGH);

    startOpener();

    Serial.println(msg + secondsToWait);
    delay(secondsToWait * 1000);

    Serial.println("done - ready for more");
    digitalWrite(LED_BUILTIN, LOW);
  }
}

void startOpener() {
  Serial.println("gDoor - activating");
  digitalWrite(gDoorPin, LOW);
  delay(500);
  digitalWrite(gDoorPin, HIGH);
}

Here’s a video of it in action:

This has been a fun project so far. I’m very happy to have most of the electronics figured out so early in the process. I can now move on to designing and building the other parts!