Wednesday, August 14, 2019


Here is my  python script. Let me know if you have any ideas why it crashes when log_data() is called?

import time
import serial
import smtplib

from email.message import EmailMessage

def log_data(filename, line):
    file_handle = open(filename, 'a+')

print('Hello World!')

ser = serial.Serial(


    kludge = 0
    while True:
        data = ser.read_until('\n', 120)
        if kludge > 2 and len(data) > 12:
            log_data('log.txt', data)
            parse = data.split()
                  + ' ' + parse[1]
                  + ' Amps ' + parse[8]
                  + ' ~ ' + parse[9]
                  + ' Volts ' + str(int(parse[10]) * 9.0 / 5 + 32)
                  + ' ~ ' + str(int(parse[11]) * 9.0 / 5 + 32)
                  + ' degF')
        kludge = kludge + 1

except BaseException:

    # email logged data before quitting
    print("Emailing data...")
    textfile = 'log.txt'
    with open(textfile) as fp:
        # Create a text/plain message
        msg = EmailMessage()

    msg['Subject'] = 'The contents of %s' % textfile
    msg['From'] = ''
    msg['To'] = ''

    username = ''
    password = 'oEkyla12345'

    # Send the message via our own SMTP server.
    s = smtplib.SMTP('')
    s.login(username, password)

    print('Blow up the spacestation!')


Tuesday, August 13, 2019


I found a use for an old Raspberry Pi I had. I paired it with a small LCD display and wrote a Python script to poll the BMS for battery data.

I added WiFi to it and now I can SSH into it from my phone to monitor my charge without having to go outside.

My goal is to have the Pi write the data to a file and email it to me when it detects WiFi.


It is getting hot this summer. The AC is working like a champ. I've run out of charge a handful of times over the past 6 years. Each time it was due to my charger turning Off due to high temperature. The model I have appears to need to be reset to recover from this condition. However, if I don't pay attention I do not notice that I'm heading out with less than full charge.

I picked up a Manzanita Micro PFC20 charger with forced air cooling. It's the green box at the bottom of this picture. The previous charger only had fins for cooling.

Sure enough, this charger overheats as well. At least it continues to charge, only at a lower rate. The BMS is wired to give it the Off signal when charge is complete. This charger will half my charge time, in the winter at least. 1 hour of charge per ~12 miles.

My water cooled motor controller is overheating as well. I may need a bigger radiator.

My battery has been at 120 degF by the time I get home from work lately.

Monday, June 24, 2019

disc flexin' once again

I'm now on my 5th flex disc in just under 6 years. The Meyle brand lasted almost 1 year. That's an improvement from the last candidate. Again I'm switching brands, finding one that is slightly more expensive this time.
I'm beginning to believe the issue is the high starting torque of the DC motor. I don't use 1st gear because it is very jumpy. I start out in 2nd gear and usually nail it.
I can tell the unit goes under a lot of force. The grade 5 bolts in the pic below were new 1 year ago. Notice how a shoulder has been worn on the ones at the bottom. I lost the 8th bolt on a turn, that's how I knew it was time to swap a new one in.

mirror failure

My driver's side mirror fell off underway. I was able to turn around and retrieve it. The part that it holds onto the door with had worn away and no longer provided a purchase.
I fabricated a replacement for this part in aluminum and made a gasket from inner-tube.

Monday, October 22, 2018

patching a hole where the rain gets in

The carpet on the driver's side is always wet when it rains. I pulled it back to see why.

It's a bit perforated. I found a sheet of metal in my scrap and cut a patch for it.

Wednesday, October 17, 2018

5 year aniversary

This post marks my 5 year anniversary! 25,000 miles total. No battery issues! I estimate I have saved $3250 worth of gas at $2.60 per gallon, have paid $832 in electricity at $0.10 per kWh, and have 458 cycles on my battery.