Thursday, 22 November 2018

Final System

Final System


   Combining the previous steps together we came up with a final system that could sense the deceleration rate of a vehicle and pulse a set of LED's when the deceleration was higher than the pre-set threshold. The row of LED's simulated a high mound stop light of a vehicle. The prototype system utilized a normally open relay but a real world system would use a single pole double throw relay so that when no current was coming from the adaptive brake light circuit,it would be closed and the brake lights would work as normal.

This is our final prototype system assembled:

This system has a lot of room for improvement but this is what we came up with in the end. Due to legal standards in New Zealand the brake lights of a vehicle have to emit a solid light. However, hazard lights are a widely recognized signal for danger and are meant to flash. Therefore, if we were to put this system on the market we would be using the hazard light system instead of the brake lights. We would also used a small computer chip to control the system as it would only need to be programmed to run the system and then wired in. The system would also be contained in a small box with the appropriate power and relay wires exposed for installation. A level would also be incorporated on top of the box so that the installer can make sure the system is level and will operate as intended.

Sunday, 18 November 2018

Final Coding

Final Coding

   After determining the threshold figure from road testing we could now finalise the coding for the system. The aim is to get the system to print the values being read so that it can be monitored. We also want the system to flash the brake lights for 5 seconds if the readings drop below 290, and complete the circuit at all other times so that the brakes work normally. Since the sensor only dropped below 290 once during testing we figured that the flashing needs to be timed so that it will keep flashing even though the sensor may not still be reading below 290.




 The screenshots above show the coding with the functions also described in the pictures. The system is set to make pin 4 high at all other times because a normally open relay was used for demonstration purposes because we could not find a normally closed. This means the relay will be closed at all other times because it has power to it.



Saturday, 10 November 2018

Road Testing

Road Testing 


We had our code set up and now we needed to figure out what values the accelerometer gave under different braking loads. With the arduino board and accelerometer plugged into the computer I could see the values it was reading with the sensor value code and the "serial monitor" feature. The testing was done in a 1989 Honda EF Civic. My project partner drove at 50 km/h and braked to a stop 3 times, once at a slow rate, once heavy, and one emergency stop. I videoed the readings so that it could be reviewed and the threshold value determined. Below shows a screenshot of the lowest readings from the 3 different braking scenarios. When cruising at 50 km/h the sensor was showing reading around 340 for reference.


 This photo shows the values given under normal braking conditions. The lowest value given was 315.



















This photo shows the values given under heavy braking conditions. The lowest value given was 295.
















This photo shows the values given under emergency braking conditions. The lowest value given was 284.
















From this testing we determined that the threshold for when the brake lights should flash was below 290. we figured this would be accurate with most cars as well since the car we were using was quite old and had no ABS.

Final System

Final System    Combining the previous steps together we came up with a final system that could sense the deceleration rate of a vehicl...