Monday, May 18, 2015

Water Effects with a Function generator

In this post, I describe how I re-created some really cool effects using a stream of water. This  was a popular Youtube video a while back and I thought that I could not only recreate the effect, but take it a step further with the capabilities that we have in our Trueform waveform generators.



I made (with the help of our video team in Keysight) a new set of videos that I hope that you have seen. If not, the first video has some background music that is timed to change when the water effects change. This video only shows the cool water streams and does not explain how to create the effects.


The second video goes into more depth on what equipment is used and how I use to signals to create the neat water stream effects. You will notice some flickering in the video, this is due to the timing of the camera and the timing of the light strobe light being misaligned.




If you came here from the video, you might be looking for some more details on how I created the effect. With out further ado, let's get into some details.

Equipment:
Trueform Waveform Generator with 2 channels
Ikea LED light
8 inch subwoofer
Audio amplifier
3/4" plastic tubing to route the water
Water pump from Amazon

Tub to catch the water

The basic setup:

To put it into laymen terms, the function generator produces a signal that is used to control the subwoofer speaker. The subwoofer is physically connected to a water hose that is going across the front of the speaker. I epoxied a tube connector to the front of my subwoofer. The subwoofer then moves the water hose in a repeated pattern at a frequency that I control with my function generator. The function generator does not produce enough power to drive the speaker so I put the audio amplifier between the subwoofer and function generator in order to get enough vibrations.

To get the different visual effects, I use the second channel on the function generator to control a LED spot light. This LED spot light can turn on and off faster than a human eye can see. When we turn the LED on/off at a really fast rate it looks like the light never turns off, but it does. This provides us with a strobe light effect that generates the cool water flows that we see in the video. I made a custom cable that when from a BNC connection of the generator to the LED light.

The water pump takes the water from the tub and recycles it through the front of the speaker.


The Effects:

Frozen in air

 The "Frozen" water effect has the  basic premise of having the water signal at the same frequency as the LED light.

Function generator channel 1 has a sinewave at 50 Hz. A sinewave the most simple and basic waveforms and provides us with a nice smooth movement on the water hose.


Channel 2 on the function generator has a pulse pulse at the same frequency (50 Hz) as channel 1. For those of you that are technically inclined the signal is 3Vpp with 1.5V offset. 1ms on time.

By setting the LED light's on frequency to be the same as the speaker, we are effectively looking at the same pattern of water every time the LED turns on. Since the frequencies are matched the same water "image" is captured due to the repetitive speaker and LED light patterns. Its like looking at a clock once every 24 hours. If you look at it exactly the same time every day, then time looks like it is standing still. The frequency that you are looking at the clock (24 hours) matches the frequency that it takes for the clock to repeat (24 hours).

TIP: The shorter the on time, the more crisp the water will look, but it does create the "flashing" or flicker elements that we see in the video. A longer on time will make the water look a little more fuzzy and the shape of the water will be not a defined. Longer on times do have the additional benefit of providing brighter light from the LED.

The other effects basically change the frequency or the size of the signal.
Speaker at 50 Hz,
LED light at 50 Hz.


Slow Gravity 

In this effect, the water looks like it is slowly falling down, almost as if gravity is not as strong here. Rest assured, we haven't broken gravity and we're not using slow motion video. But we have used the lighting to our advantage. The speaker is still set to 50 Hz, but the trick here is that the LED light is now slightly slower than the speaker. The LED is now at 49 Hz. By having the LED "look" at the water a little bit slower than the speaker frequency it looks like the water is slowly falling down. Going back to our clock analogy, if you look at your clock once every 24:01 hours (add a minute), then time will slowly go forward a minute per day.
Speaker at 50 Hz,
LED light at 49 Hz.


 

 

Anti Gravity

No your eyes aren't playing tricks on you, the water does look like it is flowing upwards. In this anti-gravity effect, it almost looks like I am reversing the video from above. Again its not a video effect and the fish aren't swimming backwards. If I reversed the video the fish would be.
 The speaker is still set to 50 Hz, but the trick here is that the LED light is now slightly slower than the speaker. The LED is now at 51 Hz. By having the LED "look" at the water a little bit faster than the speaker frequency it looks like the water is slowly traveling up, maybe looking like it is going back in time.  In our clock analogy, if you look at your clock once every 23:59 hours (subtract a minute), then time will slowly go backwards a minute per day.
