HackerGrant Project Report: I.V.A.N. In Vehicle Alarm & Notification

Overview

Every year, around the world, vehicles of all shapes and sizes are travelling our motorways, tollways, interstates, or just local streets.  Over these roadways, many overpasses and bridges, span the traffic below.  Most bridges have signs on them, clearly stating the clearance height.  A calculation of whether the vehicle you are driving, is higher or lower, than the bridge/overpass you are approaching, sounds like a simple thing to do, but many reasons stop this from happening, with catastrophic results.  The driver might not remember that the trailer they are hitched to, is over height. The bus driver might forget that today he is driving a double decker.  It is easy to forget, after fatigue sets in from long hours on the road.  Another problem faced by truck drivers, is those that drive tip trucks.  The tray that they raise, to tip out their load, normally comes back down, once the correct button/lever is activated in the cab. Gravity takes over, and the tray comes down.  But when the button is not pressed correctly, the tray can stay in the upright position.  If the truck drives off with the tray raised, it is only a matter of time, before a normally under height truck, strikes a bridge, or other obstruction, because they have this tray still sticking up in the air.

The In Vehicle Alarm & Notification system (IVAN) is designed to monitor not only the trailer/tray for height and angle, but also to listen for beacons to advise of important information, including height of bridge and maximum weight on a bridge.  The height and weight of the vehicle is entered into the dash mounted client hardware, and when the warning information is received, it is displayed.  If the warning information exceeds the settings for the vehicle, an audible warning is also generated.  This audible warning, means that the driver does not have to think about am I too high or too heavy for this bridge, and jog them into action.

Current, external warning system, that use beams across the roadway, or that use hanging girders or other hanging devices, to try to warn the driver that they have breached the height, do not have the desired effect.  Beams are inefficient in fog, snow or rain. The girders/hanging devices are meant to make enough noise to alert the driver that something is wrong, but this fails for many reasons.  The time it takes for the driver to realise that the warning is directed at them, is sometimes too long, and has little to no effect.

Thanks to funding from Advance Queensland, and Gold Coast Techspace’s Hacker Grant project, funds were provided to develop the IVAN system, and to bring it to a working model.

Goals

To devise a system of notification to Trucks and other over height vehicles, utilising ESP8266 or similar devices, before damage occurs by collision with a low structure, to truck and/or structure.

Module on Bridge advises height, or 2 modules, 1 on each approach.

Module on Trailer – to advise known height of trailer.

Module in Truck Cab providing warning. Receives information from Bridge AND trailer, and uses this information to generate a warning. (a visual LED, but this could be expanded upon at a later date – adding buzzer, graphic display).

Specifications

  1. WiFi Beacon with Solar Battery to allow 24/7 operation
  2. WiFi Dashboard Client for Vehicle
  3. WiFi Slave Beacon with Accelerometer for Trailers
  4. IVAN Communications Protocol for WiFi

Considerations

  • Compare the saved Height/Weight stored with the Client, with the data received from the Beacon.
  • Display the data, along with relevant messages, and warnings. Sound buzzer.
  • Client hardware (on dash) to be able to detect WiFi Beacon within a defined time (a vehicle travelling at 100 KPH (55 MPH) travels approx 29.8 metres per second).
  • WiFi signal attenuates over distance and thru obstacles
  • A Beacon located ON a bridge, would have to broadcast at least 250-400 metres, to allow for detection.

Milestones

Research

Using a web browser and Google, low clearance bridges and truck crashes were investigated.

It was quickly determined that this was a problem costing millions of dollars a year worldwide.

One laser beam notification system installed, costs over US$50,000, and the repairs to the bridges, and the labour involved, is a also a cost factor.

It was quickly determined that this was a problem that needed a solution. The IVAN system is one method.  

Not only low clearance, but overweight vehicles.  Tip trucks were also found to have a problem as well.

Design

A beacon/detector model was soon decided on.  A number of existing beacons were looked at, but were found to be overly complex in their protocol.  Due to the speed of detection required, to limit the distance travelled before the beacon was decoded, it was decide to use WiFI, specifically the ESP8266.  The ESP8266 is a WiFi Access Point, and Client device, in a low cost package (around $8).  By thinking outside the box, it was worked out that the speed of detection and decoding could be as low as 1 second.  This is good, as the vehicle would only have travelled around 30 metres before alarm indication.  To allow for the vehicle to take a bypass route, it was determined that the beacon/s would not be located on the bridge themselves, but on the approach to the bridge, and specifically, at least 100 metres before the last bypass/off ramp was reached.  Because the prime mover is not always hooked to the same trailer, a second beacon attached to the trailer, could be programmed with the trailer height within.  Once connected, this trailer would be selected from the list of available trailers visible on the Dashboard client, and locked in.  Similarly, if a tip truck, the second beacon would be attached to the movable tray, and send back angle advice in real time, to warn that the tray was NOT in the correct position.

