<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>electronics Archives - ClickedyClick</title>
	<atom:link href="https://gergely.imreh.net/blog/tag/electronics/feed/" rel="self" type="application/rss+xml" />
	<link>https://gergely.imreh.net/blog/tag/electronics/</link>
	<description>Life in real, complex and digital.</description>
	<lastBuildDate>Sat, 13 Sep 2014 02:09:48 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Solar powered Tibetan prayer wheel circuit</title>
		<link>https://gergely.imreh.net/blog/2014/09/tibetan-prayer-wheel-circuit/</link>
					<comments>https://gergely.imreh.net/blog/2014/09/tibetan-prayer-wheel-circuit/#comments</comments>
		
		<dc:creator><![CDATA[Gergely Imreh]]></dc:creator>
		<pubDate>Sat, 13 Sep 2014 02:09:48 +0000</pubDate>
				<category><![CDATA[Maker]]></category>
		<category><![CDATA[circuit]]></category>
		<category><![CDATA[disassembly]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[repair]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<guid isPermaLink="false">https://gergely.imreh.net/blog/?p=1814</guid>

					<description><![CDATA[<p>There are all kinds of toys and fun gadgets around the house for most people that might work or be broken, but either way most people wouldn&#8217;t know how do they work inside. For example take this solar powered Tibetan prayer wheel. There are many of these out there, and found one at home lying [&#8230;]</p>
<p>The post <a href="https://gergely.imreh.net/blog/2014/09/tibetan-prayer-wheel-circuit/">Solar powered Tibetan prayer wheel circuit</a> appeared first on <a href="https://gergely.imreh.net/blog">ClickedyClick</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>There are all kinds of toys and fun gadgets around the house for most people that might work or be broken, but either way most people wouldn&#8217;t know how do they work inside. For example take this solar powered Tibetan prayer wheel. There are <a title="Google image search: solar tibetan prayer wheel" href="https://www.google.com.tw/search?q=solar+tibetan+prayer+wheel&amp;safe=off&amp;tbm=isch">many of these</a> out there, and found one at home lying around as well. It didn&#8217;t seem to work, and thought why not take apart to take a look?</p>
<figure id="attachment_1819" aria-describedby="caption-attachment-1819" style="width: 500px" class="wp-caption aligncenter"><a href="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/tibetanprayerwheel.jpg"><img fetchpriority="high" decoding="async" class="size-medium wp-image-1819" src="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/tibetanprayerwheel-500x333.jpg" alt="Solar powered Tibetan prayer wheel" width="500" height="333" /></a><figcaption id="caption-attachment-1819" class="wp-caption-text">Solar powered Tibetan prayer wheel</figcaption></figure>
<p>The inside of this Tibetan prayer wheels is pretty straightforward: taking off the bottom cover out come two ballast stones, and drivebox with a solar panel hanging off it. The drivebox is connected to the prayer wheel outside via a rectangular shaft to turn it.<span id="more-1814"></span></p>
<figure id="attachment_1824" aria-describedby="caption-attachment-1824" style="width: 500px" class="wp-caption aligncenter"><a href="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly1.jpg"><img decoding="async" class="size-medium wp-image-1824" src="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly1-500x333.jpg" alt="All the parts of the solar power prayer wheel laid out" width="500" height="333" /></a><figcaption id="caption-attachment-1824" class="wp-caption-text">The prayer wheel in disassembled form</figcaption></figure>
<p>The drivebox contains an electronic circuit and a couple of cogwheels to turn the DC solar power into motion somehow. Originally the solar panel was not detached from the circuit board as it seems above, just after messing around with it for a while it came off&#8230;</p>
<h3>Electronics</h3>
<p>The circuit has only a handful of components and they looked reasonably intact (some surface corrosion on the capacitors and lot of grime on the transistors, but nothing that seems to be a showstopper). The round black thing on the right is a spool of thin, enamel coated wires  &#8211; a custom inductor. The wires were spun in both directions, so it is actually two inductors intertwined.  The transistors are <a title="2SC945 transistor datasheet" href="http://www.micropik.com/PDF/2sc945.pdf">C945</a> according to their marking (or 2SC945 in it&#8217;s full name, as I&#8217;ve been told). The two lines leaving the photo to the left connect to the solar panel.</p>
<figure id="attachment_1825" aria-describedby="caption-attachment-1825" style="width: 500px" class="wp-caption aligncenter"><a href="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly2.jpg"><img decoding="async" class="wp-image-1825 size-medium" src="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly2-500x375.jpg" alt="Closeup of the circuit board from above" width="500" height="375" srcset="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly2-500x375.jpg 500w, https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly2-768x576.jpg 768w, https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly2.jpg 1000w" sizes="(max-width: 500px) 100vw, 500px" /></a><figcaption id="caption-attachment-1825" class="wp-caption-text">The circuit board inside (top view)</figcaption></figure>
<p>The bottom of the circuit. From here it can be reverse engineered to see how does it actually work. The enamel coated wires were freaky to have a lot of extra length after their soldering point and been all over the circuit. Probably that would be good to cut short to make sure they don&#8217;t cause any shorts in the future&#8230; The resistors were desoldered so I can check their component value, the capacitor values were read off their housing, the inductor I didn&#8217;t touch this time, so their value is an outstanding question&#8230;</p>
<figure id="attachment_1826" aria-describedby="caption-attachment-1826" style="width: 500px" class="wp-caption aligncenter"><a href="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly3.jpg"><img loading="lazy" decoding="async" class="wp-image-1826 size-medium" src="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly3-500x375.jpg" alt="Closeup of the circuit board from below" width="500" height="375" srcset="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly3-500x375.jpg 500w, https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly3-768x576.jpg 768w, https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly3.jpg 1000w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><figcaption id="caption-attachment-1826" class="wp-caption-text">The circuit board inside (bottom view)</figcaption></figure>
<p>To figure out what the circuit does, it  helps to transcribe the diagram into schematic well. Then I messed up the legs of the transistors in the up-down flipping multiple times, so the circuit came out all wrong. Fortunately <a title="Solar powered Tibetan prayer wheel circuit issue on Reddit AskElectronics" href="http://www.reddit.com/r/AskElectronics/comments/2fpugw/solar_powered_tibetan_prayer_wheel_circuit_issue/">JohnnyThree at Reddit AskElectronics</a> helped (may he be blessed with lot of karma!:), not just to correctly transcribe the circuit but arrange the components so that it shows what the circuit really is: a variation on an <a title="Astable multivibrator on Wikipedia" href="http://en.wikipedia.org/wiki/Multivibrator#Astable_multivibrator">astable multivibrator</a>.</p>
<figure id="attachment_1816" aria-describedby="caption-attachment-1816" style="width: 500px" class="wp-caption aligncenter"><a href="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/PrayerWheelScreenshot.png"><img loading="lazy" decoding="async" class="wp-image-1816 size-medium" src="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/PrayerWheelScreenshot-500x319.png" alt="The circuit schematic of the solar powered tibetan prayer wheel" width="500" height="319" /></a><figcaption id="caption-attachment-1816" class="wp-caption-text">The reverse engineered circuit schematic</figcaption></figure>
<p>I fixed up the circuit in <a title="KiCAD homepage" href="http://www.kicad-pcb.org/">KiCAD</a> (good learning experience as well, and go open source!). The difference between the regular astable multivibrator and this circuit is C3 capacitor between the base and collector of Q2 (according to JohnnyThree it&#8217;s to curb RF interference), and using inductors L1 and L2 instead of pure resistors.</p>
<p>Here are some additional resources if anyone&#8217;s interested:</p>
<ul>
<li><a title="PDF version of Solar Powered Tibetan Prayer Wheel Schematics" href="https://gergely.imreh.net/supplements/prayer-wheel/prayer_wheel.pdf">Schematics in PDF format</a></li>
<li><a title="KiCAD/eeschema version of the solar powered tibetan prayer wheel schematic" href="https://gergely.imreh.net/supplements/prayer-wheel/prayer_wheel.sch">KiCAD/eeschema schematic</a> and <a title="Eeschema component library cache for the solar powered Tibetan prayer wheel" href="https://gergely.imreh.net/supplements/prayer-wheel/prayer_wheel-cache.lib">component library</a></li>
</ul>
<p>Been checking some of the components separately as well when trying to figure out what was going wrong. The solar panel has <a title="Poor light type amorphous silicon solar cell at VIMUN" href="http://www.vimun.cn/en/ProductInfo.asp?pid=18">VIMUN SC-5528</a> marking on it, which would make it a 1.5V poor light type amorphous silicon solar cell. This would make a lot of sense for home electronics, poor light is basically every light. When using my smartphone&#8217;s flash as a light, I could drive it up to 2.9V output at full power, but normally was much less.</p>
<p>Since the solar panel&#8217;s connections came off the board after a while, I resoldered them, and could measure with a multimeter that the circuit does something. When connected, the voltage across solar panel maxed out around 1.VV, and the voltage across either of the inductors seemed to be oscillating between 0.3V and 1.0V with a period of about 5s. Not sure if this is any useful, just noted.</p>
<p>When I&#8217;ve put the wheel with the magnets attached back in place over the coil, it was moving a bit back and forth with the 5s period. I thought maybe the device is back to normal after reattaching the solar panel and time to reassemble.</p>
<h3>Reassembly</h3>
<p>It was time to check out whether the setup was actually working and put everything back together. The wheels were pretty hard to test when not held at their place by the drivebox&#8217;s top.</p>
<figure id="attachment_1827" aria-describedby="caption-attachment-1827" style="width: 500px" class="wp-caption aligncenter"><a href="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly4.jpg"><img loading="lazy" decoding="async" class="wp-image-1827 size-medium" src="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly4-500x333.jpg" alt="Partial mechanical assembly of the prayer wheel drive box" width="500" height="333" /></a><figcaption id="caption-attachment-1827" class="wp-caption-text">The drive box with the magnetic wheel.</figcaption></figure>
<p>Before I&#8217;ve put the cogwheels back to the box, I&#8217;ve counted their gear ratios. The magnetic wheel has 10 teeth, the middle wheel has 70 / 12 teeth (in / out), and the final has 70 teeth again. That would mean a (70/10) × (70/12) = 7 × 5 = 35 gear ratio, I guess. The teeth on one wheel seemed not symmetric which ends up forcing the prayer wheel to only turn in one direction.</p>
<figure id="attachment_1828" aria-describedby="caption-attachment-1828" style="width: 500px" class="wp-caption aligncenter"><a href="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly5.jpg"><img loading="lazy" decoding="async" class="wp-image-1828 size-medium" src="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly5-500x333.jpg" alt="Fully assembled prayer wheel drive box" width="500" height="333" /></a><figcaption id="caption-attachment-1828" class="wp-caption-text">All the wheels in place with the lid still off</figcaption></figure>
<p>After putting the box back together, I&#8217;ve tried illuminating the solar panel with the flashlight again and see what happens. With a little initial turn the square drive shaft (is that what the thing is called, by the way?) it did start to rotate by itself pretty well! We are on the right track.</p>
<figure id="attachment_1829" aria-describedby="caption-attachment-1829" style="width: 500px" class="wp-caption aligncenter"><a href="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly6.jpg"><img loading="lazy" decoding="async" class="wp-image-1829 size-medium" src="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly6-500x333.jpg" alt="The drivebox closed up" width="500" height="333" /></a><figcaption id="caption-attachment-1829" class="wp-caption-text">The box closed up</figcaption></figure>
<p>The biggest difficulty putting the parts back into the box was keeping the ballast stones from dropping on the solar panel and crashing it. A little careful handling and everything&#8217;s back in place.</p>
<figure id="attachment_1830" aria-describedby="caption-attachment-1830" style="width: 500px" class="wp-caption aligncenter"><a href="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly7.jpg"><img loading="lazy" decoding="async" class="wp-image-1830 size-medium" src="https://gergely.imreh.net/blog/wp-content/uploads/2014/09/pw_assembly7-500x333.jpg" alt="Drivebox reinserted into the prayer wheel housing" width="500" height="333" /></a><figcaption id="caption-attachment-1830" class="wp-caption-text">The drive box reinserted into the housing, with the ballast stones and the solar panel still outside</figcaption></figure>
<p>Finally I could test the whole assembly. Looks like the essential ingredients are sufficient light and an initial push. Not sure if the need for the initial push is intended or just a side-effect, but it actually mimics very well the existing physical Tibetan prayer wheels where one has to set them in motion, and the intention does count for the religious purposes. Though as a note, if the light is strong enough (full blast flashlight from up close), the wheel does start by itself and goes into pretty fast spin!</p>
<p>The prayer wheel part of the assembly has a lot more inertia than the driveshaft on its own, and this it the wheel turns slower than I&#8217;ve seen in the earlier test, and stops much quicker when the light is cut off.</p>
<p><iframe loading="lazy" title="Solar Powered Tibetan Prayer Wheel" width="580" height="326" src="https://www.youtube.com/embed/oH5jmLEdZQ8?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
<p>In the video I test the wheel out, kickstarting it, blocking the light to see if it is really operating from the solar panel or just the initial kick keep it moving&#8230;. So far so good!</p>
<h3>Future</h3>
<p>A couple of things I can think of as future work with this gadget:</p>
<ul>
<li>Simulate the circuit in SPICE to understand the effect of the extra capacitor and the inductors</li>
<li>Figure out whether it can it be fixed up to use less light? At the moment it&#8217;s not that easy to find a place around the house with sufficient natural light to make it work.</li>
<li>Figure out if the friction on the wheels be reduced to make them turn easier / longer?</li>
<li>What else could I hack this circuit to do?</li>
</ul>
<p>And then again, what other gadget to take apart next time?</p>
<p>The post <a href="https://gergely.imreh.net/blog/2014/09/tibetan-prayer-wheel-circuit/">Solar powered Tibetan prayer wheel circuit</a> appeared first on <a href="https://gergely.imreh.net/blog">ClickedyClick</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gergely.imreh.net/blog/2014/09/tibetan-prayer-wheel-circuit/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>Make the most of solar power</title>
		<link>https://gergely.imreh.net/blog/2013/11/solar-power/</link>
					<comments>https://gergely.imreh.net/blog/2013/11/solar-power/#respond</comments>
		
		<dc:creator><![CDATA[Gergely Imreh]]></dc:creator>
		<pubDate>Fri, 01 Nov 2013 07:22:22 +0000</pubDate>
				<category><![CDATA[Maker]]></category>
		<category><![CDATA[Taiwan]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[renewable energy]]></category>
		<category><![CDATA[smartphone]]></category>
		<category><![CDATA[solar power]]></category>
		<category><![CDATA[USB]]></category>
		<guid isPermaLink="false">https://gergely.imreh.net/blog/?p=1629</guid>

					<description><![CDATA[<p>The write-up of my renewable energy project at the Taipei Hackerspace using 2 Kickstarter projects, some electronics, soldering, and lots of sunshine.</p>
<p>The post <a href="https://gergely.imreh.net/blog/2013/11/solar-power/">Make the most of solar power</a> appeared first on <a href="https://gergely.imreh.net/blog">ClickedyClick</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>It didn&#8217;t take the arrival of a horrendous electricity bill to the <a title="Taipei Hackerspace" href="http://tpehack.no-ip.biz">Taipei Hackerspace</a> to start thinking about reducing my electricity footprint. In the last half a year there were two solar power projects on Kickstarter that I signed up for: the <a title="Solar Pocket Factory Kickstarter page" href="http://forums.techguy.org/hardware/996231-micro-mini-retractable-usb-mouse.html">Solar Pocket Factory</a> (SPF), and the <a title="Foldable USB Solar Cell Kickstarter page" href="http://www.kickstarter.com/projects/browndoggadgets/folding-usb-solar-cell">Foldable USB Solar Cell</a> (FUSC). Generally there&#8217;s a lot of sunshine here in Taiwan (when we don&#8217;t have <a title="Barometric recording of Typhoon Soulik" href="https://gergely.imreh.net/blog/2013/07/typhoon-soulik/">a typhoon</a>), and even if I cannot power my laptops from it, could certainly try to power my smartphone&#8230;</p>
<p>It turned out that I needed both Kickstarter projects to make one good device.</p>
<p>The Foldable USB Solar Cell looks awesome and not bad at 7W and 5W (the two pieces I have). The voltage output doesn&#8217;t seem to be very stable, or has strange behaviour as it doesn&#8217;t charge my attached phone when there&#8217;s too much direct sunshine. Thus I cannot really use this directly with devices.</p>
<p>The tiny solar panels in the Solar Pocket Factory are very fragile and I couldn&#8217;t really make them into an actual working cell yet. On the other hand, it came with a 2000mAh battery and a circuit called Li-Po Rider Pro, by <a title="Seeed Studio website" href="http://www.seeedstudio.com/depot/">Seeed Studio</a>. This circuit us solar cell or USB input to charge a battery , plus have a good output circuit to charge a USB device either from the battery when there&#8217;s no sunshine or from the input when there is.</p>
<p>Putting together the Foldable USB Solar Cell and the Li-Po Rider Pro, we have something that kicks arse indeed! Since I only have one circuit and Seeed doesn&#8217;t seem to sell it separately, I thought I could improve on things if I use both solar</p>
<h2>USB adapter for parallel panels</h2>
<p>The easiest idea I could come up with is creating a USB adapter to connect the panels in parallel (thus practically summing them up as current sources).</p>
<figure id="attachment_1638" aria-describedby="caption-attachment-1638" style="width: 493px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1638" alt="USB connector wiring, from the Tech Support Guy forums" src="https://gergely.imreh.net/blog/wp-content/uploads/2013/11/USB_wiring.jpg" width="493" height="321" /><figcaption id="caption-attachment-1638" class="wp-caption-text">USB connector wiring, from the <a href="http://forums.techguy.org/hardware/996231-micro-mini-retractable-usb-mouse.html">Tech Support Guy forums</a></figcaption></figure>
<p>This plan needs two male USB A connectors (the &#8220;cable&#8221; type on the picture) to plug into the panels, and one female USB A (the &#8220;device&#8221; type) to provide the single output. Then female VCC pin is wired to both male VCC pins, and the GND pin similarly to the GND pins. The D-/D+ pins are not in use in this case.</p>
<figure id="attachment_1630" aria-describedby="caption-attachment-1630" style="width: 500px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1630" alt="Parts on the working desk" src="https://gergely.imreh.net/blog/wp-content/uploads/2013/11/solar1.jpg" width="500" height="375" /><figcaption id="caption-attachment-1630" class="wp-caption-text">Part for the solar panel connector. One female and two male</figcaption></figure>
<p>The connectors came in as $0.40 each, the wire I don&#8217;t remember but probably a few cents. I fortunately had both black and red to use with the GND and VCC. Things are better colour coded.</p>
<figure id="attachment_1631" aria-describedby="caption-attachment-1631" style="width: 500px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1631" alt="Soldering together the middle two pins, and hook the ones on the side with wires (here the black wire for the Ground line)" src="https://gergely.imreh.net/blog/wp-content/uploads/2013/11/solar2.jpg" width="500" height="375" /><figcaption id="caption-attachment-1631" class="wp-caption-text">Soldering together the middle two pins, and hook the ones on the side with wires (here the black wire for the Ground line)</figcaption></figure>
<p>First the middle two pins of a male and a female connector is soldered together, just to provide mechanical support. The end of the cable is stripped and hooked around the touching pins (the GND pins on this picture). The two pins + wire is then soldered together, with enough solder to stay, but not that much that the other pins could touch.</p>
<figure id="attachment_1632" aria-describedby="caption-attachment-1632" style="width: 500px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1632" alt="Finished soldering, a bit too much solder, but at least it holds" src="https://gergely.imreh.net/blog/wp-content/uploads/2013/11/solar3.jpg" width="500" height="375" /><figcaption id="caption-attachment-1632" class="wp-caption-text">Finished soldering, a bit too much solder, but at least it holds</figcaption></figure>
<p>Did the same thing for the VCC pins + red wire. Finally added some more solder to the central pins. It was pretty stable like this, though I guess it would be better to have some sort of external housing for it or another way to increase the mechanical rigidity of the connection.</p>
<figure id="attachment_1633" aria-describedby="caption-attachment-1633" style="width: 500px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1633" alt="The extension cord to the extra male connector" src="https://gergely.imreh.net/blog/wp-content/uploads/2013/11/solar4.jpg" width="500" height="375" /><figcaption id="caption-attachment-1633" class="wp-caption-text">The extension cord to the extra male connector</figcaption></figure>
<p>Finally the other connector is soldered, making sure that the right pins are connected (the same as the other male USB). The connectors are then wrapped in a bit of duck tape for some rough insulation. These parts will be outside, both in sun and rain, nothing much can break, but better not test whether I&#8217;m right about this particular point&#8230;</p>
<figure id="attachment_1634" aria-describedby="caption-attachment-1634" style="width: 500px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1634" alt="Cover and plug into the secondary solar panel" src="https://gergely.imreh.net/blog/wp-content/uploads/2013/11/solar5.jpg" width="500" height="375" /><figcaption id="caption-attachment-1634" class="wp-caption-text">Cover and plug into the secondary solar panel</figcaption></figure>
<p>Plugged into the secondary (5W) solar panel, and into the primary (7W) one as well. Duck taped everything down onto the roof well enough that they are not blown away too easily (though I&#8217;d better check on them in a bit, the wind is howling just now outside).</p>
<figure id="attachment_1635" aria-describedby="caption-attachment-1635" style="width: 500px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1635" alt="Primary solar panel with the adaptors" src="https://gergely.imreh.net/blog/wp-content/uploads/2013/11/solar6.jpg" width="500" height="375" /><figcaption id="caption-attachment-1635" class="wp-caption-text">Primary solar panel with the adaptors</figcaption></figure>
<p>As an aside, the duck tape doesn&#8217;t seem to like the sunshine. It sticks its sticky parts on everything, that part doesn&#8217;t seem to spell fun for the future.</p>
<h2>Ready to charge</h2>
<p>When everything is connected, the panels will get pretty good sunshine for the bigger part of the day. I don&#8217;t think they reach max capacity, because the angle is never ideal, but from the practical point of view, they get enough sunshine to max out the attached 2000mAh battery between device charges.</p>
<figure id="attachment_1636" aria-describedby="caption-attachment-1636" style="width: 500px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1636" alt="Hold the panels down, plenty on sunshine (at least this afternoon" src="https://gergely.imreh.net/blog/wp-content/uploads/2013/11/solar7.jpg" width="500" height="375" /><figcaption id="caption-attachment-1636" class="wp-caption-text">Hold the panels down, plenty on sunshine (at least this afternoon</figcaption></figure>
<p>The Li-Po Rider Pro circuit is under the roof, so it doesn&#8217;t get any rain (at least I hope!), and has a little ledge to charge a phone safely as well.</p>
<figure id="attachment_1637" aria-describedby="caption-attachment-1637" style="width: 500px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" class="size-full wp-image-1637" alt="solar8" src="https://gergely.imreh.net/blog/wp-content/uploads/2013/11/solar8.jpg" width="500" height="375" /><figcaption id="caption-attachment-1637" class="wp-caption-text">Charging circuit and filling up my phone</figcaption></figure>
<p>Since all the devices were pretty much full when I checked in the Hackerspace after I finished this setup, the test whether combination of the two solar panels does indeed increase the power is not foolproof. Otherwise I would have charged a device from a low battery level to a bit higher with one panel, then later switch to two panels and see the different slope of the batter charge versus time. Normally at high charge levels (90%+) the slope is varied by the charging circuit (to preserve the lithium battery&#8217;s life), thus that level is not really good to test the difference between the single / dual panel situations.</p>
<p>One thing does suggest, though that the plan worked. Before this modification, charging a phone discharged the Li-Po Rider Pro&#8217;s own battery (there&#8217;s a touch switch on the circuit to get an approximate charge level, indicated by the lighting up of 0 to 4 LEDs on an LED bar), even in full sunshine. This time it seems that both the phone and the storage battery is charged up, indicating larger incoming power than before. I will check it again next time, though (the Nexus 7 tablet we have will be great for that, it has much larger internal battery than my HTC Butterfly phone)</p>
<h2>Possible improvements</h2>
<p>There are a few things I could improve on the setup, focusing on usability.</p>
<p>I hope to get a longer USB cable to reach from the roof to inside the Hackerspace, and set up a charging station within the room. This way people don&#8217;t have to keep their devices out of reach while charging, and there&#8217;s no chance of being ruined by a sudden rain.</p>
<p>I hope to get a larger capacity Li-Po battery. 5-10.000mAh could be good, then it would likely have enough power all the time to keep charging people&#8217;s devices, and not standing idle being full when not charging something, while easily emptied by a single device.</p>
<p>The roof also has plenty of more space, so getting a bunch of other panels, combined with the first two upgrades, would make it really beneficial. These foldable panels would be better portable, and keeping them in one place feels a sort of waste.</p>
<p>Ultimately it would be awesome if I could have a purely solar-powered phone. Because it would mean some money saved, but also, and mostly, because I can.</p>
<p>The post <a href="https://gergely.imreh.net/blog/2013/11/solar-power/">Make the most of solar power</a> appeared first on <a href="https://gergely.imreh.net/blog">ClickedyClick</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gergely.imreh.net/blog/2013/11/solar-power/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Let&#8217;s talk about humidity</title>
		<link>https://gergely.imreh.net/blog/2012/06/lets-talk-about-humidity/</link>
					<comments>https://gergely.imreh.net/blog/2012/06/lets-talk-about-humidity/#comments</comments>
		
		<dc:creator><![CDATA[Gergely Imreh]]></dc:creator>
		<pubDate>Thu, 21 Jun 2012 03:26:34 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ardunio]]></category>
		<category><![CDATA[electronics]]></category>
		<guid isPermaLink="false">http://gergely.imreh.net/blog/?p=1008</guid>

					<description><![CDATA[<p>Got myself a humidity sensor, hooked up to an Arduino to see what does my air conditioning's dehumidifier option do. Also to measure just how humid Taiwanese summer is. Spoiler: very.</p>
<p>The post <a href="https://gergely.imreh.net/blog/2012/06/lets-talk-about-humidity/">Let&#8217;s talk about humidity</a> appeared first on <a href="https://gergely.imreh.net/blog">ClickedyClick</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>It is very much summer now here in Taiwan, and if one thing the Tropics is good at, then it&#8217;s being hot and humid. That&#8217;s sometimes fun, when there&#8217;s enough chance to hang out by a pool or on the seaside, but most of the time not that much. That&#8217;s why there are so many air conditioners, and other clima controls.</p>
<p>As I really like data, and this place is great for electronics, I thought I can just combine the two things, and try to learn more about my environment. Temperature is relatively easy, but for a long time I was looking for a humidity sensor. At the local electronics market I found a few different models the other day, and got one of them &#8211; pretty much the cheapest one, because all the manuals were in Chinese anyway (which I don&#8217;t yet read), and they were also all packed up, so there was not much peeking anyway. There was a combined temperature/humidity sensor board (two sensors already packed up together), but at 450NT it felt pricey and needed to buy some connectors for it as well. There was a larger round capacitive sensor, but it was too large for my liking.</p>
<p>I ended up with a &#8220;CM-R Resistive Humidity Sensor&#8221; (here&#8217;s an <a title="CM-R Humidity Sensor spec sheet" href="http://file.yizimg.com/3381/20061221103057890280486.pdf" target="_blank">English spec scheet</a> for it). It was 250NT (~5 quid or 8 bucks) which makes it relatively expensive equipment for me, though maybe because I was saving my cash in my wallet for going to <a title="Mobile Monday Taipei" href="http://www.mobilemonday.net/category/taipei" target="_blank">Mobile Monday Taipei</a> later that night. Still, if it works then it does worth it, and might get a few more pieces.</p>
<h2>Wiring it up</h2>
<p>I never actually knew how the electronic humidity sensors work, so this is a good primer for that.  Nevertheless, the plan was afoot to hook it up to an <a title="Arduino homepage" href="http://www.arduino.cc/" target="_blank">Arduino</a> and measure some RH% (relative humidity). It was quite tricky for me to figure out the wiring, though, because I never worked with resistive element that could handle only AC voltage, and gets destroyed by DC.</p>
<figure id="attachment_1009" aria-describedby="caption-attachment-1009" style="width: 500px" class="wp-caption aligncenter"><a href="http://gergely.imreh.net/blog/2012/06/lets-talk-about-humidity/humidity/" rel="attachment wp-att-1009"><img loading="lazy" decoding="async" class="size-full wp-image-1009 " title="Humidity Sensor" src="http://gergely.imreh.net/blog/wp-content/uploads/2012/06/humidity.jpg" alt="" width="500" height="333" /></a><figcaption id="caption-attachment-1009" class="wp-caption-text">That white rectangle with black spots, the humidity sensor at work, all plugged in with Arduino</figcaption></figure>
<p>Fortunately there were a couple of people (indeed just 2 or 3 that I could find) who were working with this, and had some good information. The one I went with was <a title="Arduino forums wiring" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1294750404/3#3" target="_blank">this post</a> from the Arduino forums. Was quite informative, though I think the final formula is faulty &#8211; not because I understand it completely (my electronics theory is spotty at best) but because experimentally I figured out what works instead (being an experimental physicist, that&#8217;s pretty much what I do all day anyway).</p>
<p>Finally it is hooked up something like what is shown in this hideous schematics (really got to find some better way to draw this):</p>
<figure id="attachment_1010" aria-describedby="caption-attachment-1010" style="width: 500px" class="wp-caption aligncenter"><a href="http://gergely.imreh.net/blog/2012/06/lets-talk-about-humidity/humidity_schema500/" rel="attachment wp-att-1010"><img loading="lazy" decoding="async" class="size-full wp-image-1010 " title="Humidity sensor schematics" src="http://gergely.imreh.net/blog/wp-content/uploads/2012/06/humidity_schema500.jpg" alt="" width="500" height="437" /></a><figcaption id="caption-attachment-1010" class="wp-caption-text">Humidity sensor schematics, done with Fritzing</figcaption></figure>
<p>After this wiring, I have to switch the digital output (DO) pin between High and Low at about 1kHz with 50% duty cycle. When the pin is on High value, every now and then I measure the voltage with the analog input pin. From the measured voltage I can deduce the resistance of the humidity sensor as</p>
<p><code>RH = R1 / ((Vref - Vm) / (Vin - Vm) - 1)</code></p>
<p>where Vref is the reference voltage (5V of the digital pin), Vin is the measured voltage, Vm is in this case Vref/2=2.5V, the voltage that the capacitors are charged to during all this switching, and R1 is the reference resistance. It works very well, I tried to measure some fixed resistances, and the results are pretty accurate.</p>
<p>When we have the resistance value, the spec sheet has a look-up table for translating the resistance into relative humidity (RH%). It&#8217;s quite cumbersome, because will have to interpolate between values, and it&#8217;s also not that accurate if the temperature is not known. On the other hand, the values from 25℃ can be used pretty well for all normal temperature ranges here in the summer (let&#8217;s say air conditioned 21℃ to outside summery 33℃) with maybe ±5% error in the humidity measurement, that&#8217;s not that bad.</p>
<p>The sensor itself feels really sensitive, just having it in the lab, could sense changes in RH as others were doing water-related things the next room. Even if reading is <a title="Accuracy and Precision on Wikipedia" href="http://en.wikipedia.org/wiki/Accuracy_and_precision" target="_blank">not that accurate, it is still quite precise</a>, and for most of the things it is still okay. I could try in different environments, like our &#8220;dry box&#8221;, which maintains ~20% humidity, but that means quite high resistance of the sensor, MOhm instead of tens of kOhm, so the voltage reading just moving around near 5V, making it not that precise and noisy as well. For 30-90% humidity it works pretty well, though.</p>
<p>To monitor the readings, I wrote up a quick web-app from some reused code with <a title="NodeJs homepage" href="http://nodejs.org/" target="_blank">NodeJS</a>, <a title="ExpressJS homepage" href="http://expressjs.com/" target="_blank">Express</a>, <a title="Socket.io homepage" href="http://socket.io/" target="_blank">Socket.io</a>, <a title="Node-serialport2 on Github" href="https://github.com/joeferner/node-serialport2" target="_blank">node-serialport2</a> and <a title="Flot plotting library" href="http://code.google.com/p/flot/" target="_blank">Flot</a>. There&#8217;s no kill like overkill, but at least I can already monitor it from any other computer as well, it&#8217;s real-time, and the GUI is much easier to adapt than most other ways I know.</p>
<p>All the code for the Arduino and the monitoring server is in my <a title="Weatherstation on Github" href="https://github.com/imrehg/weatherstation" target="_blank">Weatherstation repo on Github</a>. It&#8217;s pretty buggy and not documented, will clean that up later when I&#8217;ll have a good working version.</p>
<h2>Deployment</h2>
<p>Now let&#8217;s get down to some real action. Being at home, I often feel that my flat is way too humid. Firing this circuit up, I got a reading of 80-85% relative humidity, that&#8217;s not something to sneeze at. Then turned on the air conditioning in dehumidifier mode, and watched what happened.</p>
<p>First there was an increase of the relative humidity, because the drop in temperature is quicker and the drop in water content. After chilling for a while, this is how it looked like.</p>
<figure id="attachment_1013" aria-describedby="caption-attachment-1013" style="width: 500px" class="wp-caption aligncenter"><a href="http://gergely.imreh.net/blog/2012/06/lets-talk-about-humidity/humidity_log/" rel="attachment wp-att-1013"><img loading="lazy" decoding="async" class="size-full wp-image-1013" title="Humidity log" src="http://gergely.imreh.net/blog/wp-content/uploads/2012/06/humidity_log.jpg" alt="" width="500" height="311" /></a><figcaption id="caption-attachment-1013" class="wp-caption-text">Humidity logging while running the AC&#8217;s built in dehumidifier (RH% vs time in minutes)</figcaption></figure>
<p>Looks like some funky periodic behaviour, but empirically I felt much better, even if the humidity didn&#8217;t drop much. Maybe the extra comfort comes from the temperature drop as well, so will try to do the same thing in the usual temperature-control-only mode as well, see what does that one look like? I haven&#8217;t had neither my laptop battery charger, nor a spare battery with me, so I couldn&#8217;t run this too long, I wonder what level it would reach over a longer time. Looks like it has a downward slope, but it&#8217;s hard to tell.</p>
<p>Also, the wobbles are likely because of some feedback control that is turning the dehumidifier inside the AC on and off, and that controller has a huge hysteresis. It is not totally surprising, though: as much as I know, dehumidifiers are just big cold surfaces and the water condenses on them from the passing air. For that you have to keep a large surface pretty cold, and it is likely some time to cool a surface or let it warm back up again, thus the controller likely overshoots in both the de- and the re-humidifying parts of the process.</p>
<p>From what I have tried, it feels like a pretty good sensitive sensor, and coupled with</p>
<h2>Plans</h2>
<p>I&#8217;ve seen another way to wire up the sensor <a title="Humidity sensor tutorial" href="http://voltsandbytes.com/using-analog-humidity-sensors/" target="_blank">in a tutorial</a>, which is basically a resonant circuit and the chance of the sensor&#8217;s resistance will change the output frequency. That frequency can be readily <a title="Frequency measurement library" href="http://interface.khm.de/index.php/lab/experiments/frequency-measurement-library/" target="_blank">measured with Arduino</a> already, so if I get the few extra components, might give it a try. It seems that potentially it can have better noise characteristics then the method I&#8217;m using.</p>
<p>Want to add some real logging function to it, maybe saving readings and timestamps into an <a title="SQLite homepage" href="http://www.sqlite.org/" target="_blank">SQLite</a> database, which I can analyze properly later with <a title="Numpy homepage" href="http://numpy.scipy.org/" target="_blank">Numpy</a>. Or maybe store it in <a title="MongDB homepage" href="http://www.mongodb.org/" target="_blank">MongoDB</a>, on which I can still interface and do some concurrent analytics even when the sensor is running. Or maybe I consider that just because I use Mongo for <a title="Frindcare, some improvements" href="http://gergely.imreh.net/blog/2012/06/frindcare-some-improvements/" target="_blank">Friendcare</a>?</p>
<p>Would like to add a 10-LED light bar, which could display the humidity decades without any computer, thus making the whole setup so much more portable. Though for that I will definitely have to revive a <del>74HC595</del> <a title="Shift Register tutorial" href="http://arduino.cc/en/Tutorial/ShiftOut" target="_blank">STP16C596 Serial-in/Parallel-out shift register</a>, because then I&#8217;ll need one resistor and a single DO channel to control those LEDs, instead of 10 DO channels and 10 resistors.</p>
<p>Could also add an LCD screen like this <a title="Sparkfun store SerLCD" href="http://www.sparkfun.com/commerce/product_info.php?products_id=461" target="_blank">SparkFun SerLCD</a>. The only problem is that it interferes with the serial connection, so might not be able to use it together with the computer monitoring. Might worth it, though, that LCD I have (white-on-black with backlight) looks pretty darn funky.</p>
<p>Could also add some long-term monitoring and some other sensors, to build up a real home weather station. I have my eyes on a <a title="Barometric pressure sensor tutorial" href="http://arduino.cc/en/Tutorial/BarometricPressureSensor" target="_blank">barometric pressure sensor</a>, but that&#8217;s quite expensive.</p>
<p><strong>Update (2012/11/6): </strong></p>
<ul>
<li>Been using this in our laboratory for almost two months now, it works quite well, though still thinking of there&#8217;s any better way to measure the resistance of the sensor. Brushing up on RC circuits is in order?</li>
<li>Looks like I&#8217;m not the only one thinking about humidity sensors and data logging: there&#8217;s also <a title="Tom Igoe: Datalogging" href="http://www.tigoe.com/pcomp/code/arduinowiring/1043/" target="_blank">another post</a> from the awesome Tom Igoe.</li>
</ul>
<p>The post <a href="https://gergely.imreh.net/blog/2012/06/lets-talk-about-humidity/">Let&#8217;s talk about humidity</a> appeared first on <a href="https://gergely.imreh.net/blog">ClickedyClick</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gergely.imreh.net/blog/2012/06/lets-talk-about-humidity/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 15/35 objects using APC
Page Caching using Disk: Enhanced 
Lazy Loading (feed)

Served from: gergely.imreh.net @ 2026-06-10 02:01:52 by W3 Total Cache
-->