Logan Bishop-Van Horn

Old Projects

Past Project: Electric Morris Minor Brake Light


My father is a British car nut. Not Jaguars and Aston Martins, but Morris Minors, Austin-Healeys, and the like. Nostalgic for the Morris Minor he drove in the '70s, he was intent on restoring a Morris to be an around-town car. My uncle, a retired engineer and machinist who had been getting interested in electric vehicles, offered to restore my dad's 1959 Morris Minor 1000 and convert it to electric.

My father's 1959 Minor 1000 before restoration. The car originally had a 37 horsepower engine.
The "eMinor" after restoration and electric conversion.

The vehicle is fully electric and has been driven nearly daily since August 2012. It is powered by 28 Lithium Iron Phosphate cells with a total pack capacity of 17.9 kWh. The battery pack can be charged on 110V/60Hz power. The vehicle's maximum speed is around 80 mph and the range is about 90 miles. More photos and information about the eMinor can be found on the EVTV Motor Verks electric vehicle registry (unfortunately you have to create a free account to view the registry) or this blog post from the EV blog "It's a Chevy Volt!".

Brake Light Project:

The regenerative braking on the eMinor is very strong, and unlike in some commerical EVs and hybrids, there are no features in place to moderate the regenerative braking to emulate coasting in an internal comdustion vehicle. This means that if your foot is not on the throttle the car is decelerating. In fact, it is possible to do most driving safely without ever stepping on the brake. This is obviously preferable in terms of recovering power while braking, but poses a safety issue since the brake lights are only switched on when the brake pedal is depressed.

To solve this problem, my sister (a biomedical engineer) I helped my father set up an acceleration-triggered brake light using an onboard Arduino Uno powered by a 12V car to USB adapter, and SparkFun ADXL335 three-axis accelerometer. The Arduino is used to close a mechanical relay to turn on the brake lights if the acceleration is sufficiently negative and open the relay if the acceleration is sufficiently positive. My father also installed an additional LED brake light in the rear windshield to supplement the rather dim and low-set fender-mounted lights.

Acceleration-triggered brake light for regenerative braking:
  Reads x-axis acceleration from ADXL335 on relayPin, 
    discards points that are due to automotive vibrations,
    averages sampleSize non-vibration points to reduce noise,
    turns on brake lights if averaged value is < xlimitLow (strong deceleration),
    turns off brake lights if averaged value is > xlimitHigh (acceleration) 

const int xInput = A2;
const int relayPin = 5;
// Take multiple samples to reduce noise
const int sampleSize = 20;
const int readingDelay = 10;

// 0 corresponds to -3g 
// 512 corresponds to 0g
// 1024 corresponds to 3g
int xlimitHigh = 521; // found via trial and error
int xlimitLow = 507; // found via trial and error
void setup() {
  //for debugging:

  pinMode(relayPin, OUTPUT);
  digitalWrite(relayPin, HIGH);
void loop() {
  int xRaw = ReadAxis(xInput);
  //Serial.println(xRaw); // for debugging   
  if(xRaw > xlimitHigh) {
    digitalWrite(relayPin, LOW);
  else if(xRaw < xlimitLow) {
    digitalWrite(relayPin, HIGH);
int ReadAxis(int axisPin) {
  // Read "sampleSize" samples and report the average
  long reading = 0;
  int i = 0;
  int thisReading;
  while (i < sampleSize) {
    thisReading = analogRead(axisPin);
    if (thisReading < 600 && thisReading > 400) {
      reading += thisReading;
  return reading/sampleSize;

The circuit and Arduino "sketch" (above) are very simple, but they get the job done. This particular accelerometer senses acceleration up to ±3g along each axis. This is not the best component for a brake light application since we only need sensing along a single axis and we never get anywhere near 3g. Thus we are only interested in a narrow range of the 1024 acceleration values provided by the Uno's ADC. The specific values that correspond to the bounds of "typical braking acceleration" were found by trial and error and are easily modified. The initial approach was as follows:

  1. ReadAxis(): Sample the analog output of the accelerometer with a given time delay between samples, and average over a given number of samples.
  2. If the average is below a certain deceleration limit (xlimitLow, strong deceleration), switch the relay to turn on the brake light.
  3. If the average is above a certain value (xlimitHigh, barely accelerating) switch the relay to turn off the brake light.
This approach was plagued by a rapid errant switching of the relay when the car was moving at a constant velocity. After some testing, I discovered this was due to sharp positive and negative in acceleration due to automotive vibrations. This problem was fixed by simply ignoring samples where the acceleration value is obviously outside the range we expect, changing step 1 above to:
  1. ReadAxis(): Sample the analog output of the accelerometer with a given time delay between samples, discard very large or very small values due to automotive vibration, and average over a given number of samples.
With this modification the system functions as desired and makes driving around town in the eMinor significantly safer.

Battery pack, controller, and battery management system for the eMinor, from "It's a Chevy Volt!".
[Updated: 7/2016]

Logan Bishop-Van Horn © 2019