Ordering Parts

Parts were initially ordered off AliExpress, but due to Chinese New Year, a number of unexpected delays were incurred. Ebay Australia was the next option, to at least get a few parts, so that coding and breadboarding of the design could start.  Parts were sourced from AliEpress, Ebay Australia, SuperCheap Autos, and Bunnings.  Miscellaneous hookup wires, and other electronic “glue” parts were also purchased.  It was found that some parts were only a few dollars dearer than sourcing from Ali Express.  As time was of the essence, ebay was used as well.

WiFi Beacon

Using a ESP201 and a Witty Cloud (node MCU clone), it was quickly determined that these designs impacted on the built in WiFI antenna, and therefore were not suitable for this project. Node MCU V2 (and V3) boards were obtained.  These proved to have better range. Testing will determine the final ranges that could be reached. The Beacon is supplied with 5V power to the nodeMCU board from a Solar Battery pack.  USB current draw, showed that the beacon is using 70-80ma when broadcasting, which is 100% of the time.  The Solar Battery arrangement was only providing 70ma, and therefore would not power continuously.  Further testing with Solar Battery arrays from Bunnings are required, to see if better results can be obtained.  But for demonstration purposes, these will suffice.

WiFi Dashboard Client Hardware

nodeMCU ESP8266 connected to a Nextion 2.4inch Touch LCD display.  Originally was just going to be the LED on the Witty Cloud, but these displays not only provide better feedback, they also allow for the required data input for configuration of weight and height, and any other settings required. Power is provided via USB Cigarette Lighter adapters when used in car.

WiFi Slave Beacon

Using a nodeMCU ESP8266 and a ADXL-335 accelerometer, the slave will broadcast it’s programmed ID and height, and real time angle data, to be received by the dashboard client.

Still under development.

IVAN Communications Protocol

The secret sauce – the normal WiFi mode of “joining” an AP, and swapping information via WebSockets, is NOT used here.  The time taken to join the AP, is too long, and the AP is limited to the number of simultaneous connections.  By encoding the SSID with specific data, the beacon is NOT joined, and therefore any client within range of the beacon, has all the required information, as soon as the SSID is detected.  

Testing

Dashboard client nodeMCU scans continuously for WiFi beacons, and once detected, can decode the required information in under 1 second.  Once cases are finished, and mounted, real tests at speed will be done, to prove the lab bench tests.

Conclusion

A number of working prototypes have been programmed, and the results were presented to the Gold Coast Techspace on the 25th May 2016. https://twitter.com/gctechspace/status/735401835037626368   

The basic theory works, and further work will continue, to refine the final product.

Many other ideas have been thought of from this project, and hopefully these, as well as the IVAN project, will go further.

Resources

Bill of materials

Part Supplier Quantity Cost each Sub Total
esp 201 ebay 1 $11.95 $11.95
Witty Cloud aliexpress 6 $6.83 $40.98
nodeMCU aliexpress 4 $6.73 $26.92
nodeMCU EBAY.COM.AU ebay 2 $19.20 $38.40
Nextion Display aliexpress 3 $25.98 $77.94
Nextion Display ebay 1 $30.10 $30.10
PLA for dashboard cases ALDI 1 $34.95 $34.95
3-35 down verter ebay 4 $1.95 $7.80
ADXL335 ebay 4 $2.50 $10.00
3Pack Cases Bunnings 1 $26.95 $26.95
WaterProof Case Bunnings 1 $18.25 $18.25
Bahn Solar Battery ALDI 3 $9.95 $29.85
Misc Wiring/Connectors Misc 6 $15.00 $90.00
Cigarette Lighter USB Adapters SuperCheap 3 $9.95 $29.85
Solar Panel/Battery Bunnings 3 $14.95 $44.85
M3 x 10 Nuts & Bolts (box 25 each) Nerang Bolts 1 $8.00 $8.00
Total inc Freight $518.79

Hours

Total hours so far – approximately 60 hours.

ivan1
Kitchen Table workbench, when away from Techspace.
ivan3
node MCU – featuring the ESP8266 WiFi modules. These last 4 are V3 boards, which are just a bit too big for the developer’s board.
ivan2
Nextion serial displays – these 2.4inch TFT displays have a Resistive Touch screen, and are programmed via a windows IDE. Multipage, and a quick way to create a GUI for all your switches.
ivan4
Working Beacon in a Waterproof case, powered by a Solar Battery pack.
ivan5
Using the Cocoon 3D printer to print the Dashboard cases.