Instantaneous power monitor

This project has been create to measure the power of an accellerating vehicle on a level surface.There are other means of doing this namely the gtech pro. However, I prefer to use a direct and accurate measurement of RPM and Speed using the sensors from the vehicle.

The equations for calcualting power are will know and can be found in physic literature. However all thatis need is the mass of the vehicle ,the speed, and the accelleration. The power is the product of all of these i.e POwer = Force * Mass * Speed.

Even though a vehicle is not accellerating it requires power to maintain a partuclar speed. This is due to air resistance which is affected by the co-efficient of drag and frontal area. The force acting on the vehilce is proportional tothe square of the speed. THerefore at high speeds the force can increase drastically.

A correction factor also has to be applied to the power as varying temperature, atmospheric presssure will cuase different power readings.The correction fact called t he sae correction factor ensures that power readings due not change due to environmental conditions.

The monitor will display RPM,Speed,Distance travelled,power,torque and acceleration. It will graph power in real time and log RPM and Torque. A graph of Power can be drawn afterwards by a click.

The heart of all of this is a adxl202 accelerometer connected to a microcontroller.The accelerometer generates a duty cyle proportional to acceleration.The microcontroller just calculates the high pulse and theperiod. It then send this information to the PC.The RPM and speed and idstance values from the sensor are also sent. All of the calculations are done on the pc side.

Speed is determined by calculating the number of spark pulses in 1 second. An opto-isolator connected to the coil send pulse to the microcontroller. A speed sensor also sends pulses to the controller. 4 pulse is equal to one revolution.

An inbuilt VB timer start counting when 1 meter has passed and stop when a quarter mile has finished

Buttons have also been added to control the microcontroler.This is very powerful as this allows the pc to control external event via the controller.

Shown below is the monitor in testing.The bread board at the top goes to the coil.This is an opto-isolator which simply converts the pusles from the coil into a nice five volt pulse without any nasty noise signal from the car. There are two spark pulses every revolution. The micorcontroller counts the number of pulse in 1 secdond and sends it to the pc. The pc calculates the rpm as rpm = number of pulse * 30 .

An onboard timer interrupts every 10ms.5 interrupts are noted and this is used to count the frequency of the acceleraometer.If using an LCD display to display acceleration. When all of the processing power is at the pc the lenght of the high pulse and the length of of the low pulse is sent to the pc. The Pc then calculates the acceleration based on the duty cycle..

The small circuit on the white bread board is the accelerometer. Its a dual axis accelerometer which produces a duty cycle in relation to acceleration.

The pic shows the measured rpm will the car is idling.The next step will be to test the speed sensor input.Once RPm is an integral part in the calculation of torque.

 

The above Rpm can be compared to the actual reading and as can bee seen is dead accurate.To increase the response of the rpm component a 500ms interval should be used in stead of the 1 second. However the resolution drops.This is why rpm is usual measured using variable reluctance devices which have resolution down to 1 rpm

 

Lets talk about speed and how to measure it. The speedometer cable goes to the instrument panel. It spins some magnets which are in the vacinity of a reed switch. The swich goes on an off 4 time each revolution.

The next step is to measure the circumference of the wheel.I measure 1.82 meters. The controller connects to the speedsensor output using a zener diode to keep the voltage at 5 volts.The controller measures the number of pulses in 1 second. Lets say I got 40 pulses in 1 second.Then the wheel would have made 10 revolutions in one second. Which is 18.2 m/s or 65.5 Km/h. 1meter per second = 3.6kilometers per hour

Success Measuring Speed.The speed shown on the pc is withing 5km/h of that on the speedometer.Once the circumference of the tyre is measured accuratelty the speed indicated by the power monitor will be accurate.

An off shot of measuring speed is the measurement of distance travelled. The number of revolutions in one second is used to calculate speed. At the end of one second the number of revolutions is added to a running total. This running total is used to calculate the distance travelled

 

Above is the completed prototype with a few design mistakes which have been corrected for the next design. A pic 16f877a running at 20mhz can be seen. A five volt regulator is on board. On the top right an opto-isolator whose function is to convert the spark pulses atthe coil to five volt pulses to measure rpm. In the vecinity is a a zener diode to generate pulses for speed. Near the top left id the accelerometer and on the rigth a db9 connector for communicating with the pc. This is done using a max232 chip at the bottom left

 

 

Another mistake was the spacing for the adxl202eb

 

The db9 connector is facing up deu to an error in the pcb design.