tag:blogger.com,1999:blog-58536073253589142302024-03-18T20:20:59.203-07:00Made of strawstrawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-5853607325358914230.post-84183324760793526562016-03-20T06:10:00.000-07:002016-03-20T06:32:26.514-07:00Art?<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ1LAHx88rwzRFdun9sN65wJ6z2xn4D-U4DgqVn9mWB6qzqZ39HHptw2g-wsCHEMmcqmNGYAGhuc0R903lJ4DUBWNHUHVvhzUNrOCGjUFdcm-sIjzrugZuazd2bhwxP6-OQUFlHi5ErCM/s1600/frame_005899.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ1LAHx88rwzRFdun9sN65wJ6z2xn4D-U4DgqVn9mWB6qzqZ39HHptw2g-wsCHEMmcqmNGYAGhuc0R903lJ4DUBWNHUHVvhzUNrOCGjUFdcm-sIjzrugZuazd2bhwxP6-OQUFlHi5ErCM/s320/frame_005899.png" width="320" /></a></div>
Recently I became altogether too interested in <a href="http://codegolf.stackexchange.com/questions/69930/paint-starry-night-objectively-in-1kb-of-code" target="_blank">a code golf problem that was posted on stackexchange.</a> The problem was to develop a program to draw Van Gogh's starry night using a program of maximum length 1024 bytes. The winning programs used existing image compression algorithms, which makes logical sense, but was somehow aesthetically unsatisfying. The originator reposted a challenge to come up with an optimization based approach, that beat the existing non-off-the-shelf compression approach. The problem is particularly interesting to me because I like algorithms for drawing. The above image is the result I came up with. The original, of course, looks like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje5mluPsRfpowPZGFLkkFgS9m8HAjsQdm4FapE4mqeVcPtCtVrmwPlHp9DuOrF4BE0Tzqi3pQ-aYCGkL25oIXefPrYN7YNsKZkE8rjZpKF_dmTvWZpUHDns6rxI1YrD60sGMg0ID4xWSk/s1600/ORIGINAL.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje5mluPsRfpowPZGFLkkFgS9m8HAjsQdm4FapE4mqeVcPtCtVrmwPlHp9DuOrF4BE0Tzqi3pQ-aYCGkL25oIXefPrYN7YNsKZkE8rjZpKF_dmTvWZpUHDns6rxI1YrD60sGMg0ID4xWSk/s320/ORIGINAL.png" width="320" /></a></div>
<br />
This took a long time. I chipped away at it for a while, got distracted, poked at it periodically - these optimizations take a long time to run - but finally managed to beat the existing top score for non-off the shelf compression. <a href="http://codegolf.stackexchange.com/questions/69930/paint-starry-night-objectively-in-1kb-of-code/75866#75866" target="_blank">Here's what I said on Stack Exchange</a>, and then a bit more detail on a few points.<br />
<br />
<blockquote class="tr_bq">
Everybody has probably forgotten about this problem by now, except me....<br />
<br />
This problem interested me far too much, especially as it quickly became apparent that approaches using image compression algorithms were definitely in the lead, but yet somehow unsatisfying from an aesthetic standpoint. Approaches based on optimizing a set of drawing primitives were somehow more pleasing from a code aesthetic point of view, but seemed blocked just above the 5000 score.<br />
<br />
<a href="http://codegolf.stackexchange.com/questions/69930/paint-starry-night-objectively-in-1kb-of-code/70339#70339" target="_blank">Nneoneo's method</a> that did not use an off the shelf image compression beats the 5000 mark, but does so by encoding a tiny image and upscaling it.<br />
<br />
Here is a program that uses drawing primitives only, is generated automatically by an optimization method, and manages to get a score of 4749.88. <br />
<br />
[Edit: snipped for brevity, but <a href="https://github.com/str4w/starrynight/blob/StackExchange/drawstarrynight.py" target="_blank">available here</a>]<br />
<br />
It uses a number of tricks used previously here:<br />
<ul>
<li>Using a blur to push the final score up a bit</li>
<li>Cramming raw bytes into python code (which is not as simple as suggested earlier in this thread, more characters need to be escaped than just backslashes and nulls, dig into the code here for details).</li>
<li>Compressing the color space into two dimensions. Fascinatingly, this particular starry night image is nearly a plane in RGB space.</li>
</ul>
<br />
As a first primitive, I place a horizon line, splitting the image into two different colored blocks. Afterwards, as a basic primitive I used a circle dragged between two points. This looked vaguely like a brushstroke to me, but was possible to express in 7 bytes. For the search process, I used a guided pattern search. It proceeds by alternately adding a primitive, and optimizing its parameters. The primitive is added on the point where the blurred signed error is highest. The parameters are optimized by exhaustive line optimization over a small domain, one after the other. Forty to fifty primitives are added, and optimized individually. Then, the list of primitives is pruned down to size by throwing away the primitives that help the score the least.<br />
<br />
This <i>still</i> does not beat nneoneo's score. To beat that score, a second stage optimization was required, which goes again through the process of adding primitives at each of several filtering levels, and throwing primitives away to trim the generated program down to size.<br />
What was really interesting to me was the idea of applying this to other images. I applied it to a couple of other images, and provide further details and animation of the primitives being drawn in my blog here.<br />
<br />
The two programs used to generate this won't actually fit in the space allowable on Stack Exchange posts, but they are on github: <a href="https://github.com/str4w/starrynight/tree/StackExchange">https://github.com/str4w/starrynight/tree/StackExchange</a><br />
<br />
starrynight is run first, followed by stage2optimization. The resulting program is also there, in the same directory.</blockquote>
<br />
<div>
Here's a video of the primitives being drawn. The blur - which improves the score by nearly 600 points(!) - is faded in at the end.</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/eHVjIimbhVM/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/eHVjIimbhVM?feature=player_embedded" width="320"></iframe></div>
<div>
<br /></div>
While the code golf aspect of this was kind of fun, I also got interested in the drawing process. I applied it to two other images - both by Roy Lichtenstein. Bedroom at Arles seemed somehow appropriate since it was an interpretation Lichtenstein made of a Van Gogh. And Brushstrokes - besides being quintessential - seemed also somehow on point. Here are the results - the colors may be a bit off as the script still compresses the color space into a plane, which doesn't really apply in general.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioDMJQG0HlHz4j6yI5GLPrTWuSIkEueVB_AF9rkXDJPirJ9l6P2z1PaTseUfzBW5JFBGzfFtLXE93gE6ulqCF8drRsuvyULID5AeJttwVHx5A1JVZijMJNRWpv6arG0CbzqkEtfnqO1DM/s1600/Bedroom_at_Arles.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioDMJQG0HlHz4j6yI5GLPrTWuSIkEueVB_AF9rkXDJPirJ9l6P2z1PaTseUfzBW5JFBGzfFtLXE93gE6ulqCF8drRsuvyULID5AeJttwVHx5A1JVZijMJNRWpv6arG0CbzqkEtfnqO1DM/s1600/Bedroom_at_Arles.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="https://en.wikipedia.org/wiki/Bedroom_at_Arles" target="_blank">Roy Lichtenstein, 1992, Bedroom at Arles</a></td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgkXT5zmP_oCzWY3AwkvHIod0FwqC32HXMnIsZxf7dTfSzIH6bMq-W2nlwF-tDNK57iaYWlpHLN_GRe3TQk88kJ31fMiBrSfG1iWIjj_XFpMYk9UNwbHqpf41-mMa_ZUo_TRuIr8cb_no/s1600/Bedroom_out.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgkXT5zmP_oCzWY3AwkvHIod0FwqC32HXMnIsZxf7dTfSzIH6bMq-W2nlwF-tDNK57iaYWlpHLN_GRe3TQk88kJ31fMiBrSfG1iWIjj_XFpMYk9UNwbHqpf41-mMa_ZUo_TRuIr8cb_no/s1600/Bedroom_out.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Bedroom At Arles, generated by optmization process</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFsyAYnQMSLxvDr_9objwpYwHUsqdcbPOAnZYIOAmm7ko7ZFAJ9XcdjbcB9vu6QY57JPsYukulKG-g2DrIYYrAYpXIWEas8IFEVhW3OC_PfBoXytNPJGGBpt5D_QnqEk7qWl9mcJWIT9Y/s1600/Brushstrokes.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFsyAYnQMSLxvDr_9objwpYwHUsqdcbPOAnZYIOAmm7ko7ZFAJ9XcdjbcB9vu6QY57JPsYukulKG-g2DrIYYrAYpXIWEas8IFEVhW3OC_PfBoXytNPJGGBpt5D_QnqEk7qWl9mcJWIT9Y/s320/Brushstrokes.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="https://en.wikipedia.org/wiki/Brushstrokes_series" target="_blank">Roy Lichtenstein, 1965, Brushstrokes</a></td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinDBb2R8mMcBvpCS-6XgGpApE3o8TUUsQs3pjC1RyPdLkDXDbMNLUnWk-3YDfPQgGbLwjb8ghQIYKMovau1t8aXVFOWnZmGghAhjCdhFY-Sm_d7USCxZVpk6SLKixcQ3pfyZ0xEYf_n6E/s1600/brushstrokes_out.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinDBb2R8mMcBvpCS-6XgGpApE3o8TUUsQs3pjC1RyPdLkDXDbMNLUnWk-3YDfPQgGbLwjb8ghQIYKMovau1t8aXVFOWnZmGghAhjCdhFY-Sm_d7USCxZVpk6SLKixcQ3pfyZ0xEYf_n6E/s320/brushstrokes_out.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Brushstrokes, generated by optimization</td></tr>
</tbody></table>
<br />
<br />strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-64003619590082122842016-02-15T07:23:00.000-08:002016-02-15T07:31:25.826-08:00Heartbeat to Midi, take 3<i>This project actually finished up sometime in 2013... but due to various forms of procrastination, it is getting written up now. There is now a project page at <a href="http://foulab.org/en/user/strawdog/HeartBeat">http://foulab.org/en/user/strawdog/HeartBeat</a>, complete with a link to video of the device in action. You may want to go there directly.</i><br />
<br />
So in the last post, we had a heartbeat monitoring device that worked quite well, but the beats coming out of it were too irregular to be aesthetically pleasing as music. We had some debate amongst ourselves about whether this interbeat variability was real, or an effect of the circuitry triggering at slightly different parts of the waveform on each cycle. In the end, it does not matter. The rhythm has to be smoothed out for the project to work as intended.<br />
<br />
At this point, the problem really became a software one. <br />
<br />
Basically, the heart beat device software has a fast interrupt service routine that captures, as accurately as possible, the heartbeat pulse timing. This is used to adjust the interbeat delay. The main loop then emits a beat whenever this delay has expired from the last time a beat was emitted. The actual calculations are performed in relatively idle times between these two events.<br />
<br />
Testing showed that the main loop was nearly always taking less than a millisecond, so the Arduino's speed did not seem to be a critical factor. <br />
<br />
My first attempts used various kinds of smoothing on the interbeat delay. However, even with this, there was audible variability over the short term. I also tried rejecting outlier observations and a few other nonlinear tricks, but audible problems remained (although simple outlier rejection remains in the final result to avoid "double beats").<br />
<br />
Eventually I realized that the human ear wants <i>stability</i> in the pulses. So I chose a new strategy. The heart beat rate must fall on one of a set of stable rates, and, it must not change back and forth between these rates too rapidly. Arbitrarily, I chose multiples of 5bpm. There is also hysteresis in the changing between these rates. To change from one rate to another, the computed interbeat delay is averaged over the last 12 beats and must move more than 80% of the way to the next bpm rate before the switch is made.<br />
<br />
Two LED's were placed on the box - one to indicate detection of the heartbeat, and one to indicate the output of the note. First tests were very promising - so a model two was made, using an Arduino Nano instead of a Diecimila, and a 9V instead of AA batteries conserved some space, so the whole thing fit in an Altoids tin.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7n6IQti34G7CULkwgwiMoHjXmHx2QydUKe6XWLNLqjbr09obe4mK7zJbbVz-j2PKxrX6C7v38nPPKdsSgga5FgHZbJY1ytIPzY8Pt7NSdjEz5Xqrl0WTXwBH9Bw7-pTG3XrlIW2ghjSA/s1600/DSCF1395.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7n6IQti34G7CULkwgwiMoHjXmHx2QydUKe6XWLNLqjbr09obe4mK7zJbbVz-j2PKxrX6C7v38nPPKdsSgga5FgHZbJY1ytIPzY8Pt7NSdjEz5Xqrl0WTXwBH9Bw7-pTG3XrlIW2ghjSA/s320/DSCF1395.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuWimOV1LjjPF662W1YkWf9_FVp9apmzct49IBKC23s0T-_zLKzClXO3TAleKGWaD7QRVkM0DeEwijC7n0MJKFOrc1rKWj0WTWBqVlvP-W_nQrXmQl3HEXPNhcyZDFeGVITBkWhSmlRqo/s1600/DSCF1396.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuWimOV1LjjPF662W1YkWf9_FVp9apmzct49IBKC23s0T-_zLKzClXO3TAleKGWaD7QRVkM0DeEwijC7n0MJKFOrc1rKWj0WTWBqVlvP-W_nQrXmQl3HEXPNhcyZDFeGVITBkWhSmlRqo/s320/DSCF1396.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrQrOlypOb0X9rJzUkTdCVVdUN_BH_YTkhvMhsa5WHX-Y6IhFa5FABingWbtL-jhfh12PlrbWnKBSHWltCkNOw1tvmMgb_fj3NchBJDb-79hcmjfH9-8AJzq8JvFqmd-Q3wQS1ZDQL1mI/s1600/DSCF1397.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrQrOlypOb0X9rJzUkTdCVVdUN_BH_YTkhvMhsa5WHX-Y6IhFa5FABingWbtL-jhfh12PlrbWnKBSHWltCkNOw1tvmMgb_fj3NchBJDb-79hcmjfH9-8AJzq8JvFqmd-Q3wQS1ZDQL1mI/s320/DSCF1397.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-zTPwn2WkoyQXSrv_XxUEjgx_DZ7CJiKvTMzIdKcI8Xafrm1stw9mkl1PaZnKD0WmygzhN60zmRgyNU-j0cJWFQukHxrCZR0c-r5vzZKecM2vv1_-x9e22b0ZP3E7qIfvlNqVKSOgAZQ/s1600/DSCF1398.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-zTPwn2WkoyQXSrv_XxUEjgx_DZ7CJiKvTMzIdKcI8Xafrm1stw9mkl1PaZnKD0WmygzhN60zmRgyNU-j0cJWFQukHxrCZR0c-r5vzZKecM2vv1_-x9e22b0ZP3E7qIfvlNqVKSOgAZQ/s320/DSCF1398.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz94wtC8QjFixmVCaXMqyormFv-0CP5fduhgi4CTlVOliRJ_JyD0Venv6iZhknoZhkm_5051_Gzalv4jFSgapC-_-BamgKvHEJmAYugcPaxU-7dhXxBXlan8k_mb8o2lUjFCYft0Li5pE/s1600/DSCF1399.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz94wtC8QjFixmVCaXMqyormFv-0CP5fduhgi4CTlVOliRJ_JyD0Venv6iZhknoZhkm_5051_Gzalv4jFSgapC-_-BamgKvHEJmAYugcPaxU-7dhXxBXlan8k_mb8o2lUjFCYft0Li5pE/s320/DSCF1399.JPG" width="320" /></a></div>
<br />
<br />
<br />strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-26793547390604597302013-11-30T05:43:00.003-08:002013-11-30T05:43:53.411-08:00Got a bit further with the etch a sketch at the <a href="http://foulab.org/en/news/Foulab_News/2013/11/21/WIP7" target="_blank">last WIP night</a> at <a href="http://foulab.org/" target="_blank">Foulab</a>. There are at least two components to the backlash problem. One - a curable one - was that the way I was using the AccelStepper and AFMotor libraries was not ideal. I was releasing the motor immediately after finishing the stepping. This caused the last step to be left incomplete, at least some of the time. Introducing a 500ms delay before releasing the motor cleared this up.<br />
<br />
This was detectable by writing a very simple program that took just a few steps (in this case 3) very slowly. Then I could count the steps by eye, and see that some were missed.<br />
<br />
That cleared up a lot of the irregular wobbling. However, there is real backlash in the etch a sketch mechanism. When the direction of movement is changed, there are nearly 10 steps where there is basically no movement, and another 5 or so where the movement is proportionally reduced. It would appear that this is due to stretch inside the etch a sketch itself, not in the gearing. It persists even if the other axis is moved in between the forward and reverse movements.<br />
<br />
You can see this in the picture - each step in the zigzag is ostensibly the same number of steps. The squished ends are due to this backlash.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyDtGzeHvbr-NfI1fRZl6qqAuYh6pKzBsT1Ks_GKtjwdXuc3nHgVlIAGrtqeKmJlafXzGC1OkrYf-iFLbAbVnRZSabfQXnw9VgTl8ME_9sC8ppOnmpf5cAVSqMTmgc0uzBpcjJOXANdr8/s1600/DSC_0340.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyDtGzeHvbr-NfI1fRZl6qqAuYh6pKzBsT1Ks_GKtjwdXuc3nHgVlIAGrtqeKmJlafXzGC1OkrYf-iFLbAbVnRZSabfQXnw9VgTl8ME_9sC8ppOnmpf5cAVSqMTmgc0uzBpcjJOXANdr8/s1600/DSC_0340.jpg" height="180" width="320" /></a></div>
<br />
Just to be clear, i moved the cursor down and left to the bottom corner of the drawing shown, then shook the sketch. Then the motors were moved in a zigzag to the right, then the reverse pattern. The squishing at the ends is due to the backlash - note that the backlash in each direction is almost perfectly equal, meaning that the ends line up. Gives hope for correcting it.strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-23620893019001853402013-10-03T20:13:00.001-07:002013-10-03T20:13:44.623-07:00Backlash complications.Did a little work on the etch a sketch device at <a href="http://foulab.org/en/news/Foulab_News/2013/09/25/WIP1" target="_blank">Work in Progress night</a> at <a href="http://foulab.org/" target="_blank">Foulab</a> yesterday. Nothing amazing to report, but was able to observe more clearly the strange backlash problems that it has. The following pic shows a square wave of 100 steps up, and 50 steps over, followed by one back moving -100 steps in y and -50 in x each time. It <i>should</i> produce a nice level series of even rectangles. Obviously it does not - theres a lot of drift. At least some of the drift seems to be hysteresis in the movement, and it may also be skipping a step occasionally, especially the vertical axis.<br />
<br />
Well, such is the nature of work in progress.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNWG7Er0fS4qDKxEQtfkzhSk20HiYY1QER5_hTNTy_chpTCx-cfIR4W_p8bzNnKmE7InDDhO5cMR5r_7VMIB73rBMXuY3oqhkZRRrLzYfG-TQlPHfnOK6ylNXs7m3HPXKzcnjjYClmPBA/s1600/DSC_0153.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNWG7Er0fS4qDKxEQtfkzhSk20HiYY1QER5_hTNTy_chpTCx-cfIR4W_p8bzNnKmE7InDDhO5cMR5r_7VMIB73rBMXuY3oqhkZRRrLzYfG-TQlPHfnOK6ylNXs7m3HPXKzcnjjYClmPBA/s1600/DSC_0153.jpg" height="180" width="320" /></a></div>
<br />strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-68092815919081591842013-03-15T04:13:00.004-07:002013-03-15T04:15:13.963-07:00Bracket for PrusaNearly a year since the last post. Oops. It was a busy year. Among other things, built a 3D printer, something that will probably feature in future posts on this blog. Its a Prusa Mendel I3 - built it at <br />
<a href="https://www.facebook.com/media/set/?set=a.546236595394832.122614.412201882131638&type=1" target="_blank">Voxel Factory / Foulab Prusa Mendel Build Party</a><br />
<br />
<br />
Whats the first thing everyone prints on a 3D printer? Parts for the 3D printer of course. I am no exception. First non-calibration print - a bracket to hold the LCD screen on.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvXLGYPfb756xS-WbchXJzfwiEki4WCAG2oe-YubgrSZYe_qxHudngatH182O0Ky0YrRzBE5WxZRJsxHKV5mh880w79fkaSGP9SlrJtsmH6szpsTIIFdA4TjbK9KgOBx4lbFQH_kVr2eA/s1600/prusabracketsmallwtext.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvXLGYPfb756xS-WbchXJzfwiEki4WCAG2oe-YubgrSZYe_qxHudngatH182O0Ky0YrRzBE5WxZRJsxHKV5mh880w79fkaSGP9SlrJtsmH6szpsTIIFdA4TjbK9KgOBx4lbFQH_kVr2eA/s1600/prusabracketsmallwtext.jpg" height="240" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
Files on thingiverse: <a href="http://www.thingiverse.com/thing:62091">http://www.thingiverse.com/thing:62091</a><br />
<br />
Alright, its pretty minor, but I have to ease back into this blog thing. strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-31418985521696400712012-05-08T04:53:00.001-07:002012-05-08T04:53:43.607-07:00Heater controlThis project has been a long time coming. A <i>looooooong </i>time. In fact, it was one of the first I started after joining Foulab. The project is a set of wireless (well X10, so it goes through the house wiring) controllers for the heaters in my apartment. Each controller uses a DS1820 temperature sensor, and an ATmega 168 microcontroller.<br />
<br />
Heres one of the finished products, and a graph of the temperature in the kitchen. <a href="http://foulab.org/en/user/strawdog/Heater" target="_blank">The full writeup</a> is on the Foulab website.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_O5SGLyjHYuvrHWoprANUnvPyZ2wR0Kcm7RJzhGoT1TcqiOoQTN3dUDZS2OZcO8JJWemgJvBMEh6PN2qfIRQKmsS8sLnl4RlyC5_foX3NoHD2bWgpNsuXpqynK1kKaN1Paoo5yHACpxw/s1600/finished_sweettarts.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_O5SGLyjHYuvrHWoprANUnvPyZ2wR0Kcm7RJzhGoT1TcqiOoQTN3dUDZS2OZcO8JJWemgJvBMEh6PN2qfIRQKmsS8sLnl4RlyC5_foX3NoHD2bWgpNsuXpqynK1kKaN1Paoo5yHACpxw/s320/finished_sweettarts.png" width="229" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi6F2Eagf5UkXfBCMKQuGM7-9VTz1iLxnRVUbfWceCtXGLfmzeXBDtT1LKuTak6FhtxLiylPZ7Tn6zdzluCDda_vfSG89znVygTtIcgpa-FIUQ9i-yqZk0Boy2YJdOA6PwMr6EL1FvJF8/s1600/graph_kitchen_feb19-26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi6F2Eagf5UkXfBCMKQuGM7-9VTz1iLxnRVUbfWceCtXGLfmzeXBDtT1LKuTak6FhtxLiylPZ7Tn6zdzluCDda_vfSG89znVygTtIcgpa-FIUQ9i-yqZk0Boy2YJdOA6PwMr6EL1FvJF8/s400/graph_kitchen_feb19-26.png" width="400" /></a></div>strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-77620014330677817662012-04-21T11:29:00.000-07:002012-04-21T11:29:55.821-07:00CNC gear cutting experimentsFoulab is fortunate enough to possess a small CNC machine, suitable for cutting wood and plastics. I've been interested in cutting out wooden gears for a while. I wanted to try a relatively easy project, to learn a bit before taking on anything major. As you will see in this post, that was probably a good idea.<br />
<br />
As a preliminary project, I decided to make a spirograph. Not a mini, notepad sized one, for a fine tipped pen. A chunky, full sheet of paper kind, for a Sharpie.<br />
<br />
As a first attempt, I used Inkscape's render function to generate gears. The number of teeth is self-explanatory, the circular pitch ends up affecting the radius. I used 37, rather arbitrarily. It turns out i just barely made the gear big enough for a 1/8 inch cutter to cut it out, so it was a good guess on my part. Its worth noting that its quite important to pay attention to this - you need to scale all your gears the same if they are to mesh, so if you forget, you will have to work it out tediously by measuring and dividing.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6RLU60MY3VgKdx_GXuOs-PsFqeInyM36biQutegQl7YSZCjpcoAi46qYWYcHPgJXvAj0yTVT7LCnEp2wsxPwSQ5N-T3OM2YqYJ8CrRAlkBSbhMqIuxgzvQFzMdi7gQlPLZXo3KJVBZlU/s1600/inkscape_snapshot1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="194" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6RLU60MY3VgKdx_GXuOs-PsFqeInyM36biQutegQl7YSZCjpcoAi46qYWYcHPgJXvAj0yTVT7LCnEp2wsxPwSQ5N-T3OM2YqYJ8CrRAlkBSbhMqIuxgzvQFzMdi7gQlPLZXo3KJVBZlU/s320/inkscape_snapshot1.png" width="320" /></a></div><br />
The existing Foulab CNC chain was <a href="http://www.qcad.org/en/" target="_blank">QCad</a> for drawing, <a href="http://gcnccam.sourceforge.net/" target="_blank">gCNCCam</a> for generating the G-code, and <a href="http://www.linuxcnc.org/" target="_blank">EMC2</a> for controlling the machine. Inkscape saves to DXF, which can be loaded by QCad so I loaded my gear directly there. The center is not indicated by Inkscape, but is easily found geometrically, as shown.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_umLjjIA7u7XN2IqlEqb7Wc7pMqzYCk1UfHqYp_13bshXoiJb-EPWFrpU-WeFItUV4a6wYCDAR0ht35B9EhAweonz8IPkM3aDFSyB7l_7788V20FPEUGwteviI2fuBAeVVs7Yf8a5Y5c/s1600/findcenters.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_umLjjIA7u7XN2IqlEqb7Wc7pMqzYCk1UfHqYp_13bshXoiJb-EPWFrpU-WeFItUV4a6wYCDAR0ht35B9EhAweonz8IPkM3aDFSyB7l_7788V20FPEUGwteviI2fuBAeVVs7Yf8a5Y5c/s320/findcenters.png" width="320" /></a></div><br />
gCNCCam has some problems generating a proper entry move, so we use a modified version, available <a href="https://github.com/jedediah/gcnccam" target="_blank">here</a>. <br />
<br />
I put a central hole to act as an axis, and a couple others to act as placement points for a Sharpie. I then drew a large outer gear ring, which would be treated as the outer ring gear. It was so large, i had to cut it into two parts, to fit on the CNC. I tottled off to the lab to cut it.<br />
<br />
Total fail. EMC2 refused to cut it, and rightly so, since the tool radius was such that many of the corners could not be cut out. No concave corner can be tighter than the tool radius. Unfortunately, gCNCCam doesn't complain about this, and its processing for a file of this complexity was very slow.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXYn4rASreAyhWmCG1cYIE-SRNCMj1Suhaac7I49xDNMYubnz1D7qKDynnMGnV3jRZMfvwMx4XA719qddkiEMCNl46GoHoYrmPob2SVPPGCB97TlgOUF-uub0Z9EeGq8OMorcz1flgomU/s1600/sharpcorner.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXYn4rASreAyhWmCG1cYIE-SRNCMj1Suhaac7I49xDNMYubnz1D7qKDynnMGnV3jRZMfvwMx4XA719qddkiEMCNl46GoHoYrmPob2SVPPGCB97TlgOUF-uub0Z9EeGq8OMorcz1flgomU/s1600/sharpcorner.png" /></a></div><br />
I manually edited the drawing, to round out the bottoms of the gears. This process quickly became iterative, and slow. Heres my advice:<br />
<ul><li>Cut out a small piece of gear, gCNCCam will work much faster, and if it will cut one tooth, it will cut them all. However, bear in mind that: </li>
</ul><ul><li>If the G-Code fails, look closely at where. When I chopped my gear into parts, it was the point where I chopped it that had a tiny concavity, not the tooth itself. Putting a small round on that corner resolves the problem.</li>
<li>Numerical issues can also cause problems. I've had better luck designing the drawing for a tool with 3.2mm diameter, and telling EMC2 that the tool diameter was 3.199mm.</li>
</ul><ul><li>The gCNCCam to EMC2 loop quickly gets tedious, and at first, I was doing the drawings at home, and then heading to Foulab to discover that EMC2 would reject them. Loading the file in gCNCCam can also be very long. (It seems to do all its work on load, or when a parameter is changed, analyzing the graph then. Clicking the generate GCode button is anticlimactic, and takes only a moment.)</li>
<li>The solution I found was to install a virtual machine with the EMC2 distro, and run the design through at home, before heading to the CNC. The boring wait for processing could be offset by working on other things.</li>
</ul><br />
Its also worth noting, that gCNCCam got inside and outside backwards on the drawing. So my first attempt at the ring gear had the tool on the inside, with, needless to say, poor results. gCNCCam draws an arrow in the direction of cut. If your template is for counter clockwise, but it draws the arrow clockwise, switch the tool from inside to outside. <br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHdp67wOwJwzbCVXQffjLP5tL4DEG6QyO0fyBf6YwvoLQ9GD6QjyD-0DlgsN5qm_-ZQsTtBDg8eH9nKyWuHg_PqzF_xzGxWTGDNGJbBBsRa0cVnMTqO-d2KEt68agK5IeQHLG4LBf4cMc/s1600/gcnccam.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="139" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHdp67wOwJwzbCVXQffjLP5tL4DEG6QyO0fyBf6YwvoLQ9GD6QjyD-0DlgsN5qm_-ZQsTtBDg8eH9nKyWuHg_PqzF_xzGxWTGDNGJbBBsRa0cVnMTqO-d2KEt68agK5IeQHLG4LBf4cMc/s320/gcnccam.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Use a small piece to work out if the tool can cut it it will be much faster. Also, watch gcnccam closely, this was supposed to be a counterclockwise cut, but its moving the tool clockwise. Inside and outside will be reversed.</td></tr>
</tbody></table><br />
<br />
So after much hand editing, I got it to work. I cut the gears out of MDF, which can be cut pretty fast, and even then, the cutting time was LONG, over an hour for the ring gear. <br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqYRDvizoKPBNFvm4TvgeGPfuUbvR3jUedSAplPoYkrqa22B0Gx2us21sMiN0bQI7uJwNHWgB24riV2w0PE9OpyZIHgx-riwhTVQYwy9saVYr7fTPqnPwHcW6oSjgL1J64y6CQyZvRtAo/s1600/IMG_2783.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqYRDvizoKPBNFvm4TvgeGPfuUbvR3jUedSAplPoYkrqa22B0Gx2us21sMiN0bQI7uJwNHWgB24riV2w0PE9OpyZIHgx-riwhTVQYwy9saVYr7fTPqnPwHcW6oSjgL1J64y6CQyZvRtAo/s320/IMG_2783.JPG" width="320" /></a></div>I cut out a 24 tooth inner gear and a 72 tooth outer gear, glued some legs on and got down to drawing. And this is where those of you who kept reading to the bottom of the post get to laugh at the author. Thats right - 72 and 24 - so it draws:<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieOjs8ksMBIIgWZ3Y4oUVHZGtOkVN9b9rZimBOfLSpYrZkQpQWvcZ_-TnydAHxKIV4tiVDgQqCHfOsgzdSenV7v1oVvW5ih8h79UpgYpJTmeeDDyqzERcru6tuBvALfLcDbNZ_gd3ZVyI/s1600/IMG_2785.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieOjs8ksMBIIgWZ3Y4oUVHZGtOkVN9b9rZimBOfLSpYrZkQpQWvcZ_-TnydAHxKIV4tiVDgQqCHfOsgzdSenV7v1oVvW5ih8h79UpgYpJTmeeDDyqzERcru6tuBvALfLcDbNZ_gd3ZVyI/s320/IMG_2785.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Since 72/24=3 i get a lovely triangle</td></tr>
</tbody></table><br />
<br />
Twenty-five and 27 tooth inner gears will be coming up shortly, don't worry. After this, however, I will probably write my own gear drawing code. The Inkscape renderer looks good, but it has too many concave corners that have to be hand edited.strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-48880824709848854742012-04-06T06:49:00.001-07:002016-02-15T07:28:23.311-08:00Heart beat to midi, take 2<i>EDIT: This project actually finished up sometime in 2013. There is now a project page at <a href="http://foulab.org/en/user/strawdog/HeartBeat">http://foulab.org/en/user/strawdog/HeartBeat</a>, complete with a link to video of the device in action. You may want to go there directly.</i><br />
<br />
So it took about a month to get organized again, and once again <a href="http://davidusher.com/">David</a> did most of the work for us. It turns out the <a href="http://en.wikipedia.org/wiki/Gregory_Lekhtman">inventor</a> of <a href="http://www.exerlopers.com/instap.htm">Exerlopers pulse monitoring equipment</a> lives in Montreal. He quickly turned around a customized version of their pulse detector that outputs a 5v signal when the heart beat is detected.<br />
<br />
Gapzap had actually constructed an EKG on himself. In that experiment, he had found that the myoelectric signals interfered a lot with the heart rate. In the <a href="http://www.google.com/patents/US5337753?printsec=abstract&dq=5337753&ei=zeB-T_T-PI-e8gTXsrTWBw#v=onepage&q=5337753&f=false">patent for this pulse detector</a>, theres a lot of discussion about filtering those signals. Originally, Gapzap found <a href="http://www.google.com/patents/US6018677?printsec=abstract#v=onepage&q&f=false">this other patent</a>... looks like a bit of overlap. But I digress.<br />
<br />
Anyway, the pulse detector seems pretty good at first view. Construction is solid, and it responds well to anyone who picks it up to use it. Heres a shot of the version 1 pulse to midi hooked to the new sensor.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwqqCUrwHWbSTs-fW_wcVexivv-1elU0V5T0HJ4AR7j7XW3zQ77-gMwOfGz0kDyYWvwuY9CpOW07l3TbTJ3dTTQxqq3mhaQOwcOc-jEbrWrlpqvuXq4TRs6zN8Y_PyfZJqM_gLmlOnoEM/s1600/IMG_2774.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwqqCUrwHWbSTs-fW_wcVexivv-1elU0V5T0HJ4AR7j7XW3zQ77-gMwOfGz0kDyYWvwuY9CpOW07l3TbTJ3dTTQxqq3mhaQOwcOc-jEbrWrlpqvuXq4TRs6zN8Y_PyfZJqM_gLmlOnoEM/s320/IMG_2774.JPG" width="320" /></a></div>
<br />
So - its time to analyse whats coming out of it. I wrote a quick Arduino program to get the pulse timing as precisely as possible. (The code is up on github, <a href="https://github.com/str4w/HeartbeatMidi/blob/master/heartbeattimer.pde">here</a>.) And I gathered a couple minutes of data to take a look at. The first few samples, as i was grabbing on to the sensor, and the last sample as I let go were outliers. But the middle part was pretty consistent. Heres a histogram: <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2ozVNUJ0yJc5FMDGRKJWWlaqrxuWL0a2dZWN7Z2F-Yule9aXyPfD9yJgvR9u4A-ZWqaE0DZVy8KIAfhpMsTApFpEj6uIO0i826RFQ_j2epN8p-An53oBgCeatVuSRNIeVhsnkWfOEsB4/s1600/histogram1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="275" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2ozVNUJ0yJc5FMDGRKJWWlaqrxuWL0a2dZWN7Z2F-Yule9aXyPfD9yJgvR9u4A-ZWqaE0DZVy8KIAfhpMsTApFpEj6uIO0i826RFQ_j2epN8p-An53oBgCeatVuSRNIeVhsnkWfOEsB4/s320/histogram1.png" width="320" /></a></div>
Bottom scale is microseconds. It seemed unlikely that just going direct to midi is a good idea - the small irregularities in the heartbeat will be quite jarring to the ear. And, in fact, that was the case. Heres a sound sample:<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dwE6CyaZG1W2xvfX78s3tDl2S8GFTE-0qd2pfPcCU3jhPVnayZ8sHDxFH3jLUKAKOTMeokcaH5zONiJssfbvA' class='b-hbp-video b-uploaded' frameborder='0'></iframe><br />
So, not quite done yet, time to break out some filtering algorithms.strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-57176617903796042372012-03-29T04:50:00.001-07:002016-02-15T07:28:39.115-08:00A heart beat to midi converter<i>EDIT: This project actually finished up sometime in 2013. There is now a project page at <a href="http://foulab.org/en/user/strawdog/HeartBeat">http://foulab.org/en/user/strawdog/HeartBeat</a>, complete with a link to video of the device in action. You may want to go there directly.</i><br />
<br />
Some while ago, <a href="http://davidusher.com/">David Usher</a> approached Foulab about creating a device to convert heartbeats into midi signals. Fortunately for us, he had already done a large part of the work and had got a hold of the <a href="http://pulsesensor.com/">optical pulse sensor recently featured in Make</a>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvOAKEblcuH6KnCtwM8xbnO651iZUQ8cV7mlYsOVDAXVwRlwV7X9doeJDIV9w_JlvEF7kO9X_0yyq1_afE1dYlcXM88yUu1Anz5NrmjW9Vsiasw9_tfBAfTlv0L4Rj46A9h9j_AsIx1m0/s1600/pulsesensorclose.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="121" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvOAKEblcuH6KnCtwM8xbnO651iZUQ8cV7mlYsOVDAXVwRlwV7X9doeJDIV9w_JlvEF7kO9X_0yyq1_afE1dYlcXM88yUu1Anz5NrmjW9Vsiasw9_tfBAfTlv0L4Rj46A9h9j_AsIx1m0/s200/pulsesensorclose.JPG" width="200" /></a></div>
<br />
The pulse sensor shines a green light on the skin which is partially reflected onto a photosensor. This outputs an analog signal, that, when conditions are right, indicates the intensity of blood flow beneath the skin, and thus to the heartbeat. First tests were promising - modifying the Arduino code provided with the sensor to play a midi note was straightforward. In the video below you can hear a note played for 50ms every detected heart beat. <br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQP35VNgPUiM4EzE2xTpp8PSx0at_6leBtP6zLmOoI8pA-TaLjBZ43Ob9R76ZRmfrT5J8wuvBu67w93AkOoC_QYYGovmP9tX2PJegfPPr1HCPvfxFaCcrcQzoij2tVjE8VVPrdDLvGr-A/s1600/firstbuild.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQP35VNgPUiM4EzE2xTpp8PSx0at_6leBtP6zLmOoI8pA-TaLjBZ43Ob9R76ZRmfrT5J8wuvBu67w93AkOoC_QYYGovmP9tX2PJegfPPr1HCPvfxFaCcrcQzoij2tVjE8VVPrdDLvGr-A/s320/firstbuild.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">First build is a bit ghetto, didn't even have a midi cable. Also - note to self: dust the piano, sheesh.</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dymh4DlbcA6-msPvYsmB1gFa9wTue9SAmiizroGEBqEpyYg9s8xFSOcj67FSPQUN7AjB_y4u7Ga4QBLrPShrQ' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<br />
One catch was that David wanted to take this on tour in a couple days. Gapzap and I spent a crazy Tuesday evening putting together a robust project that would hopefully hold up in stage use. In the end, the construction quality was pretty good (for which Gapzap should get most of the credit, I was up to my usual sloppiness, note the broccoli elastics).<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAPs_acVwaYhgrHIGwsKIef4Vp_cuVx1I50uAcMC49UsK7zu1lF2hvYdaFK7c4TqR5vncaIth-gnATTdUfespDaRHVHEyMu3uulec9b5YdaSf-Cn1XH6w57arr0jvxV7qIVnJuLUEIA64/s1600/DSCF1088_small.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAPs_acVwaYhgrHIGwsKIef4Vp_cuVx1I50uAcMC49UsK7zu1lF2hvYdaFK7c4TqR5vncaIth-gnATTdUfespDaRHVHEyMu3uulec9b5YdaSf-Cn1XH6w57arr0jvxV7qIVnJuLUEIA64/s200/DSCF1088_small.JPG" width="200" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtoc1B8hGvloRymmStVOKTFOe5Wi1Pjrnq4krU_LLWfKoxN9TgHFaDoIoplaMlDPKBn6Tr_OcFVB8_cCLYu8gfTWUf4kUiscicY8OMjmZ0VU0XRBdlTR4dmkHHgH8s5nwcJcs4UNbCA_o/s1600/DSCF1090_small.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtoc1B8hGvloRymmStVOKTFOe5Wi1Pjrnq4krU_LLWfKoxN9TgHFaDoIoplaMlDPKBn6Tr_OcFVB8_cCLYu8gfTWUf4kUiscicY8OMjmZ0VU0XRBdlTR4dmkHHgH8s5nwcJcs4UNbCA_o/s200/DSCF1090_small.JPG" width="200" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS123lvs4Ybf-ciT1_Wf38nadmxU-vg7VEyJW01vcSDo5pl4rOlABnrrWSkBoFhS_LFb6JpOY300pdyFN2s2f9GRzT5OydDT5a31t_RfgRBEzLbZbxdG2ALReEX3tAE58KvCdOqlpwAec/s1600/DSCF1091_small.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS123lvs4Ybf-ciT1_Wf38nadmxU-vg7VEyJW01vcSDo5pl4rOlABnrrWSkBoFhS_LFb6JpOY300pdyFN2s2f9GRzT5OydDT5a31t_RfgRBEzLbZbxdG2ALReEX3tAE58KvCdOqlpwAec/s200/DSCF1091_small.JPG" width="200" /></a></div>
<br />
Alas, it was for naught. The sharp eyed readers will have noted the key phrase "when conditions are right" above. They have to be exactly right. In playing with it, David found sometimes it would work, sometimes not. Some people it just never worked on. And in all cases, the heartbeat was not as regular as you would expect - which might be a real phenomenon, the heart is not a clock. You can hear this in the video, it seems alternately jumpy, then halting. But in any case, it couldn't be played along with.<br />
<br />
Still, not bad for a Tuesday night. So that iteration was put aside, until its time for take 2.strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-11871255137441922942012-03-24T04:19:00.000-07:002012-03-24T04:19:32.463-07:00Nixie tube goodnessWhen shopping for the VFD, LegionLabs also brought me back some <a href="http://en.wikipedia.org/wiki/Nixie_tube">Nixies</a>! Nixies require a high voltage supply... ok, given certain other experiments on this blog, a medium voltage supply - usually said to be 200V or so. In my laziness, I tried the simplest possible supply - rectifying the 110V wall voltage and smoothing it with a capacitor. Works a peach.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF0GOoWrHrwPiE0qEEsrOFmCWctP4T9fvcx-0ItpJDNg5BU1HclFiwIz8UKc4qjeBxBi0sTbHH6MIZv3A0q51lshTV4LUbJaxib8UGFuwCbM7dmsZAYA_XGAdvUCnEJdD_xOSJtMmWobM/s1600/DSCF1118.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF0GOoWrHrwPiE0qEEsrOFmCWctP4T9fvcx-0ItpJDNg5BU1HclFiwIz8UKc4qjeBxBi0sTbHH6MIZv3A0q51lshTV4LUbJaxib8UGFuwCbM7dmsZAYA_XGAdvUCnEJdD_xOSJtMmWobM/s320/DSCF1118.JPG" width="320" /></a></div>This ends up at 155V or so (110V x 0.707). Not that a voltage doubler is hard in the end, i just had a bridge rectifier right there. I'm using a 47K resistor in this picture - although in other tests a 36K seemed to give a slightly better brightness. The tube uses around a millamp.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpYOr_-WjUov_bnNhkNXR1yNyi0QjQe93tPjdcfeXbilQ43c5EfP4yUM7Ft944chSxWENirG00svmOGmheg984b_JQlYdqKXIe72pdhqytkTq2nj0LkkUo0a0G9MqtNlgdYf4Rb6CI07g/s1600/DSCF1117.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpYOr_-WjUov_bnNhkNXR1yNyi0QjQe93tPjdcfeXbilQ43c5EfP4yUM7Ft944chSxWENirG00svmOGmheg984b_JQlYdqKXIe72pdhqytkTq2nj0LkkUo0a0G9MqtNlgdYf4Rb6CI07g/s320/DSCF1117.JPG" width="320" /></a></div>In an example of total overkill, i <a href="https://www.circuitlab.com/circuit/t7ka75/nixie-power-supply/">simulated the circuit </a>using CircuitLab. It was a really just a way to try out Circuitlab on something easy, and in the end, i'm a fan.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfMvI3iIbmzOz9sAGF62EScc4k2eHA5IZU1ZZmkVfYysbent8zRM_RQIMYDcUQhjT-1O4_mZ9H8YeWJaKpRktl2TF2qCU6PmESM9chmEAOAPcasViq-x9AbI55T9YKWIzS0syVieUhE0k/s1600/540x405.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfMvI3iIbmzOz9sAGF62EScc4k2eHA5IZU1ZZmkVfYysbent8zRM_RQIMYDcUQhjT-1O4_mZ9H8YeWJaKpRktl2TF2qCU6PmESM9chmEAOAPcasViq-x9AbI55T9YKWIzS0syVieUhE0k/s1600/540x405.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="https://www.circuitlab.com/circuit/t7ka75/nixie-power-supply/">Simulated on Circuitlab</a></td></tr>
</tbody></table>strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-44868129277060290702012-03-18T09:52:00.000-07:002012-03-18T09:52:14.366-07:00Vacuum Fluorescent DisplayIn his world wide travels, LegionLabs picked up a little <a href="http://en.wikipedia.org/wiki/Vacuum_fluorescent_display">vacuum fluorescent display</a> showing micro, amps and volts. Definitely a unique souvenir! I'd never worked with VFDs before, but in the end, they are quite simple. A hot filament emits electrons, which are evened out by a grid and then impact on fluorescent surfaces. They run at relatively low voltages, as compared to, say, <a href="http://en.wikipedia.org/wiki/Nixie_tube">Nixie tubes</a>.<br />
<br />
The leads are pretty easy to figure out just by examination. I followed the <a href="http://www.electronixandmore.com/project/15.html">directions here </a>and pretty quickly had it working.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3fb8lrDH02UBMA68xgt-pj8Now-df6corTEuJhYIQgU9e0ur9LMXUq5Q6bjHNf_k2XPfuxKHgrLLDgRr-AbjJneTFjePQiU2_g8ad4SfJKkRh4YnUX94E_k9aqmnrkYx6ZUFknlkP0Y4/s1600/cropped.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="299" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3fb8lrDH02UBMA68xgt-pj8Now-df6corTEuJhYIQgU9e0ur9LMXUq5Q6bjHNf_k2XPfuxKHgrLLDgRr-AbjJneTFjePQiU2_g8ad4SfJKkRh4YnUX94E_k9aqmnrkYx6ZUFknlkP0Y4/s320/cropped.JPG" width="320" /></a></div>Heres a zoom out on the setup. On the right is a slapped together bench supply, using an LM315. Its running the filament at 1.24 V, with no limiting resistor. This is pulling 35mA, on start up it pulls quite a bit more (~50), but it quickly reaches temperature and stabilizes there. In real use, I may try to reduce that current a little.<br />
<br />
I have no idea why there are so many leads on the tube. Theres only the three elements inside (micro, V and A), each element is connected to several leads, but they dont seem to be lighting up different parts - they are just redundant. Go figure.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpmbiJ9EKQR0IzQMtMCACcG0Vj4rs9XKGWb-WUc2vGY5wZpC2zlGYM4O6efp36Qav-7rMbeh3dA68ix2bNSMvpqxjRrBmHRhd7vCWHUYaTFjj1stuq-Z-GmqPQ_Y0CmiwWe-QMWfaYiWk/s1600/DSCF1113.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpmbiJ9EKQR0IzQMtMCACcG0Vj4rs9XKGWb-WUc2vGY5wZpC2zlGYM4O6efp36Qav-7rMbeh3dA68ix2bNSMvpqxjRrBmHRhd7vCWHUYaTFjj1stuq-Z-GmqPQ_Y0CmiwWe-QMWfaYiWk/s320/DSCF1113.JPG" width="320" /></a></div> strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-18831495586185515232012-03-01T04:41:00.000-08:002012-03-01T04:41:49.409-08:00Golem: One bit to rule them allIt was quite a long time ago I first heard LegionLabs talking about the one-bit processor he was designing. It was one of those ideas that was either deep, or crazy. Turns out it was deep. It took my little brain a while to catch on, but eventually I was able to help out a bit. We finally put together a write up on the Foulab site.<br />
<br />
<a href="http://foulab.org/en/user/strawdog/Golem">http://foulab.org/en/user/strawdog/Golem</a><br />
<br />
The write up doesn't permit posting of comments, so go ahead and post em here. Note the challenge - if you manage to write some code for this thing, we'd love to hear about it.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhStY2qzKMWF2FhffRnsE9jHUlL5NMjHVb3N9rd_VAP2TxTKLRDvEe3p0TnLaH9B6kbqwaGLf481SRlQ-9i-TKP5GzQr9Fn-_zgitgegoeC4mkjZz43MyP0da6W1mhhUtLztP0b1eyEvnw/s1600/2e7cfd407a96650d705e1e38de5142a7fdcacf4e.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhStY2qzKMWF2FhffRnsE9jHUlL5NMjHVb3N9rd_VAP2TxTKLRDvEe3p0TnLaH9B6kbqwaGLf481SRlQ-9i-TKP5GzQr9Fn-_zgitgegoeC4mkjZz43MyP0da6W1mhhUtLztP0b1eyEvnw/s1600/2e7cfd407a96650d705e1e38de5142a7fdcacf4e.gif" /></a></div>strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com7tag:blogger.com,1999:blog-5853607325358914230.post-37371141592884068782012-02-12T10:57:00.000-08:002012-02-12T11:00:11.059-08:00<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1YgYKA2iZGDz-aZ7yGwPMLGiRh4zFxcIlAcvxX1g4b4pUe3q7bVUfVYGuvcXXlti8e9lBvmaqB2BsXcLFPjJhAkzISQ-aPSeOb54byma6KBk4wYaO_ZQBS3GNIo1l-rGzj2rgOMoR2ME/s1600/calendarsnap.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1YgYKA2iZGDz-aZ7yGwPMLGiRh4zFxcIlAcvxX1g4b4pUe3q7bVUfVYGuvcXXlti8e9lBvmaqB2BsXcLFPjJhAkzISQ-aPSeOb54byma6KBk4wYaO_ZQBS3GNIo1l-rGzj2rgOMoR2ME/s1600/calendarsnap.png" /></a></div><div class="separator" style="clear: both; text-align: center;"></div>Updated the Circular Calendar for 2012 today. Its the sort of thing that I should probably have done back in December, but... well here we are. Had to update Dennis Ritchie, John McCarthy and Steve Jobs' entries to show both birth and death. October seems to be a rough month for computer scientists.strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-17273602651732569762012-01-28T09:45:00.000-08:002012-01-28T09:45:11.357-08:00etch a sketchFinally, some progress on the etch a sketch machine. After releasing the magical blue smoke from many poor transistors, i broke down and bought a motor control shield over the holidays. Two roughly matched steppers salvaged from old printers attached to gears on the etch a sketch.<br />
<br />
<br />
Straightforward at first, but mechanically tricky. Theres a surprising amount of mechanical backlash, meaning that if you draw say 10mm in one direction, and then 10mm back, you dont quite end up where you started. I tightened up the gearing by epoxying it to the etch a sketch shaft, and i'm doing some backlash correction in software. Still not perfect, but getting there.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dyjQxuicxxZZhJfoHN1tEp6E1qnpdw1Z6TAQLK5dEbhKTqjapSCrxduSfhDeP7LaP5Z0PUeR_yfWmLjAoTG0Q' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div><br />
<br />
Eesh - the video compression makes it look horrid. Heres a pic of the last frame so you can see the drawing.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuGcdK8rdS-DfkhOr9x6AFbRjQuFavguROk0Y10XYZgVX1NPX-eZDuqN9KgM3og8grfVGZIAgDJ-zP-JAXZhoBDHoRoHEbiLquNHfzCww5J80aMcLO2aag4OyjI4HCbBnUJ-rb7UvB-9A/s1600/foulab.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuGcdK8rdS-DfkhOr9x6AFbRjQuFavguROk0Y10XYZgVX1NPX-eZDuqN9KgM3og8grfVGZIAgDJ-zP-JAXZhoBDHoRoHEbiLquNHfzCww5J80aMcLO2aag4OyjI4HCbBnUJ-rb7UvB-9A/s320/foulab.jpg" width="320" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSnG9On0zOR1XkAzsugcRZrT1ihrotWI86Q_pS6jLevRHeri_29g5fIxXg39KJXIq-Ti_w5ZjPali7SUgD0yF2DcWuvEHpQdyxEjLfdXAHyJV9MspcOrU2j21DgOyHA_0W_HpR4J59HAM/s1600/foulabclose.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSnG9On0zOR1XkAzsugcRZrT1ihrotWI86Q_pS6jLevRHeri_29g5fIxXg39KJXIq-Ti_w5ZjPali7SUgD0yF2DcWuvEHpQdyxEjLfdXAHyJV9MspcOrU2j21DgOyHA_0W_HpR4J59HAM/s320/foulabclose.jpg" width="320" /></a></div>strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-36484232882712955832011-10-02T18:44:00.000-07:002011-10-02T18:44:14.086-07:00High voltage supply: some progress<div style="color: red;">** DISCLAIMER - Unless you know what you are doing, dont try this. This blog post does not contain enough information to try this safely. **</div><div style="color: red;"><br />
</div>One thing on my project pile is to construct a HV supply, suitable for use in Kirlian photography and similar experiments. An <a href="http://www.angelfire.com/80s/sixmhz/flyback.html">extremely simple circuit</a> can be used to generate reasonably high voltages from an old flyback transformer.<br />
<br />
Some first experiments generated pretty arcs, and showed that it might work. I made a bit more progress now. The supply is now contained in a box, to keep stray fingers out, and it contains a rectifier, so it can be fed AC power. Thus, it can be powered from a <a href="http://en.wikipedia.org/wiki/Autotransformer">variac</a>. This is a nice source of adjustable power, and it will prevent me from blowing the lab supply with this thing - its a really ill-behaved load for any supply.<br />
<br />
Heres a pic of the setup. The HV supply on the left, variac on the right. Yep, definitely time to put the variac in a case.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYMw-9XHNp67sKlDFMEbgH3Ks44zplPwrezlcMqnB5cVBD5YQQ4Ud-X7wRnuQQCrX2BD9heTlj61J_Tnehj9ai8UeXo2hCwc_Beqvnv89iYMjM60bl5pZ_Mph-oH89evmfPSwaTCxkZ2g/s1600/IMG_2712.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYMw-9XHNp67sKlDFMEbgH3Ks44zplPwrezlcMqnB5cVBD5YQQ4Ud-X7wRnuQQCrX2BD9heTlj61J_Tnehj9ai8UeXo2hCwc_Beqvnv89iYMjM60bl5pZ_Mph-oH89evmfPSwaTCxkZ2g/s320/IMG_2712.JPG" width="320" /></a></div>And a classy warning sticker. <br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvjauzf-AJyAlrd1JuhtNTwvBwBj_3tC_1NNApiA01ABvHHCE5nAV0aDDofdM-_HhMso6jrUKS9hZnxofWVP2HBzkk3x_GyoOSnBjo1tTHtiWq5PkvFirJPWpN3HLSuVRt8O_9BcUSj1U/s1600/IMG_2715.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvjauzf-AJyAlrd1JuhtNTwvBwBj_3tC_1NNApiA01ABvHHCE5nAV0aDDofdM-_HhMso6jrUKS9hZnxofWVP2HBzkk3x_GyoOSnBjo1tTHtiWq5PkvFirJPWpN3HLSuVRt8O_9BcUSj1U/s320/IMG_2715.JPG" width="320" /></a></div>With just 7V AC in, i'm getting some nice arcs. The effect of arcing into a cup of water is quite interesting, but this picture doesn't do it justice really.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfqSt9pc01FRG5OhxXoNgu8Fdt19eeCGDe2z7wYVezBwaXp0mR5eTK_P6IpXFuly0ugzrl5qAEXzwb-XHvR_48kLh3MwH0bQBjA6-35GJgXiJr9obXYTCIUnI6qzIlD02D7EA0jrcC1no/s1600/water.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="271" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfqSt9pc01FRG5OhxXoNgu8Fdt19eeCGDe2z7wYVezBwaXp0mR5eTK_P6IpXFuly0ugzrl5qAEXzwb-XHvR_48kLh3MwH0bQBjA6-35GJgXiJr9obXYTCIUnI6qzIlD02D7EA0jrcC1no/s320/water.JPG" width="320" /></a></div><br />
<br />
At this point, raising the voltage much more leads to unwanted arcing, such as this one from the HV wire to the case. <br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6lt9pkbPpex1XKCSyL3R6OHjYB7vtQXdIWXDKYQsbLmgiTMf5OCsehyTA6dEIf3tWG6Yo8VQyd_3F0QqkvFjrn9oMYLXDt6Tvay0HlqLdMyeoh3TT7HRnugJwF0X0wdtm9pgQsacAJZ8/s1600/IMG_2706.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6lt9pkbPpex1XKCSyL3R6OHjYB7vtQXdIWXDKYQsbLmgiTMf5OCsehyTA6dEIf3tWG6Yo8VQyd_3F0QqkvFjrn9oMYLXDt6Tvay0HlqLdMyeoh3TT7HRnugJwF0X0wdtm9pgQsacAJZ8/s320/IMG_2706.JPG" width="320" /></a></div><br />
<br />
<br />
A bit more fiddling, and it will be time to try some Kirlian stuff.strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-2151741352804123372011-09-17T16:28:00.000-07:002011-09-17T16:28:29.055-07:00Oatmeal making robotI like oatmeal, the real irish steel-cut kind. But, it takes a half hour of slow simmering in milk, and you have to stir it continually, or it will stick and burn. Its the 21st century - aren't robots supposed to do the boring jobs for us now.<br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dwPgCc7cd9BkEJ9R3m-Ep4-Mjy6EVHNVsiYQZZ2pB8Ma2qB99lC4T_XjBujf0MduMT5Vp79cwdIkxhTc9UVvQ' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>Thanks to notbrainsurgery for figuring out the protocol and posting sample code for controlling the robot. <a href="http://notbrainsurgery.livejournal.com/38622.html">(Details here)</a>strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0tag:blogger.com,1999:blog-5853607325358914230.post-78313181794284373292011-09-11T07:29:00.000-07:002011-09-11T07:29:51.974-07:003-Digit LED display with ArduinoThere were some 3-Digit LED displays lying around to play with. So i hooked it up to an Arduino for fun. There are 11 lines - one for the positive for each digit, and one corresponding to each segment. Thus, unless you want to display the same thing on all three digits, you must switch the configuration faster than about 60 Hz. <br />
<br />
If hooked up directly, it uses up 11 lines of the Arduino. But with a 74595 shift register to expand the output, this can be reduced to 4. You still have to run a fairly tight loop switching the pins, so it kind of uses up the controller. On the other hand, this would easily run in a very small controller so it still might be useful.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dzpxZvkQa3-ZUjpW01eYhaRLOccQsgZhqFJcGjUcisz-UBi9Pt2Zemf8XMVl8vAP5soYksalIGGsZyzymcz1A' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>The scope shows the serial line. The arduino is merely counting up every 100ms. Circuit and code to follow eventually. More coffee is needed first.strawdoghttp://www.blogger.com/profile/18146686334371680262noreply@blogger.com0