Over my years working as an Automation Systems Integrator, I occasionally get projects that are different from the normal industrial, process and manufacturing systems. I was recently asked to develop the controls for a museum exhibit to simulate a bat’s echolocation. The museum, Children’s Center of Sofia, in Sofia, Bulgaria, and I promptly named the project “The Bulgarian Bat Detector”. In a near dark environment, the museum visitors rotate a viewfinder towards a display depicting an environment for bats. A couple of bats are located in the display and they are the targets for the bat detector. As the viewfinder approaches the bat’s position, the sound level of an audio track increases in volume with a maximum level when pointed directly at a bat. The volume level decreases as the viewfinder leaves the bat’s position.

The control solution devised does require the bats to actually be detected as the controls compare the direction of the viewfinder to the location of the bats in the display.  The volume of the audio track is set based on the position of the viewfinder relative to the bats with volume increasing when approaching the bat and decreasing when leaving.

Construction of bat exhibit in SofiaFour main design aspects needed to be developed for this project:

  1. Viewfinder direction
  2. Audio playback
  3. Audio volume adjustment
  4. Setup adjustment controls

 

The biggest hurdle encountered was how to control the audio volume without excessive development and testing while also keeping costs low. As an experienced automation systems integrator, I did not have a volume control solution in my bag of tricks, and it quickly became apparent that some type of hybrid solution was needed.  The position detection and process logic would be handled with an AutomationDirect CLICK® PLC, the audio playback would use a commercially available digital audio repeater, and the volume adjustment solution would need to be built using electronic components.

 

Viewfinder position detection

The viewfinder’s position is determined using a touchless encoder. The encoder uses a magnet attached to the rotating shaft of the viewfinder and the encoder (mounted to the support) is a Hall Effect type sensor that determines the rotational position of the magnet. The output of the encoder is a 0.25V to 4.75V DC signal representing 0 to 360 degrees. The encoder’s output range is perfectly suited for the CLICK’s built in 0V to 5V analog input.  The PLC also has a built-in scaling configuration for the analog input providing the position’s 0 to 360 degree value and placing it directly into a floating point (real) PLC variable.Bat exhibit at Children's Center of Sofia

 

Audio playback

For the audio playback, a purchased solution was used. The QuikWave™ EM38A is a unit used by museum exhibit developers and allows MP3 audio files to be played in a variety of ways. For this application we used a playback script to run a single audio file in a continuous loop.

 

Audio volume adjustment

The most challenging part of the project was how to control the audio volume from a PLC output. I was hesitant to accept this project because I didn’t have a clear cost effective solution at hand. During the quoting process, I remembered reading about a few technologies that might work. These included a digitally controlled potentiometer and using IC analog switches to control a voltage divider.  Both of these solutions would require a lot of development and testing to prove them out for the application.

My customer, Andrew Tomasulo of Connect Interactives, who is in the museum exhibit business, came across a solution that used Light Dependent Resistors (LDR). The LDR consists of an LED and a photoresistor as a single device. The intensity of the LED regulates the resistance of the photoresistor. Because the only connection between the LED and the photoresistor is light, the photoresistor is an isolated and passive device. The PLC’s 0-5V analog output signal is used to vary the device’s resistance.

In order to use the LRD solution for volume control, two LDR units are set up as a voltage divider. Two separate 0-5V analog outputs from the PLC provided opposite voltages to the devices (0-5V and 5-0V). The resistance of the LDR’s is from 1,200 ohms down to 60 ohms, which provides a full volume control range.

An issue was encountered when the LDR circuit was first connected to the PLC analog outputs. The PLC analog outputs did not provide enough current to drive the LED in the LDR over its full range. The PLC can only source 2.5 mA and the LED needs up to 25 mA. This prompted a quick trip to the “Shack” for an OP Amp.  They only had one in stock (LM324) with rail-to-rail output that would work with my single ended power supply.

echolocation

Setup adjustment controls

The unit uses four potentiometers to set the target locations for the bats in the display. The audio output volume increases and drops within +/- 10 degree range of the target. A 5V power supply voltage regulator (LM7805) was added to the circuit board to power the potentiometers.  The outputs of the potentiometers are sent to an analog input module of the CLICK PLC.

 echolocation

Assembly

All of the components were packed into a 12” x 10” x 5” non-metallic enclosure. Field connections are made using Micro (M12) connections and the power cord uses a European Schuko plug (remember this unit is going to Bulgaria).  The custom circuit board was hand assembled and mounted on stand-offs.  Almost all of the components were from AutomationDirect except the audio playback unit, custom circuit board, potentiometers and (of course) the power cord.

Testing

My responsibility only included factory testing.  My customer, the museum exhibit manufacturer, would perform the final testing with the actual equipment.  I needed to simulate the external functions using an analog simulator for the encoder signal, an MP3 file found on the Internet (bat noises) and a computer speaker.

To test the unit, simulated positions were set on the analog simulator (encoder).  For each encoder position, a target potentiometer was adjusted for the loudest output volume.  After all of the positions were set, the simulated encoder swept over the full range to confirm the volume changes at the targets.

 

Conclusion

This was a fun project with its share of challenges but in the end it all worked out (and no bats were hurt in the process). I’m thinking of adding a trip to Sofia, Bulgaria, to my bucket list so I can see and hear the unit in operation.

By Jay Rees, PE, Rees Engineering Corp.

Click here for free app stories and industry news

Originally Posted: May 21, 2015