Sunday, September 26, 2021

8 years on the road

 32072 electric miles B-)

replace headliner and stuff

Remove glass to replace headliner. Fix some rust. 

this spot has had it coming for a long time

feels better now

helper is growing fast



rubber cement and binder clips all the way around
there are metal bows inserted in sleeves holding the middle up


interesting wind screen install using the "rope trick"

the silver strip goes in last to tighten the whole deal up

Wednesday, September 23, 2020

7 years

 Another battery-trouble free year of drivin'!


                            7 years

                            31800 gas free miles



Friday, December 13, 2019

fun accident

The other week dead at a green light, groping about for power, I realized over 5 long seconds that my main contactor had dropped out!

I'd just turned On the air conditioning loading the 12V system down below 10 - ah ha, my 12V battery must not be making good connection! My DC-DC converter can not run so many accessories alone..

I rolled a window down and made a smooth recovery with minimal honking behind.

Back home I confirmed my theory and began to clean the 12V battery connection. With the 12V battery cable in my left hand furiously working it with a wire brush it slipped falling upon the high voltage battery. Zap!

Bitten by my minimalist exposed high voltage battery design!

Death toll:
1 fuse
1 motor controller logic board
12V to 5V USB converter
at least 1 cell monitoring board..



The damage was repaired by Manzanita Micro and we should be on the road tomorrow.  :)

Thursday, October 3, 2019

Wednesday, August 14, 2019

python

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+')
    file_handle.write(line)
    file_handle.close()


print('Hello World!')

ser = serial.Serial(
    '/dev/ttyAMA0',
    baudrate=57600,
    parity=serial.PARITY_NONE,
    stopbits=serial.STOPBITS_ONE,
    bytesize=serial.EIGHTBITS)

time.sleep(.1)

try:
    ser.write('H\r')
    time.sleep(.25)
    ser.write('2\r')
    time.sleep(.25)
    ser.write('6\r')
    ser.reset_input_buffer()
    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()
            print(parse[0]
                  + ' ' + 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.set_content(fp.read())

    msg['Subject'] = 'The contents of %s' % textfile
    msg['From'] = 'chrisdarilek@gmail.com'
    msg['To'] = 'chrisdarilek@gmail.com'

    username = 'chrisdarilek@gmail.com'

    # Send the message via our own SMTP server.
    s = smtplib.SMTP('smtp.gmail.com:587')
    s.starttls()
    s.login(username, password)
    s.send_message(msg)

    s.quit()
    print('Blow up the spacestation!')


finally:
    ser.close()
    pass

Tuesday, August 13, 2019

pi

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.