Hot Box Detector HBD

I thought a functioning model of a talking defect detector would be a nice feature on the FREMO americaN meetings I regularly attend.
The HBD was designed for use with a handheld radio, which is what we use to communicate during our meetings. But you can connect any small speaker, or amplifier.


Features

The HBD features the following:

  • axle count
  • speed calculation
  • train length calculation in scale feet
  • random hot box generation with configurable percentage
  • configurable milepost
  • axle count, speed and length can be individually turned on and off
  • audio speech set can be downloaded within minutes
  • LCD display
  • keypad for fast reconfiguration (milepost, percentage, ...)


So, what would a detector message sound like? Here you can listen to a test message (yes, this is a recording from the actual prototype, not some precompiled stuff). This speech set was generated using the MacOS X speech generator, but you could also chop up real recordings.

How to program Downloads

How to load the audio files and configure

There are three PC programs available (see below) to get the HBD working. The first one named HBDwav2raw will take 20 wave files as input and produce a memory map to load into the Flash. The files must be in the following format:

  • Wave PCM
  • sample rate 16 kHz
  • 8 bit unsigned
  • mono


The files must be given specific names, which are listed in the program. The names should give you an idea about the content needed; 01_intro, for example, could be something like "SP detector". "18_hotbox" would be something like "Hot box on axle:". If you don't want to make your own set, there are some available below.

The second and third programs are named HBDFileReader and HBDInterface. They let you configure the detector and download the speech files. Let's take a look at the HBDInterface first:

In the lower part you can select a COM port. Connect the port and the detector's RS232 socket and use the buttons on the right to connect. The upper buttons allow you to establish a network connection to the FileReader. This stems from a CTC dispatcher software I used as a base. Normally, you should just hit "Connect", and the program will act as server.

The HBDFileReader has five fields where you can adjust some important values.


Milepost lets you configure the milepost indicated by the HBD. This in tenths of a mile, so 123 will give you milepost 12.3. Be aware of the range limits on the right!
Defect percentage is the percentage in 1/1000, used to calculate the random hot boxes. Maximum value is 25.5 %, which is slightly more than every fourth axle.
Wait time is the time in seconds the device will wait after the end of an ongoing radio transmission, before starting it's own.
Circuit length is the distance between the two IR train sensors (see Technical) in millimeters. One inch equals 25.4 mm, in case you don't use the SI unit system. This value is important for speed calculation.
Scale speed factor is a factor which multiplies actual speed to the modeled speed. So if your model train goes 1 mph, with a factor of 87, the detector will announce "87 mph".

Below the WARNING it is possible to select whether the HBD announces train speed, train length, and axle count when no defect is detected. Additionally, the device can be configured to tell a track number, which can be specified.

Still below it is possible to select the memory map file. If you don't specifiy one, the program will only reconfigure the above values, without touching the present speech set in the Flash.
Use the lower network connection panel to connect to the HBDInterface. Normally, you just should hit "Connect". If prompted, you will have to allow the connection. Now, push the * button on the device, while powering it up. The configuration will start automatically. After completion, the HBD will revert into standard detection mode. Manual configuration mode is entered by pressing # at power-up.

Downloads

Here are all the files needed for downloading the audio data, as well as source code and schematic.

Updated PC programs: HBDwav2raw, HBDInterface, HBDFileReader[download]
Updated Audio: SP speech set (with MacOS)[download]