<?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>USB Archives - ClickedyClick</title>
	<atom:link href="https://gergely.imreh.net/blog/tag/usb/feed/" rel="self" type="application/rss+xml" />
	<link>https://gergely.imreh.net/blog/tag/usb/</link>
	<description>Life in real, complex and digital.</description>
	<lastBuildDate>Sat, 19 Aug 2023 04:28:05 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Making a USB Mute Button for Online Meetings</title>
		<link>https://gergely.imreh.net/blog/2023/08/making-a-usb-mute-button-for-online-meetings/</link>
					<comments>https://gergely.imreh.net/blog/2023/08/making-a-usb-mute-button-for-online-meetings/#comments</comments>
		
		<dc:creator><![CDATA[Gergely Imreh]]></dc:creator>
		<pubDate>Sat, 19 Aug 2023 04:28:00 +0000</pubDate>
				<category><![CDATA[Maker]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Seeed Studio]]></category>
		<category><![CDATA[USB]]></category>
		<category><![CDATA[USB HID]]></category>
		<guid isPermaLink="false">https://gergely.imreh.net/blog/?p=2801</guid>

					<description><![CDATA[<p>Since Google Meet teases us to add a USB device to controll calls, let's learn how to teach an Arduino clone to act like a phone mute button, and thus ultimately being capable to act like an infinite variety of peripheral devices.</p>
<p>The post <a href="https://gergely.imreh.net/blog/2023/08/making-a-usb-mute-button-for-online-meetings/">Making a USB Mute Button for Online Meetings</a> appeared first on <a href="https://gergely.imreh.net/blog">ClickedyClick</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I use Google Meet every day for (potentially hours of) online meetings at work, so it&#8217;s very easy to notice when things change and for example new features are available. Recently I&#8217;ve found a new &#8220;Call Control&#8221; section in the settings that promised a lot of fun, <a href="https://support.google.com/meet/answer/12562325?hl=en">connecting USB devices to control my calls</a>.</p>



<figure class="wp-block-image size-full is-style-default"><img decoding="async" src="https://gergely.imreh.net/blog/wp-content/uploads/2023/08/Screenshot-2023-08-19-at-07.05.34.png" alt="Screenshot of the Google Meet Settings menu during calls, showing the call control menu and a call-out to connect my USB device." class="wp-image-2803"/><figcaption class="wp-element-caption">Google Meet Settings menu during a call, witht the Call control section</figcaption></figure>



<p>As someone who enjoys (or drawn to, or sort-of obscessed with) <a href="https://gergely.imreh.net/blog/category/maker/">hacking on hardware</a>, this was a nice call of action: let&#8217;s cobble together a custom USB button that can do some kind of call control<sup data-fn="7509dd7d-2867-4955-808e-d9bd3a9e8cd4" class="fn"><a href="#7509dd7d-2867-4955-808e-d9bd3a9e8cd4" id="7509dd7d-2867-4955-808e-d9bd3a9e8cd4-link">1</a></sup>: say muting myself in the call, showing mute status, hanging up, etc.</p>



<p>This kicked off such a deep rabbit hole that I barely made it back up to the top, but one that seeded a crazy amount of future opportunities. </p>



<span id="more-2801"></span>



<p>And as a shortcut, there&#8217;s a <a href="#demo">demo</a> below to showcase where I got to.</p>



<h2 class="wp-block-heading">Finding suitable hardware</h2>



<p>This step was harder than I&#8217;ve expected, given that I have drawers and drawers of gadgets, but I&#8217;m likely a bit out of practice, and also out of date. What I was looking for is</p>



<ul class="wp-block-list">
<li>Being able to show up as a USB device (must)</li>



<li>Have built in button (optional) or easy connectivity of buttons without breadboard for now</li>



<li>Have built in LED (optional) or some other way of showing 1 bit of information</li>
</ul>



<p>This doesn&#8217;t sound hard, right?</p>



<h3 class="wp-block-heading">ReSpeaker</h3>



<p>The first option that came up was Seeed Studio&#8217;s <a href="https://wiki.seeedstudio.com/ReSpeaker_Core/">ReSpeaker Core</a> that I had two of at hand: Arduino Leonardo compatibility, touch sensors for buttons, and an LED ring (the &#8220;Pixel Ring&#8221;). Turns out that they have been <em>discontinued</em> &#8211; which should be fine for now; but also my models are two different <em>pre-release prototypes</em> Seeed gave away for testers. Thus they are not quite like the final version, have different hardware on board here and there, so an experimental experience is expected.</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://gergely.imreh.net/blog/wp-content/uploads/2023/08/respeaker_core_prototypes-1024x572.jpg" alt="Photo of two ReSpeaker Core boards" class="wp-image-2809"/><figcaption class="wp-element-caption">ReSpeaker core samples to work with</figcaption></figure>



<p>The earlier prototype only has touch sensors on one side, the pixel ring lights up, but I couldn&#8217;t control it with <a href="https://github.com/respeaker/respeaker_arduino_library">Seeed&#8217;s ReSpeaker Arduino library</a>. The later prototype has two sides of sensors (effectively two buttons), but the lights don&#8217;t seem to work<sup data-fn="17ce950a-5b32-45de-8a5c-2464146a1840" class="fn"><a href="#17ce950a-5b32-45de-8a5c-2464146a1840" id="17ce950a-5b32-45de-8a5c-2464146a1840-link">2</a></sup>. Regardless this </p>



<h3 class="wp-block-heading">Aside: alternatives considered</h3>



<p>It was illuminating to see how much abandoned, obsolete, discontinued, or not quite useful hardware boards do I have.</p>



<p>One is RFDuino, that I got from <a href="https://www.kickstarter.com/projects/1608192864/rfduino-iphone-bluetooth-40-arduino-compatible-boa/">Kickstarter</a>, I&#8217;m yet to use, and all the project&#8217;s websites have already disappeared &#8211; fortunately not the <a href="https://github.com/RFduino/RFduino">code repo</a>. This would have been a more complex solution anyways, but wireless! Use one RFDuino to expose a USB Telephony device, and communicate wirelessly to another that operates the light and button on battery. Pretty cool. Also, it might not have worked if the chip used cannot do the cruicial &#8220;expose a USB [device]&#8221; part of the plan.</p>



<p>Other option that popped up was an <a href="https://store.arduino.cc/products/arduino-nano">Arduino Nano</a> + my own made <a href="https://www.tindie.com/products/imrehg/grovehat-for-arduino-nano/">GroveHat</a> + a <a href="https://wiki.seeedstudio.com/Grove-Button/">Grove Button</a>. Except, the Nano definitely cannot be a custom USB device, so there goes nothing.</p>



<p>Besides these, I&#8217;ve found plenty of:</p>



<ul class="wp-block-list">
<li>single board computers (old or obsolete),</li>



<li>FPGAs (never used, and would be a whole different project to implement something on them), and </li>



<li>other microcontrollers that all have interesting specialties, but don&#8217;t tick the mandatory boxes&#8230;</li>
</ul>



<p>These boards might not be right for now, but definitely there are projects in store for them (if only thre&#8217;s time).</p>



<p>Back to ReSpeaker then&#8230;</p>



<h2 class="wp-block-heading">Plugging in the USB</h2>



<p>The next thing is to figure out what&#8217;s really happening when an USB device is plugged in and it shows the operating system that it can do certain things. That is, how does Meet know that there&#8217;s a compatible device to connect to?</p>



<h3 class="wp-block-heading">The USB HID docs</h3>



<p>This is answered by the <a href="https://www.usb.org/hid">USB Human Interface Devices (HID)</a> specs &#8212; one that is pretty complicated, has a lot of legacy bits, and need a different kind of mindset. In a nutshell, though, with my current, partial understanding:</p>



<p>On connection the device sends a &#8220;report&#8221; to the OS that details on what can it do, including:</p>



<ul class="wp-block-list">
<li>what kind (or kinds!) of device it is?</li>



<li>what functionality of the kind is available in this particular implementation?</li>



<li>what&#8217;s the data layout to pass control information back-and-forth for this implementation?</li>
</ul>



<p>In our example, a very minimal setup would would be:</p>



<ul class="wp-block-list">
<li>I&#8217;m a Telephony Device (Usage page <code>0x0B</code>)</li>



<li>I implement a generic &#8220;Phone&#8221; (Usage ID <code>0x01</code>)</li>



<li>I have capability to do a &#8220;Phone Mute&#8221; (Usage ID <code>0x2F</code>)</li>



<li>Here&#8217;s the 1 bit of a 1 byte payload that conveys that phone mute status</li>
</ul>



<figure class="wp-block-image size-large"><img decoding="async" src="https://gergely.imreh.net/blog/wp-content/uploads/2023/08/Screenshot-2023-08-19-at-07.55.31-1024x920.png" alt="Screenshot of the beginning of the Telephony Device section from the HID Usage Tables" class="wp-image-2808"/><figcaption class="wp-element-caption">Getting started with Telephony devices from the HID Usage Tables</figcaption></figure>



<p>This course does not take into account other functionality, e.g.</p>



<ul class="wp-block-list">
<li>I can also hang up &#8211; Hook Switch, Usage ID <code>0x20</code>;</li>



<li>I have status LEDs &#8211; that&#8217;s a whole fun of redefining functions on the LED Page <code>0x08</code>;</li>
</ul>



<p>and so on. But for the time being this should be enough.</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://gergely.imreh.net/blog/wp-content/uploads/2023/08/Screenshot-2023-08-19-at-06.59.56-1024x924.png" alt="The Call Control usages abd their description from the HID Usage Tables document" class="wp-image-2806"/><figcaption class="wp-element-caption">Call Control functionality for Telefony devices</figcaption></figure>



<h3 class="wp-block-heading">Device implementation</h3>



<p>Fortunately we can stand on the shoulders of giants, that is the <a href="https://github.com/NicoHood/HID">Arduino HID Project</a> which implemented a bunch of different devices. And even though a &#8220;phone&#8221; like this is not among them, we can make some reasonable guesses how it would work.</p>



<p>Having said that, from a forum post that was also trying to do something similar (but based on the TinyUSB library):</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>HID report descriptor is very difficult thing to come up by oneself. You should google around, or dump report descriptor from existing device to copy/follow it.</p>
<cite><a href="https://github.com/hathach/tinyusb/discussions/667#discussioncomment-392454">hathach @ TinyUSB discussion 667</a></cite></blockquote>



<p>Okay, then do not come up with this stuff, instead let&#8217;s look for tools. The USB HID homepage links to the <a href="https://github.com/microsoft/hidtools">Microsoft HID Tools</a> to generate HID reports from a TOML-like language. Except it needs C# and I just wasn&#8217;t ready to dive in a side-quest to install &amp; learn a new toolchain.</p>



<p>So being lazy this way, a bit more sleuthing turned up <a href="https://web.archive.org/web/20210614160735/https://blog.noser.com/first-steps-with-an-usb-hid-report/">someone&#8217;s example HID report</a> for a device very close to what I&#8217;m trying to do, hurray!</p>



<p>I took this and started to poke around the HID project to see how other devices are implemented. Troubleshooting by using the ReSpeaker&#8217;s touch to adjust screen brightness up / down (as a &#8220;Consumer Device&#8221;) was also pretty neat! In the end I took the system buttons example and run with that one.</p>



<p>Having said that, the HID report is really just the interface. The devil is in how to implement actually creating the data packages that passes data according to the report definition. And this is the case when I wish I knew more C++ but copy-paste and some guesswork will have to do.</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://gergely.imreh.net/blog/wp-content/uploads/2023/08/Screenshot-2023-08-19-at-08.48.30-1024x519.png" alt="Screenshot of the Phone HID report definition code" class="wp-image-2814"/><figcaption class="wp-element-caption">Our minimal viable mute button&#8217;s HID report (<a href="https://github.com/imrehg/HID/blob/1851b68b008111734287f6ce4f894173ad21bb3f/src/MultiReport/Phone.cpp#L26C1-L41C1">source</a>)</figcaption></figure>



<p>The current result lives in the &#8220;<a href="https://github.com/imrehg/HID/tree/phone">phone&#8221; branch of my HID Project fork</a>, check for the &#8220;Phone&#8221; bits in &#8220;src/HID-APIs&#8221; and &#8220;MultiReport&#8221; folders, if interested.</p>



<h2 class="wp-block-heading">Minimal viable mute</h2>



<p>The implementation from this point on was pretty straightforward &#8211; since we cut back the scope so much&#8230;</p>



<p>The code to run on the ReSpeaker then just has to do the following:</p>



<ul class="wp-block-list">
<li>when touching one side, send a report with &#8220;Phone Mute&#8221; on</li>



<li>when touching the other, send a report with &#8220;Phone Mute&#8221; off</li>
</ul>



<p>And this is sort of simple<sup data-fn="c40b4257-a075-44fc-aefb-e036c5cb3543" class="fn"><a href="#c40b4257-a075-44fc-aefb-e036c5cb3543" id="c40b4257-a075-44fc-aefb-e036c5cb3543-link">3</a></sup> :</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="870" src="https://gergely.imreh.net/blog/wp-content/uploads/2023/08/arduino-code-for-phone-mute-events-1024x870.png" alt="Screenshot of the Arduino code to send the right mute events" class="wp-image-2821" srcset="https://gergely.imreh.net/blog/wp-content/uploads/2023/08/arduino-code-for-phone-mute-events-1024x870.png 1024w, https://gergely.imreh.net/blog/wp-content/uploads/2023/08/arduino-code-for-phone-mute-events-500x425.png 500w, https://gergely.imreh.net/blog/wp-content/uploads/2023/08/arduino-code-for-phone-mute-events-768x653.png 768w, https://gergely.imreh.net/blog/wp-content/uploads/2023/08/arduino-code-for-phone-mute-events.png 1198w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Sending data on touch events in the simplest way</figcaption></figure>



<p id="demo">For the full use case there would be a lot more complexity for both reading and writing data from the host, controlling multiple peripherals (LEDs and buttons) and the whole logic around it. But for now, it&#8217;s good enough for a demo:</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="A custom USB HID mute button for Google Meet" width="580" height="435" src="https://www.youtube.com/embed/Mz-B7sYGLUI?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>
</div><figcaption class="wp-element-caption">A very quick demo</figcaption></figure>



<p>The code repository is available on Github at <a href="https://github.com/imrehg/arduino-usb-phone-hid">imrehg/arduino-usb-phone-hid</a>.</p>



<h2 class="wp-block-heading">Notes and Future work</h2>



<h3 class="wp-block-heading">The specs</h3>



<p>It&#8217;s great that stuff from 20+ years ago still works mostly the same way. The <a href="https://www.usb.org/sites/default/files/hut1_4.pdf">latest 1.4 version</a> of the HID Tables is nicely formatted, has a lot more device typed defined, but has much less support text. Originally I&#8217;ve read the <a href="https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf">1.12v2 version</a> as that showed up in my search. Back then in 2004 they had an &#8220;examples&#8221; section (see the Telephone at Appendix 10!) which is useful to grok more of the fundamentals. </p>



<p>The newer version also has some devices types that looked suitable, but weren&#8217;t really: Generic Desktop Page (<code>0x01</code>) and <code>0xE0-E2</code> Usage IDs for Call Active LED, Call Mute Toggle, and Call Mute LED respectively. These didn&#8217;t seem to work with Meet, so it might be interesting to try implementing a device that does both and try other online call software.</p>



<p>I should also have read the spec more before diving into hacking on the HID implementation fork, as there&#8217;s a lot more information in the <a href="https://www.usb.org/document-library/device-class-definition-hid-111">HID Device Class Definition</a>, including how to construct the values for many of the fields (I&#8217;m looking at you &#8220;<code>INPUT (Cnst,Var,Abs)</code>&#8220;). RTFM is and remains a solid advice &#8211; and not just when one thinks there&#8217;s time.</p>



<p>Also regarding the specs: some of them I only find in the Internet Archive&#8217;s <a href="https://web.archive.org/">Wayback Machine</a>. If you encounter a good source that should be kept, always add it to the Wayback Machine and preserve it for your future selves and others!</p>



<p>This exploration of USB HID pulled on so many threads, and left so much unfinished, that it&#8217;s a fertile ground for the future, even more than most previous projects.</p>



<h3 class="wp-block-heading">More call functionality</h3>



<p>The most obvious thing is to implement the whole setup with the buttons. I&#8217;ve tried Hook Switch to hang up a call, that works too. Could add status lights, maybe throw in some &#8220;Active Call&#8221; LEDs, or so on. This requires better understanding how data is sent over the wire for USB and how to handle incoming data. The Arduino examples rarely seem to use the &#8220;Output&#8221; fields (ie. incoming data, output from the host&#8217;s point of view, but maybe <a href="https://github.com/hathach/tinyusb">TinyUSB</a> does ?</p>



<p>For this, it would be nice to find a different hardware platform that would make this more seamless (so I can concentrate on the software side more). If that platform would lend itself to be reproduced or made stand alone, that would be even nicer: imaging brining my little call control box that can be used with other computers easily as well&#8230;</p>



<h3 class="wp-block-heading">Implement more USB HID devices</h3>



<p>The <a href="https://github.com/NicoHood/HID">Arduino HID project</a> has a bunch of devices implemented, but there are an infinite numbers that could be added. Unfortunately for Arduino it is harder to add more device types as an add-on to this library versus the current &#8220;forked&#8221; approach<sup data-fn="d18cdbdc-1733-40b6-a512-81c55a158ce0" class="fn"><a href="#d18cdbdc-1733-40b6-a512-81c55a158ce0" id="d18cdbdc-1733-40b6-a512-81c55a158ce0-link">4</a></sup>, so new decices should be in the main project, eventually.</p>



<p>So far there&#8217;s no Telephony device implemented there and it would be nice to find the right level of abstraction that works. The library doesn&#8217;t implement specific HID table pages, but specific usages or a subset of a usage. Thus like always, the hardest part would likely be setting the right interface (the right specs and &#8220;API&#8221;) for a new device to implement both the HID reports and the functions that manipulate what&#8217;s being sent and when.</p>



<p>On the other hand, that does sound like a fun experiment, and I&#8217;d look forward to adding 3D Game Controllers (Game Controls Page <code>0x05</code>), Environmental Sensors (Sensors Page <code>0x20</code>, Usage ID <code>0x30-3B</code>), &#8230; or even a Submarine Simulation Device (Simulation Device page <code>0x02</code>, usage id <code>0x05</code>). These are stuff I go to Hackerspaces for&#8230;</p>



<h3 class="wp-block-heading">WebHID for internet plus USB</h3>



<p>While debugging this HID device behaviour, I found also <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebHID_API">WebHID</a> that brings such devices to the web. This feature seems to be behind Meet&#8217;s and other phone systems like <a href="https://www.3cx.com/blog/docs/webhid-headset-integration/">3CX</a> expanding USB support outside of the OS and into the browser. And no, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1835412">Firefox does not support it</a>, furthermore <a href="https://mozilla.github.io/standards-positions/#webhid">declined supporting it</a>.</p>



<p>Nonetheless it&#8217;s very cool that (if I upskill a bit), I can create a web page that would help me debug such HID development:</p>



<ul class="wp-block-list">
<li><a href="https://developer.mozilla.org/en-US/docs/Web/API/HID/requestDevice">request devices</a> that are filtered in various ways (vendor, product is standard, but usage page and explicit usage is the main key). This is likely what Meet does as well, &#8220;just gimme devices with Telephony usage page (or Phone usage? Need to check exactly) </li>



<li><a href="https://developer.mozilla.org/en-US/docs/Web/API/HIDDevice/collections">read the HID report collections</a> sent by the device, so the results can be debugged, and</li>



<li><a href="https://developer.mozilla.org/en-US/docs/Web/API/HIDInputReportEvent">read device input events</a> that we can then either log for debugging or in an application react to to it</li>
</ul>



<p>This opens a lot more mashup opportunities by the dozen.</p>



<h2 class="wp-block-heading">Finally</h2>



<p>Unlike most other projects I had where I&#8217;m focused on one specific outcome, this turned out to be more focusing on getting a new toolkit (custom USB devices) up and running, so I can think about a wider <em>types</em> of projects to do. In that sense, this feels a big success, even if I know how little I know about programming outside of my day-to-day environment. But ignorance is not a bliss.</p>



<p>And now, going on mute.</p>


<ol class="wp-block-footnotes"><li id="7509dd7d-2867-4955-808e-d9bd3a9e8cd4">Many moons past I used to use a Jabra Evolve 80, that has <a href="https://www.manualslib.com/manual/1021017/Jabra-Evolve-80.html?page=16#manual">a USB accessory</a> controlling call features, so I did have first hand example of what sort of experience I&#8217;d like. <a href="#7509dd7d-2867-4955-808e-d9bd3a9e8cd4-link" aria-label="Jump to footnote reference 1"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/21a9.png" alt="↩" class="wp-smiley" style="height: 1em; max-height: 1em;" />︎</a></li><li id="17ce950a-5b32-45de-8a5c-2464146a1840">I&#8217;ve tried reviewing the <a href="https://github.com/respeaker/get_started_with_respeaker/blob/master/files/RespeakerCorev1.0_Schematic.pdf">hardware schematics</a>, looking into the <a href="https://github.com/respeaker/respeaker_arduino_library/blob/4e04f8c72fa53beeb27dacd8d729a90f79202db7/pixels.cpp">pixel ring control functions</a>, and given that the LEDs seems standard I&#8217;ve also attempted to use the <a href="http://fastled.io/">FastLED library</a> to drive them instead, so far nothing. I still bet on hardware differences from final schematic + my inability to debug it, but it can be faulty hardware just as well. Needs more effort &#8211; in the future. <a href="#17ce950a-5b32-45de-8a5c-2464146a1840-link" aria-label="Jump to footnote reference 2"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/21a9.png" alt="↩" class="wp-smiley" style="height: 1em; max-height: 1em;" />︎</a></li><li id="c40b4257-a075-44fc-aefb-e036c5cb3543">The Arduino code became more &#8220;simple&#8221; once I realised that things set up this way do not need debouncing for the touch sensors. In other cases that would be essential, there&#8217;s sooo much flaky signal to use those terminals as momentary switches or similar. <a href="#c40b4257-a075-44fc-aefb-e036c5cb3543-link" aria-label="Jump to footnote reference 3"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/21a9.png" alt="↩" class="wp-smiley" style="height: 1em; max-height: 1em;" />︎</a></li><li id="d18cdbdc-1733-40b6-a512-81c55a158ce0">At least I don&#8217;t know how nicely extend a library for C++, if that&#8217;s even possible. Keen to learn, though. <a href="#d18cdbdc-1733-40b6-a512-81c55a158ce0-link" aria-label="Jump to footnote reference 4"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/21a9.png" alt="↩" class="wp-smiley" style="height: 1em; max-height: 1em;" />︎</a></li></ol><p>The post <a href="https://gergely.imreh.net/blog/2023/08/making-a-usb-mute-button-for-online-meetings/">Making a USB Mute Button for Online Meetings</a> appeared first on <a href="https://gergely.imreh.net/blog">ClickedyClick</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://gergely.imreh.net/blog/2023/08/making-a-usb-mute-button-for-online-meetings/feed/</wfw:commentRss>
			<slash:comments>2</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>
<p><figure id="attachment_1638" aria-describedby="caption-attachment-1638" style="width: 493px" class="wp-caption aligncenter"><img 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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
	</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 17/74 objects using APC
Page Caching using Disk: Enhanced 
Lazy Loading (feed)

Served from: gergely.imreh.net @ 2026-05-18 22:25:45 by W3 Total Cache
-->