Speaker at 50 Hz,
LED light at 51 Hz.


 

 

Yo Yo

In the Yo Yo effect, the water looks like it switches from going down to going up, like a Yo-Yo. Here's where it gets a little bit more interesting by using a function generator. In this effect, we keep the strobe light at a fixed 50 Hz. However, we now do a relatively slow frequency modulation between 40 and 60 Hz. Frequency modulation is the same signal modulation techniques that FM radio stations use. This is a simplified version in that the frequency changes between 40 and 60 at a continuous basis. The visual effect of this means that the speaker is sometime slower and sometimes faster than the strobe light thus causing the water stream to look like it is sometimes going down and sometimes
going up.
Speaker changing between 40 and  60 Hz,
LED light at 50 Hz.



Opening Fan

This effect has the water shifting from a narrow stream to a very wide stream of water. Similar to the yoyo effect, the opening fan effect uses a well known signal modulation technique. Amplitude modulation has been around for at least a century and is still used in AM radio stations. AM signals vary the size of a signal. So when the water's "fan" is wide open, the signal going to the speaker is large. When the fan is a single stream, the signal is small. Think of it as changing the volume on the speaker in a fast manner.  Again, we use a very slow changing AM signal here that changes so that you can see the water effect. Normally AM signals change much faster.
Speaker at 50 Hz,
LED light at 50 Hz.


Double Helix

In the Double Helix, it looks like there are two streams intertwining together. Its a simple concept to generate the Double Helix. If your light is at the same rate as your speaker, then you get one stream. But if the light is at twice the rate of your speaker you get 2 streams. You are basically looking at it twice as often. In the video we changed the speaker rate to 40Hz and put the LED light rate at 80 Hz. I found that 40 Hz was better than 50 Hz because the helix patterns were wider. If the frequency of the speaker was faster we would see more waves in our signal, too many waves would ruin the double helix effect.
Speaker at 40 Hz,
LED light at 80 Hz.

 

 

 

 Double Helix Slow Gravity

Just like the slow gravity effect with a single stream, the LED light is now just a little bit slower. Since we started with twice the frequency of the speaker, we are now just a little bit slower than twice the frequency. I chose 78 Hz because I liked the effect.
Speaker at 40 Hz,
LED light at 78 Hz.

 

 

 

 

 

Double Helix Anti Gravity

Just like the slow gravity effect with a single stream, the LED light is now just a little bit slower. Since we started with twice the frequency of the speaker, we are now just a little bit slower than twice the frequency. I chose 78 Hz because I liked the effect.
Speaker at 40 Hz,
LED light at 82 Hz.

 

 

 

 

 

 

Slinky Effect

In this effect, the water is "frozen" in air. However, the water stream quickly goes from a long stream to a stream with many curls. From the function generator, we are sweeping the frequency from a slow 20Hz to a faster 80Hz signal. We are able to keep the water frozen in air by keeping both channels of the generator at the same frequency as they change from 20 to 80 Hz.

 In this part of the video, you'll notice that the flicker on from the camera has a lot of black spots. This is because as we change the frequency of the lights, there are more conflicts with the frame rate of the camera.



 

Additional Tips

Note about the water flow. If you have a strong continuous water flow, you can create an effect that looks really good from top to bottom. The water pump that we had was ok and the stream was continuous for about 5-7 inches. At the end of the flow, the water started to break up and didn't have a great repetitive effect for us to view with the strobe light. Ideally you would use water from your sink or outdoor spigot as a water source.

The water tube should be placed so that the tip is just barely outside of the subwoofer's lip. Placing it too far from the subwoofer will allow the hose to move inconsistently and ruin the effect. Placing it to close will cause the water to hit the subwoofer and create streams in the water shape. Not to mention it gets your subwoofer wet.

Hope you enjoyed watching the videos and reading this blog entry. Thanks!



6 comments: