Unfortunately, over the years the popular RPM sensor we have used on our DC electric motors are not longer in production. This has led me to be forced to create a solution to this important issue. A more cost effective solution is on the way. It is important to know that a physical RPM sensor needs to make pulses on the motor shaft, those pulses are then transmitted to the motor controller interface, and then it is the interface of the motor controller that actually drives the vehicle tachometer.
The idea is based around this small ring that is attached to the end of the shaft, which will spin when the shaft does. This ring has 4 magnets embedded inside it. Something was needed to detect when each of the four magnets came around to a point. This device is called a hall effect sensor, and more common known as a hall effect transistor. This transistor connects the signal wire to ground when there is presence of a magnetic field. This change can then be measured by a microcontroller that is monitoring the signal pin.
According to the manual, the interface of the motor controller states that the RPM sensor must "pull the signal wire low four times per revolution with approximately a 50% duty cycle" (Manzanita Micro Zilla Motor Controller Package and Hairball 2 Interface Owner's Manual). What this means is that exactly 12V must be pulled low (0V) 50% of the time via a square wave signal.
This can be accomplished through the help of a microcontroller that can output PWM, or Pulse Width Modulation. PWM is simply a square wave that is high (in this case 12V) a part of the time and low (in this case 0V) another part of the time. So in this case, it is simply high, or on, half of the time, and low, or off, the other half of the time.
Looking at the diagram below, you can get an idea about how Pulse Width Modulation works and the relationship the duty cycle plays in that. Also note, in the diagram below 'T' is labeled as the Period, which is one complete cycle.
The final design of this RPM sensor is as follows. The hall effect will monitor the magnetic field to detect whether one of the four magnets comes around on the shaft to the sensor. Next, when the microcontroller that is monitoring this hall effect sensor receives a signal that there is a magnet, the microcontroller will produce a PWM signal with a duty cycle of 50% and use an n-channel MOSFET transistor to connect the other signal wire (from the interface of the motor controller) to ground in accordance to the set duty cycle. Transistors allow us to switch circuits on and off incredibly fast, and in this case it will have to send this PWM signal out each of the 4 times the magnets come around on the shaft within one revolution of the motor. The motor can reach speeds of 5000+ RPM, so this little sensor will have to work extremely fast and efficiently.
Once the interface of the motor controller starts receiving this signal from our custom RPM sensor, it will send out another signal wire that will drive the tachometer sitting on the dashboard of the vehicle. This will allow the driver to easily glance over to monitor the RPM of electric motor.
The Lightning Bug features a custom vehicle display. This display provides the driver with the current being pulled out of the pack, state of charge, button for lightning mode button, speaker button, and temperature and humidity readings.
The current, which is similar to the power of your car, is sort of like how much of the accelerator you are applying, and how much power you are pulling out of the battery pack. This is really important because when cruising down the road, you will want to occasionally keep an eye on that so you can be as efficient as possible. This is measured via a 1000 amp hall effect current sensor. This is a sensor that goes over one of the high voltage cables, and then transforms the 0-1000 amps (A) to a scale of 0-5 volts (V). This info can then be read by the controller module of the display which processes this info on the 0-5V scale, and transforms it to 0-1000A on the screen, and also a visual representation on the gauge.
The battery management system, or BMS, monitors all of the cells in the vehicle and performs many calculations. One of the calculations it makes is the battery state of charge, or SOC. The BMS calculates the SOC and then outputs it on a scale of 0-5V so that the controller modules of the display can interpret this into a percentage, and create a visual battery "fuel" gauge.
The controller module of the display is outfitted with a high precision temperature and humidity sensor. This sensor is mounted outside the vehicle so that it can report the outdoor temperature and humidity for this display to inform the driver on startup and on one other menu screen.
The display is also outfitted with two buttons on the second menu screen. These two buttons are "Lightning Mode" and "Speakers". The "Speakers" button turns on the in-car bluetooth amplifier and allows the driver to connect to the car's speakers and start streaming music from their mobile phone. The next button, "Lightning Mode", when toggled on, will actually double the horsepower in the car! This is a very cool feature that allows you to turn your car into a super fast high performance mode.
Mounting components -- very critical to ensure that all components will handle the hard use of a daily driver and last in the test of time. In the lightning bug, there were numerous improvements when mounting the major components, such that they could easily be removed in minutes for service in case anything were to happen. I also wanted to use all stainless steel socket head allen screws because they look much more professional. But one component, did not receive the same "easy removal" installation. That was the DC/DC converter. In the Bug, all of the major electrical control components are mounted on a large aluminum plate which is then mounted in the back of the car, and the components are installed on the surface. The DC/DC converter, was mounted through the back of the large aluminum plate that everything else mounts to, so it had to be installed before the large plate was installed to the car.
The painful lesson came after installing every component to that large aluminum plate in the rear, the DC/DC converter seemed to be acting as if it was defective and it needed to be removed to be tested. I learned that unfortunately, I was not going to be able to get the converter off without taking apart all of the electrical components and all of their wiring apart. I knew that I had to make that component mount in such a way so that I never had to go through that again.
In the picture above, I got a thick piece of 1/4 inch aluminum and drilled the 4 holes that will mate up with the 4 mounting holes on the back of the converter. My idea was to use small socket head allen screws, and drill counter bore style holes as seen in the photo below.
After doing this to all 4 holes, I was able to simply bolt in the converter and make sure all screws were recessed from the surface and strong enough to hold the converter. This can be seen in the image below.
Next, I drilled the outer holes that will secure the convert-plate assembly to the car as seen below.
Mounting to the car:
In the above photo you will see the converter mounted in the car. All that was left to do was mark, drill, and tap the holes on the big aluminum plate on the car. Finally, I simply held the converter up with one hand, and then installed all four stainless steel socket head allen screws with stainless steel washers with it. This created a nice looking installation, and one that would allow me to easily remove it like every other electrical component in the rear of the car. It's fair game to say lesson learned for sure!