Limpkin's blog - Tag - water<div>An electronics geek blog, dedicated to sharing and open source. Check out my stores: <a href="https://lectronz.com/stores/stephanelec" hreflang="en" title="Lectronz store">EU</a> / <a href="https://www.tindie.com/stores/stephanelec" hreflang="en" title="tindie store">EU & US</a>.</div>2024-03-29T00:41:47+00:00Mathieuurn:md5:51de6a3d917257edeff5a252fe925b02DotclearA Timeless Fountainurn:md5:93b5cbcf45d6573c8045b396e9df37452015-06-22T15:08:00+01:002024-03-09T10:59:38+00:00limpkinMy Projectsavrfountainlaserwaterxmega<p>This is one of these "just because" projects...<br></p>
<p><img src="https://www.limpkin.fr/public/fountain/.fountain_night_m.jpg" alt="Timeless Fountain" class="media-center" title="Timeless Fountain, juin 2015"><br></p> <h2>The Idea<br></h2>
<p><a href="https://www.limpkin.fr/public/fountain/Bouncing_ball_strobe_edit.jpg" title="bouncing ball"><img src="https://www.limpkin.fr/public/fountain/.Bouncing_ball_strobe_edit_m.jpg" alt="bouncing ball" class="media-center" title="bouncing ball, juin 2015"></a><br>
I'm sure that most of you are familiar with the <strong>stroboscopic effect</strong>. To paraphrase <a href="http://www.wisegeek.com/what-is-the-stroboscopic-effect.htm" hreflang="en" title="stroboscopic effect">wisegeek</a>, it is a phenomenon of human visual perception in which motion is shown to be interpreted by a brain that receives successive discreet images and stitches them together with automatic aliases for temporal continuity. In short, <strong>motion is an artifact</strong>.<br>
A conventional strobe fountain is a stream of water droplets falling at <strong>regular intervals</strong> lit with a <strong>strobe light</strong>. When viewed under normal light, it is a normal water fountain. When viewed under a strobe light with its <strong>frequency tuned to the rate at which the droplets fall</strong>, the droplets appear to be suspended in mid-air. Adjusting the strobe frequency can make the droplets seemingly move slowly up or down.<br>
However making water droplets fall at regular intervals isn't as easy as it sounds as many physical effects will get in the way of doing so (the main one being <a href="https://en.wikipedia.org/?title=Surface_tension" hreflang="en" title="surface tension">surface tension</a>). For this project to work I'm instead <strong>detecting droplets</strong> with a laser and <strong>flashing a light accordingly</strong>.<br><br></p>
<h2>Detection and Flashing<br></h2>
<p><a href="https://www.limpkin.fr/public/fountain/fountain_front.JPG" title="Fountain Front"><img src="https://www.limpkin.fr/public/fountain/.fountain_front_m.jpg" alt="Fountain Front" class="media-center" title="Fountain Front, juin 2015"></a><br>
The liquid you see in the above picture is simply water with <a href="https://en.wikipedia.org/wiki/Fluorescein" hreflang="en" title="fluorescein">fluorescein</a>, which reacts awesomely under UV light. The two bars on each side of the droplet's fall course therefore include <strong>10 UV LEDs</strong> each, as lots of 'light' is required for very small amounts of time.<br></p>
<p><a href="https://www.limpkin.fr/public/fountain/laser.png" title="laser"><img src="https://www.limpkin.fr/public/fountain/.laser_m.jpg" alt="laser" class="media-center" title="laser, juin 2015"></a><br>
As previously mentioned our left bar includes a small 850nm laser at its top. This particular wavelength <strong>isn't visible by the naked eye</strong>. The laser is therefore powered at its <strong>lowest rating</strong> to avoid any damage if one were to manage putting his/her eye in front of it (even though that is nearly impossible).<br></p>
<p><a href="https://www.limpkin.fr/public/fountain/diode.png" title="diode"><img src="https://www.limpkin.fr/public/fountain/.diode_m.jpg" alt="diode" class="media-center" title="diode, juin 2015"></a><br>
On the other side a <strong>photodiode</strong> detects the laser beam. As you can guess, <strong>good alignment was key</strong> for this build!<br>
The laser beam is very narrow so no signal amplification was required. When a droplet passes in front of the beam the typical voltage variation with a 2k resistor is around <strong>750mV</strong>.... which is very simple to detect.<br><br></p>
<h2>The Pieces<br></h2>
<p><a href="https://www.limpkin.fr/public/fountain/cnc_machining.JPG" title="CNC machining"><img src="https://www.limpkin.fr/public/fountain/.cnc_machining_m.jpg" alt="CNC machining" class="media-center" title="CNC machining, juin 2015"></a><br>
The complete fountain was made with only <strong>four A4 8mm polycarbonate sheets</strong>. Total cost for the 4 sheets was around <strong>$35</strong> on Ebay. I used my <a href="https://www.limpkin.fr/index.php?post/2013/09/29/Entering-the-CNC-world-with-a-probotix-fireball">small CNC machine</a> to mill all the individual pieces. As you can guess... this took quite a while! Precisely drilling the assembly holes on the pieces' edges (to guarantee good final assembly) was the most critical part.<br></p>
<p><a href="https://www.limpkin.fr/public/fountain/led_bar.JPG" title="LED Bar"><img src="https://www.limpkin.fr/public/fountain/.led_bar_m.jpg" alt="LED Bar" class="media-center" title="LED Bar, juin 2015"></a><br>
The two bars are simply two rounded 50x224mm sheets assembled together with M3 screws. They were designed in such a way that the M3 nuts & M3 screws heads are directly integrated <strong>inside the sheet</strong>. A deep groove was machined to allow me to solder all the LEDs together. A standard 0.1" connector was glued at the bars' ends.<br></p>
<p><a href="https://www.limpkin.fr/public/fountain/faucet_pump.png" title="Faucet & Pump"><img src="https://www.limpkin.fr/public/fountain/.faucet_pump_m.jpg" alt="Faucet & Pump" class="media-center" title="Faucet & Pump, juin 2015"></a><br>
The faucet was also purchased on Ebay ($30) while the submersible pump was purchased on dealextreme ($5). It took me a surprisingly big amount of time to find a <strong>tall enough faucet</strong> that could be easily fixed to the main plastic sheet (yes, faucet datasheets are a thing!). A $3 flexible plastic tube (ID 8mm/ OD 10mm) is attached to the pump output and passed inside the faucet to the nozzle.<br></p>
<p><a href="https://www.limpkin.fr/public/fountain/nozzle_laser.JPG" title="Nozzle and Laser Barrier"><img src="https://www.limpkin.fr/public/fountain/.nozzle_laser_m.jpg" alt="Nozzle and Laser Barrier" class="media-center" title="Nozzle and Laser Barrier, juin 2015"></a><br>
The nozzle turned out to be the <strong>hardest piece to design</strong> as it took me around 15 tries to get it right! A good rule of thumb seems to be a very small output hole (0.5mm in my case) to guarantee good water pressure and a sharp nozzle angle (70degrees).<br></p>
<p><a href="https://www.limpkin.fr/public/fountain/magnets.JPG" title="Magnets"><img src="https://www.limpkin.fr/public/fountain/.magnets_m.jpg" alt="Magnets" class="media-center" title="Magnets, juin 2015"></a><br>
The main reservoir is assembled using screws and acrylic glue was used to provide good sealing. The top plastic sheet <strong>isn't attached to the rest of the assembly</strong>. I instead used small magnets embedded inside the reservoir edges and the top plastic sheet so <strong>cleaning could easily be done</strong>.<br><br></p>
<h2>The Electronic Side of Things<br></h2>
<p><a href="https://www.limpkin.fr/public/fountain/atxmega.png" title="internals"><img src="https://www.limpkin.fr/public/fountain/.atxmega_m.jpg" alt="internals" class="media-center" title="internals, juin 2015"></a><br>
The small PCB I made for this project is based around the <strong>ATxmega16A4</strong>. In the above diagram you can see how the drop detection and LED flashing are implemented.<br>
The Analog to Digital Converter (<strong>ADC</strong>) is used at the platform start to measure the droplet detection and non-detection photodiode output levels. Using these values and the internal Digital to Analog Converter (<strong>DAC</strong>) a detection threshold is set on the ATxmega internal comparator. The comparator output will therefore be set to logical 0 <strong>every time a droplet is detected</strong>.<br>
This output is programmed as both an <strong>internal event and an interrupt</strong>. The interrupt is used by the microcontroller to count the number of droplets per second while the event is used <strong>by our internal counter as a reset signal</strong>. In our latter we just set a compare value of X for channel 0 and a compare value of (X + Y) for channel 1, use an external XOR gate and as a result <strong>our UV LEDs will flash after a delay X after droplet detection for a duration of Y</strong>.<br>
You'll therefore notice that droplet detection and UV LEDs flashing are (more or less) done <strong>completely asynchronously</strong> as we just 'wired' the different internal peripherals together so they can provide our desired functionality.<br></p>
<p><a href="https://www.limpkin.fr/public/fountain/ldo.png" title="LDO"><img src="https://www.limpkin.fr/public/fountain/.ldo_m.jpg" alt="LDO" class="media-center" title="LDO, juin 2015"></a><br>
Finally, I just needed to adjust the <strong>pump outflow</strong> (therefore its supply voltage) depending on the photodiode output to provide a constant number of droplets per second. This is done using an LDO whose feedback resistor divider is adjusted depending on the required output voltage. I had to write a <strong>simple control loop feedback mechanism</strong> inside the ATxmega's firmware.<br><br></p>
<h2>Final Result<br></h2>
<div class="external-media" style="margin: 1em auto; text-align: center;">
<iframe width="700" height="400" src="https://www.youtube.com/embed/D54QVBCBhno" frameborder="0" allowfullscreen></iframe>
</div>
<p>And voila! This fountain actually was a side project I did over the last few months. You'll also notice that I skipped over the non-interesting (yet tricky) details: internal wiring, power supply... You'll find the kicad files made for this project <a href="https://www.limpkin.fr/public/fountain/kicad.rar">here</a>.<br>
I'll finally add that the original idea <a href="http://cre.ations.net/creation/the-time-fountain" hreflang="en" title="original project">wasn't mine</a> and that I actually made a v1 of this concept nearly 10 years ago!<br>
Click on the below picture for high-resolutiion:<br></p>
<p><a href="https://www.limpkin.fr/public/fountain/fountain_night.JPG" title="Timeless Fountain"><img src="https://www.limpkin.fr/public/fountain/.fountain_night_m.jpg" alt="Timeless Fountain" class="media-center" title="Timeless Fountain, juin 2015"></a><br></p>
<p>Cheers!</p>