tag:blogger.com,1999:blog-1583065827618463292023-11-16T14:32:01.579+02:00Piperidis blog-o-sphereDimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-158306582761846329.post-68102835764808562642017-04-26T11:26:00.002+03:002022-07-03T14:21:21.043+03:00The GameBoy Robot<table border="0" cellpadding="5" cellspacing="0" style="width: 100%px;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!-- ENTER MAIN ARTICLE PICTURE HERE -->
<iframe allowfullscreen="" frameborder="0" height="270" src="https://www.youtube.com/embed/qD5gJnpZ2w0" width="320"></iframe>
</div>
</td><td><div class="separator" style="clear: both; text-align: right;">
<a href="javascript:void" onclick="gr2604171056.style.display='block';en2604171056.style.display='none';gr2604171057.style.display='block';en2604171057.style.display='none';"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-lZu3jjKVR5v-P_8CkeQgz4ZnumklFbkmFC3ch-prSZP3x1R76Xj0y8cskVerVaV58gQiFxUcrdy6-oLM38-tKrS1XDfN9bDtxQ_GR-tXOPlqVQ8Pox8cNINmme6q_jeKvgHDGd50xQg/s1600/gr.gif"></a>
<a href="javascript:void" onclick="en2604171056.style.display='block';gr2604171056.style.display='none';en2604171057.style.display='block';gr2604171057.style.display='none';"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbRBqn8nQGEqZCVCWGbR3FHbx5oj38B-mAg6EBr04WFhTQnpvQKgfX1rDICi7oOq5ceDnu21UnmYKArHmxKuf-I1y0aUIEjaI-KpOC3Vn1xZ_I1n9wmYfjAOXxrORbvATyBxexGtg0pIg/s1600/gb.gif"></a>
</div>
<div class="separator" style="clear: both; text-align: right;">
<br /></div>
<div id="en2604171056">
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana; font-size: 10pt;">
<!-- WRITE ENGLISH PREVIEW HERE -->
You never played this game ;)<br>
This is a small mobile Robot with Nintendo's GameBoy Advance SP as the main (and only) processing unit (no other microcontrollers are used).<br />
<b>Characteristics</b>
<ul>
<li><b>CPU:</b> GameBoy Advance SP</li>
<li><b>Motion:</b> Four wheels drived by four independent dc motors (4x4)</li>
<li><b>Motors:</b> Four dc motors</li>
<li><b>GPIO:</b> Six outputs and eight analog inputs. There are also 8 + 1 outputs detecated for the motor control. One output is reserved for communication with the ADC. So only 6 general purpuse outputs are remained for general use</li>
<li><b>Sensors:</b><ul>
<li><b>Eyes:</b> Two analog infrared transceivers at the front, for object avoidance.</li>
</ul>
</li>
</ul>
<br>
The video shows a test of the motor control
</span></div>
<br /></div>
<div id="gr2604171056" style="display: none;">
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana; font-size: 10pt;">
<!-- WRITE GREEK PREVIEW HERE -->
Δεν έχετε παίξει ποτέ αυτό το παιχνίδι ;)<br />
Πρόκειται για ένα μικρό αυτοκινούμενο ρομπότ που χρησιμοποιεί ως κύριο και μοναδικό επεξεργαστή το GameBoy Advance SP της Nintendo. Στο κύκλωμα δεν χρησιμοποιείται κάποιος επιπλέον μικροεπεξεργαστής-μικροελεγκτής<br />
<b>Χαρακτηριστικά</b>
<ul>
<li><b>ΚΜΕ:</b> GameBoy Advance SP</li>
<li><b>Κίνηση:</b> Τέσσερις τροχοί κινούμενοι από τέσσερις ανεξάρτητους dc κινητήρες (4x4)</li>
<li><b>Κινητήρες:</b> Τέσσερις dc κινητήρες</li>
<li><b>GPIO:</b> Έξι έξοδοι και οχτώ αναλογικές είσοδοι. Υπάρχουν επίσης 8 + 1 έξοδοι που προορίζονται για τον έλεγχο των κινητήρων. Μία έξοδος χρειάζεται για την επικοινωνία με τον αναλογικό/ψηφιακό μετατροπέα (ADC). Έτσι απομένουν μόνο 6 έξοδοι γενικού σκοπού για οποιαδήποτε χρήση.</li>
<li><b>Αισθητήρες:</b><ul>
<li><b>Μάτια:</b> Δύο αναλογικοί πομποδέκτες υπερύθρων στο μπροστινό τμήμα, για αποφυγή εμποδίων.</li>
</ul>
</li>
</ul>
<br />
Στο βίντεο φαίνεται μια δοκιμή για τον έλεγχο των κινητήρων
</span></div>
<br />
</div>
</td></tr>
</tbody></table>
<a name='more'></a>
<div id="en2604171057">
<span style="font-family: Verdana; font-size: 10pt;">
<table><tr>
<td>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlG__4TC3zezq9T0_ipbX3MhgaoCjGA_9FZV8zL33Wh1bKbrjQhWLEGFb_n8GmJQsPleUnF2xsgA4EF_OBx2HavZ9BLUfSkkDqKmBT7Oh_FOhFlJBnoyN6B0PpCHjZvbMc-F71i66pKIA/s1600/DSC_1648.JPG" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlG__4TC3zezq9T0_ipbX3MhgaoCjGA_9FZV8zL33Wh1bKbrjQhWLEGFb_n8GmJQsPleUnF2xsgA4EF_OBx2HavZ9BLUfSkkDqKmBT7Oh_FOhFlJBnoyN6B0PpCHjZvbMc-F71i66pKIA/s320/DSC_1648.JPG" width="320" height="180" /></a>
</td>
<td>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtFeGsBlY7tBLPJwmtgxoFYejBNlR4Xj2u4S64oE8EqaJlzhqahZLxmBM6tVIjkzBusDv9kBmDQaNZqG6jZLK2-k4VFUFehvqRzetJCPglJhYrqH-R3BTQrZvA6qUZKXaDdiEKUbDZqEk/s1600/DSC_1647.JPG" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtFeGsBlY7tBLPJwmtgxoFYejBNlR4Xj2u4S64oE8EqaJlzhqahZLxmBM6tVIjkzBusDv9kBmDQaNZqG6jZLK2-k4VFUFehvqRzetJCPglJhYrqH-R3BTQrZvA6qUZKXaDdiEKUbDZqEk/s320/DSC_1647.JPG" width="320" height="180" /></a>
</td></tr><tr>
<td>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgPwfypuXYjj8omk89ztNEM5XCZbx74QyGuWCTnAdTB69FTodA2x6AMCPrgPLiIhjPi4X6ApTHnpUI83Tj0x_HAjORNm8PIWjK9oLhLYL10Tk-iGbo7ZiHc0LHnmaC-LXOhJf4nlXWNio/s1600/DSC_1558.JPG" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgPwfypuXYjj8omk89ztNEM5XCZbx74QyGuWCTnAdTB69FTodA2x6AMCPrgPLiIhjPi4X6ApTHnpUI83Tj0x_HAjORNm8PIWjK9oLhLYL10Tk-iGbo7ZiHc0LHnmaC-LXOhJf4nlXWNio/s320/DSC_1558.JPG" width="320" height="180" /></a>
</td>
<td>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizvfDoJ_Oqb9OgIawKpznYNsm4CZXxYTfVPKccDnzWLHkJR7tGSUDAAY0f6CP2fgACyPAKwXgo9pfoLZCeyhDS5L0L0ZymDElx61ZnNAVPzMf73XfAx0HMex1siY7a2mvFqFDYIj4uew4/s1600/IMG_20170425_185552_077.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizvfDoJ_Oqb9OgIawKpznYNsm4CZXxYTfVPKccDnzWLHkJR7tGSUDAAY0f6CP2fgACyPAKwXgo9pfoLZCeyhDS5L0L0ZymDElx61ZnNAVPzMf73XfAx0HMex1siY7a2mvFqFDYIj4uew4/s320/IMG_20170425_185552_077.jpg" width="320" height="320" /></a>
</td></tr><tr>
<td>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLNmUg0qzQMGfIgUXJlhq5zVAuCGgLXN1AI6HeX2ISSxZ7vWgND69J14rUIVrhogRh0lozwHSvHzK7xYeZ0yNh18syTAZOTtehA1k63L8XNDfIcQxsoyRLMEM9K7H719fSXoHy6rfwvOs/s1600/IMG_20170425_185552_078.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLNmUg0qzQMGfIgUXJlhq5zVAuCGgLXN1AI6HeX2ISSxZ7vWgND69J14rUIVrhogRh0lozwHSvHzK7xYeZ0yNh18syTAZOTtehA1k63L8XNDfIcQxsoyRLMEM9K7H719fSXoHy6rfwvOs/s320/IMG_20170425_185552_078.jpg" width="320" height="320" /></a>
</td>
<td>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcIn6uKV6CGk4t2lPwZMYCqtmlhEre2XXknmu11G5-TLYanTLfAI4J5T3GP_cyMlDIDWWoUtB5HSXUlBrsc12l-MNrO9r51QlHQRmEriQFcBpvr3JKcJwfmqTULBXvpDFuMoPR9pzp1L8/s1600/DSC_1649.JPG" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcIn6uKV6CGk4t2lPwZMYCqtmlhEre2XXknmu11G5-TLYanTLfAI4J5T3GP_cyMlDIDWWoUtB5HSXUlBrsc12l-MNrO9r51QlHQRmEriQFcBpvr3JKcJwfmqTULBXvpDFuMoPR9pzp1L8/s320/DSC_1649.JPG" width="320" height="180" /></a>
</td>
</tr></table>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsLeDOPbOZ82PKRZgsxumwxVzWe4y46btmlbgLTLEA69uUljo4PHaFLwleBRRxubEu3nPx4kWaG2gccNZBVvMykqIAz8d27GWGJb9XxZW-DqgfMh0emJXZYPPsmiXeeoIJDEn_EXuTT9w/s1600/IMG_20170425_185552_079.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsLeDOPbOZ82PKRZgsxumwxVzWe4y46btmlbgLTLEA69uUljo4PHaFLwleBRRxubEu3nPx4kWaG2gccNZBVvMykqIAz8d27GWGJb9XxZW-DqgfMh0emJXZYPPsmiXeeoIJDEn_EXuTT9w/s320/IMG_20170425_185552_079.jpg" width="320" height="320" /></a>
</span>
</div>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-71337802037604837092014-12-26T11:27:00.018+02:002022-07-03T14:29:00.554+03:00Simple cassette player amplifier<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="325" data-original-width="330" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicr56XbJ5FqHNcc-yAV34Wf95u9L8V2Uv57mGrcY_QOrTaHBhiUqyb-3iGgw120Vm7sLbavdHVQbQalTBQ65Kn5rJ6m0HZ3cBN0lrEP0K1Gi5CqAvbJ9eoxBhfkjmRjJanbquCQV61OWY/w200-h197/circuit.jpg" width="200" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
This circuit is a simple amplifier of the audio signal comming out directly from a magnetic head of a cassete player (like the ones used for cars, before the CD era). The design is focusing on simplicity and not on generating a high fidelity output, which is also depending on the quality of the cassette (tape).
This amplifier differs from most audio amplifiers based on common opamps because it uses an LNA opamp (low noise amplifier), due to the fact the audio source has microvolt level (uV). Amplifying a uV voltage without adding internal noise is not an easy task. Note that the output of a microphone has a mV voltage level so it's easier to use common opamps for the amplification.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
The circuit has two stages. The LNA preamplifier and a common
amplifier. Both are based on LM833N which is a low
noise operation amplifier.<br />The LNA stage is connected is
such a way in order to generate the NAB equalization curve
for playback. The NAB equalization curve was used for
cassette tapes and was something like the famous
<a href="http://en.wikipedia.org/wiki/RIAA_equalization">
RIAA equalization curve</a>. However it's not so strict like
RIAA <i>(thus it's much easier to implement)</i><p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><br /><hr size="1" />
<ul><li>One LM833N opamp.</li><li>One 200KΩ resistor <i>(1/4 W)</i></li><li>One 3.6KΩ resistor <i>(1/4 W)</i></li><li>One 200Ω resistor <i>(1/4 W)</i></li><li>One 100KΩ resistor <i>(1/4 W)</i></li><li>One 5.6KΩ resistor <i>(1/4 W)</i></li><li>One 47μF electrolytic capacitor <i>(16V)</i></li><li>One 15nF capacitor.</li><li>A 8 pin DIP socket <i>(for LM833)</i>.</li><li>You will also need one cassette player deck mechanism <i>(eg.
extracted from an old car tape player)</i></li><li>A small piece of a Veroboard</li><li>Wire for connections</li><li>Solder and soldering iron</li></ul>
<p>Also you will need a stabilized symetrical +/- 12V external
power supply.
You can use two 12V power supplies and connect them in such a
way to generate the symetrical supply <i>(<b>Note:</b>
Connect them in series. The common of the first power supply and
the 12V line of the second, will be the common of the symetrical power
supply (GND). The common of the second power supply will be the
-12V line and the 12V of the first will be the +12V line)</i>.<br />
<b>Note:</b>
To reduce noise you can use a different 12V power supply for the
motor of the deck<i> (but don't forget to connect the common wires
together). </i>However if you have a good stabilized symmetrical
power supply you can use only that instead.</p>
<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
Here is the schematic diagram of the simple cassette
player amplifier.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvMTVsNmbN1CVj-p8BppnywvnLg6wU2x0Hc5ZiRBxlMRmHrIaeGMuXBMBf0a7eU295HfNgMcR8WYJN9aUf5hMsFdtXvc0dS3qJfOCYyMDtNeQC1ay5zElnPYWz7-_OQnpqx3gRTWCAkPQ/d/tapeamp.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="520" data-original-width="669" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvMTVsNmbN1CVj-p8BppnywvnLg6wU2x0Hc5ZiRBxlMRmHrIaeGMuXBMBf0a7eU295HfNgMcR8WYJN9aUf5hMsFdtXvc0dS3qJfOCYyMDtNeQC1ay5zElnPYWz7-_OQnpqx3gRTWCAkPQ/d/tapeamp.gif" /></a></div><p align="center"><br /></p>
<p><b>Attention:</b> You can use two 100nF capacitors to the
power lines of the opamp. One to the +12V line and GND, as close
as possible to pin 8 of the LM833 chip. The second capacitor
connect it to the -12V line and GND again as close as possible
to pin 4 of LM833 chip.</p>
<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Cassette player deck mechanism</span></b><br /><hr size="1" />
<p>In order for this circuit to work you will need a
cassette player deck mechanism, like the one in the following
picture</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtFQWvYuNyHPgVWj2UFtFmnR72mcDGRphkFxRVQB68HzymcPle7IhRNBRpi5-cOr9qRaK6V5ypmHMfzaKWb9hph8d5kuT8skfaQuVn5UUJnftXn0Td5PDwMlmcv9sLsGyrOT5GS7uNoLI/d/cassettedeck.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="404" data-original-width="521" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtFQWvYuNyHPgVWj2UFtFmnR72mcDGRphkFxRVQB68HzymcPle7IhRNBRpi5-cOr9qRaK6V5ypmHMfzaKWb9hph8d5kuT8skfaQuVn5UUJnftXn0Td5PDwMlmcv9sLsGyrOT5GS7uNoLI/d/cassettedeck.jpg" /></a></div><p>You
can extract such a mechanism from an old car tape player, or you
can buy one<i> (it is still possible to find these mechanism on
the internet).</i><br />Notice that you don't need any
electronics on the deck. Only the magnetic head is required. If
you have a stereo magnetic head (wich is more possible) then you
can connect the channels together, or you can build two circuits
like the above one for each channel.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIjP71yxAjmHbLD8v2cNTTNr8kguJ0ZsBhIZrvQJVuQuU0iI72ddTpjBa_PnNTiYnjTD3JAeZR-_TwvksJsHHJc_qJ1YSaoxHrcyaOERmjFkY9ETqupF5W6uGlfSpNblhA-sg7KnCQr_8/d/magnetichead.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="479" data-original-width="584" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIjP71yxAjmHbLD8v2cNTTNr8kguJ0ZsBhIZrvQJVuQuU0iI72ddTpjBa_PnNTiYnjTD3JAeZR-_TwvksJsHHJc_qJ1YSaoxHrcyaOERmjFkY9ETqupF5W6uGlfSpNblhA-sg7KnCQr_8/d/magnetichead.jpg" /></a></div><p class="auto-style1">
In this picture you can see the magnetic head. This is a stereo
magnetic head <i>(it has three wires. Left,Right channel and
GND)</i>. You can connect the two channles together or build a
saparate curcuit for each channel.
</p><p> </p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Pictures</span></b><br /><hr size="1" /></span><div><span style="font-family: "verdana"; font-size: 10pt;">
In the following picture you see the circuit built on a piece of
Veroboard.</span></div><div><span style="font-family: "verdana"; font-size: 8pt;"><br /></span></div><span style="font-family: "verdana"; font-size: 10pt;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicr56XbJ5FqHNcc-yAV34Wf95u9L8V2Uv57mGrcY_QOrTaHBhiUqyb-3iGgw120Vm7sLbavdHVQbQalTBQ65Kn5rJ6m0HZ3cBN0lrEP0K1Gi5CqAvbJ9eoxBhfkjmRjJanbquCQV61OWY/d/circuit.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="325" data-original-width="330" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicr56XbJ5FqHNcc-yAV34Wf95u9L8V2Uv57mGrcY_QOrTaHBhiUqyb-3iGgw120Vm7sLbavdHVQbQalTBQ65Kn5rJ6m0HZ3cBN0lrEP0K1Gi5CqAvbJ9eoxBhfkjmRjJanbquCQV61OWY/d/circuit.jpg" /></a></div><p class="auto-style1"><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Videos</span></b><br /><hr size="1" /></span><div><span style="font-family: "verdana"; font-size: 10pt;">
In the
following video you can see the circuit in action. For power amp
an old PC speaker set was used</span></div><div><span style="font-family: "verdana"; font-size: 8pt;"><br /></span><div style="text-align: center;"><span style="font-family: "verdana"; font-size: 10pt;">
<iframe allowfullscreen="" class="youtube-player" frameborder="0" height="390" src="http://www.youtube.com/embed/n1DiERcsaSI" title="YouTube video player" type="text/html" width="640"></iframe>
</span></div></div>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-65169578754891081802014-01-18T18:50:00.005+02:002022-07-03T14:30:58.275+03:00Weird legged PCB Robot<table border="0" cellpadding="5" cellspacing="0" style="width: 100%px;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwyg3bHNz9ScpOv3HVVbyv2ZO_rOD-mjhszMJ3i7LWmiV7ZTbK99reviuRYMCXbtMUD45HAOGLxaD1MZf7SNzs8WK7Keql6RWY8qP3pFA3INzqiMrexzVT1hbDNP2lveGUF-u0VQ2nBJ0/s1600/weirdrobot2.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwyg3bHNz9ScpOv3HVVbyv2ZO_rOD-mjhszMJ3i7LWmiV7ZTbK99reviuRYMCXbtMUD45HAOGLxaD1MZf7SNzs8WK7Keql6RWY8qP3pFA3INzqiMrexzVT1hbDNP2lveGUF-u0VQ2nBJ0/s320/weirdrobot2.jpg"></a>
</div>
</td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana; font-size: 10pt;">
This is a simple but weird robot build entirely with veroboards (stripboards).<br />
The robot is standing on two free running wheels and it has two legs that are pushing it like a small cart.<br />
<b>Characteristics</b>
<ul>
<li><b>CPU:</b> Basic Stamp 2. Board of Education</li>
<li><b>Motion:</b> Two legs with 3 degrees of freedom each <i>(Each leg looks like a PUMA manipulator, without the end effector tool)</i>. Two free running wheels are used at the frontend <i>(no extra motors)</i>.</li>
<li><b>Motors:</b> Six small servomotors <i>(1.5 Kg)</i>. Three motors on each leg.</li>
<li><b>Sensors:</b><ul>
<li><b>Eyes:</b> Two infrared transceivers at the front, for object avoidance.</li>
<li><b>Ears:</b> Two microphones. Capability to detect sound direction.</li></ul>
</li>
</ul>
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: Verdana; font-size: 10pt;">Details</span></b><br />
<span style="font-family: Verdana; font-size: 10pt;">
Programming this weird robot to move in not an easy task. The required
procedures are not so simple, like in the case of a wheeled
robot<i> (or even on a three servo robot)</i>. The number of
servos is enough to complicate the procedures. Using a different
procedure for going forward, turning left and right is not the
best way, because you will soon overflow the microcontroller's
rom <i>(EEPROM)</i>, due to the complexity of the routines.<p style="text-align:center">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgasySJA9fZ0JQ45ASRAC0B35mvCYyt_Ct8jeHK-pXglEs0Q2Ey1EKGguukMG2WI9hgM5qweHYblVHGlf5yuFs3MXt4dlEyr55kGsjO7vR4yVZel5XwGC4TL0yAv_EjamUhjbNGPfQET9k/s1600/weirdrobot1.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgasySJA9fZ0JQ45ASRAC0B35mvCYyt_Ct8jeHK-pXglEs0Q2Ey1EKGguukMG2WI9hgM5qweHYblVHGlf5yuFs3MXt4dlEyr55kGsjO7vR4yVZel5XwGC4TL0yAv_EjamUhjbNGPfQET9k/s320/weirdrobot1.jpg" width="585" height="361"></a></p><p>
Thinking all that, I was searching a way to make the motion
routine more generic, to cover all the cases <i>(forward, left,
right, backwards etc)</i>. The simplest way is to save all the
necessary PWM values to memory. The trick here is to split each
motion in frames. Each frame will have the PWM values of all the
servos <i>(in our case, six)</i>. The only thing you need, is to
save the number showing total frames in the motion scenario. By
addressing to the start of each scenario, it is possible to
write a generic motion procedure.</p><p>
For the example lets
take a look on how we should save the PWM values for a going
forward motion scenario.</p>
<blockquote>
<p><font style="font-size: 10pt;" face="Courier New">Forward0 <b>
<font color="#0000ff">DATA</font></b> 2<br>
Forward1 <b><font color="#0000ff">DATA</font></b>
<font color="#800080">Word</font> 450, <font color="#800080">
Word</font> 550, <font color="#800080">Word</font> 450,
<font color="#800080">Word</font> 850, <font color="#800080">
Word</font> 880, <font color="#800080">Word</font> 600<br>
Forward2 <b><font color="#0000ff">DATA</font></b>
<font color="#800080">Word</font> 450, <font color="#800080">
Word</font> 470, <font color="#800080">Word</font> 600,
<font color="#800080">Word</font> 850, <font color="#800080">
Word</font> 800, <font color="#800080">Word</font> 750</font></p>
</blockquote>
<p>The PWM values
are the result of trial and error and they will be different to
your robot.<br>In this case we split the scenario in two frames
<i>(Forward1 and Forward2)</i>. Forward0 shows the total number
of frames <i>(in our case, two)</i>. All these numbers have a meaning.
In my case this is the format of each frame</p>
<blockquote>
<p>
<font style="font-size: 10pt; font-style: italic;" face="Courier New">Format: Total
Steps (byte)<br>
Right
Shoulder (Word) -> Right Arm (Word) -> Right Elbow (Word) -><br> Left Shoulder (Word) -> Left Arm (Word) -> Left Elbow (Word)</font></p>
</blockquote>
<p>The first byte is
the total number of the frames. The six word numbers in each
frame are for the right and left leg respectively.<br>So in order
the robot execute the movement, the only thing we have to do is
point the address <i>(word)</i> variable to the starting address
of each movement. In our case:</p>
<blockquote>
<p><font style="font-size: 10pt;" face="Courier New">address =
Forward0<br><b><font color="#0000ff">GOSUB</font></b> Move</font></p>
</blockquote>
<p>where <i>"Move"</i>
is the generic motion subroutine. Now, if we want to turn left
will write something like that</p>
<blockquote>
<p><font style="font-size: 8pt;" face="Courier New">address =
GoRight0<br><b><font color="#0000ff">GOSUB</font></b> Move</font></p>
</blockquote>
<p>supposing we have saved in memory the PWM values of the
specific movement. For example:</p>
<blockquote>
<p><font face="Courier New">GoRight0 <b>
<font color="#0000ff">DATA</font></b> 2<br>
GoRight1 <b><font color="#0000ff">DATA</font></b>
<font color="#800080">Word</font> 330, <font color="#800080">
Word</font> 550, <font color="#800080">Word</font> 500,
<font color="#800080">Word</font> 700, <font color="#800080">
Word</font> 880, <font color="#800080">Word</font> 600<br>
GoRight2 <b><font color="#0000ff">DATA</font></b>
<font color="#800080">Word</font> 330, <font color="#800080">
Word</font> 500, <font color="#800080">Word</font> 600,
<font color="#800080">Word</font> 700, <font color="#800080">
Word</font> 800, <font color="#800080">Word</font> 700</font></p>
</blockquote>
<p>Once we have decided they way we will save the PWM values of
the servos in robot's memory, we can go on writing the generic
motion subroutine. Despite the complicity the motion subroutine
is quite simple</p>
<blockquote>
<p><code>Move:
<b><br><span lang="en-us"> </span>
<font color="#008000">'<span lang="en-us"> Generic motion
subroutine for the weird legged robot.<br> '<br> ' First read total frames.</span></font><br>
<span lang="en-us"> </span><font color="#0000FF">READ</font></b> address,bdata<br>
address = address + 1<br>
<font color="#0000FF"><b>FOR</b></font> j=1 <b>
<font color="#0000FF">TO</font></b> bdata<br>
<font color="#008000"><span lang="en-us">
<b>' Send total 21 pulses for each servo.<br>
' 21 pulses are
enough to complete the motion (of one frame).<br>
' You may need to change it for different type of servos</b></span></font><br>
<b><font color="#0000FF">FOR</font></b> i=0 <b>
<font color="#0000FF">TO</font></b> 20<br>
<b><font color="#0000FF">PAUSE</font></b> 3<br>
<span lang="en-us"> </span><b>
<font color="#008000">'<span lang="en-us"> Read PWM value
for right shoulder and send the pulse.</span></font></b><br>
<b><font color="#0000FF">READ</font></b> address,Word
wdata<br>
<b><font color="#0000FF">PULSOUT</font></b>
right_shoulder,wdata<br>
<b><font color="#008000">'<span lang="en-us">
Read PWM value for right arm and send the pulse.</span></font></b><br>
<b><font color="#0000FF">READ</font></b> address +
2,Word wdata<br>
<b><font color="#0000FF">PULSOUT</font></b>
right_arm,wdata<br> <b><font color="#008000">
<span lang="en-us"> </span>'<span lang="en-us">
Read PWM value for right elbow and send the pulse.</span></font></b><br>
<b><font color="#0000FF">READ</font></b> address +
4,Word wdata<br>
<b><font color="#0000FF">PULSOUT</font></b>
right_elbow,wdata<br>
<br>
<b>
<font color="#008000">'<span lang="en-us"> Read PWM value
for left shoulder and send the pulse.</span></font></b><br><b><font color="#0000FF">
<span lang="en-us"> </span>READ</font></b> address +
6,Word wdata<br>
<b><font color="#0000FF">PULSOUT</font></b>
left_shoulder,wdata<br> <b><font color="#008000">
<span lang="en-us"> </span>'<span lang="en-us">
Read PWM value for left arm and send the pulse.</span></font></b><br>
<b><font color="#0000FF">READ</font></b> address +
8,Word wdata<br>
<b><font color="#0000FF">PULSOUT</font></b>
left_arm,wdata<br> <b><font color="#008000">
<span lang="en-us"> </span>'<span lang="en-us">
Read PWM value for left elbow and send the pulse.</span></font></b><br>
<b><font color="#0000FF">READ</font></b> address +
10,Word wdata<br>
<b><font color="#0000FF">PULSOUT</font></b>
left_elbow,wdata<br>
<b><font color="#0000FF">NEXT<br>
<span lang="en-us"> </span></font>
<span lang="en-us"><font color="#008000"> ' Go to next
frame</font></span></b><br>
address = address + 12<br>
<b><font color="#0000FF">NEXT<br><span lang="en-us">
RETURN</span></font></b></code></p>
</blockquote>
<p>First we go to the address stored in the variable
<font face="Courier New">address</font> and we read the total
number of frames <i>(variable <font face="Courier New">bdata</font>)</i>.
Each frame is consisted from 12 bytes total <i>(6 word values)</i>.
Next we read the six word PWM values with the order we discussed
earlier and simultaneously we send the pulses to the servos.
Each stored value is the duration of the pulse we must send to
the appropriate servo. In reality each value is the duration in
milliseconds divided by the factor two, because 2ms is the step
of Basic Stamp 2.<br>For each frame we send the same PWM values to
the servos for 21 times <i>(meaning we send total 21 pulses to
each servo)</i>. This is important or else the motion will not
be able to complete <i>(servos require a number of pulses to
complete their movement to the desired position)</i>.<br>When
sending of all these pulses is completed, we go to the address
of the next frame <i>(if this exists)</i> and we repeat the
process. The reason we increase the value of the variable
<font face="Courier New">address</font> by 12 is because 12
bytes are stored in each frame, as we said earlier.</p>
<iframe title="YouTube video player" class="youtube-player" type="text/html" src="https://www.youtube.com/embed/F0bFiBU7HXg" allowfullscreen="" frameborder="0" height="390" width="640"></iframe><p>
<iframe title="YouTube video player" class="youtube-player" type="text/html" src="https://www.youtube.com/embed/sntHCqN6uVU" allowfullscreen="" frameborder="0" height="390" width="640"></iframe><p>
<b><span style="font-family: Verdana; font-size: 10pt;">Detection of sound direction</span></b><br />
This robot has the ability to detect sound direction. That means it can follow a sound source.<br />
Unfortunatelly Basic Stamp 2 doesn't have analog inputs like arduino <i>(remember that arduino is newer)</i>. This means that for Basic Stamp 2 we don't have the information of how much left or right the sound is coming from.<br />
In the following picture you can see the schematic diagram of the circuit that is build in the weird robot<p>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3sd0gRZyk_KIB1N96MKPCVZ8jpNWoLtmcAhWdh3I9UXkorTle02XzSIsa-QuIuhxdZgny4Jdw2QHBxR1m0tOEw_XuWQpLukNaZDDSwVnm7t_IYJNC7gPlAF-5WfQizSbidmhW2b19UL4/s1600/Sounddirdetector.gif" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3sd0gRZyk_KIB1N96MKPCVZ8jpNWoLtmcAhWdh3I9UXkorTle02XzSIsa-QuIuhxdZgny4Jdw2QHBxR1m0tOEw_XuWQpLukNaZDDSwVnm7t_IYJNC7gPlAF-5WfQizSbidmhW2b19UL4/s320/Sounddirdetector.gif"></a><p>
The circuit is simple enough. The signal of each microphone is amplified by the transistor based pre-amplifier and then passes through the peak detector. The next stage is the two subtraction amplifiers. The first one is amplifying the difference between the left and the right signal and the second one the difference between right and left. The outputs of the subtraction amplifiers are then compared with a threshold voltage (one for each calculated difference). The threshold voltages are also calibrating the sensitivity of the circuit<p>Why we are calculating these differences?<br />Generally we need three distinct states. i) The sound is coming from the left side ii) The sound is coming from the right side and iii) No sound detected. Clearly with arduino things would be much easier if we used two of the analog inputs.<br />There are totally three trimmers to adjust sensitivity. The trimmer of the one preamplifier is used to adjust the voltage differences to zero <i>(or almost to zero)</i> when the sound is coming in front of the robot.<p>
<b><span style="font-family: Verdana; font-size: 10pt;">Coding</span></b><br />
In order Basic Stamp 2 to decide about the direction of the sound, a small program must be written in PBasic. The complete detection process is typically one simple subroutine<p>
<font color="#008000"><span lang="en-us"> ' -----[ Subroutine - Get_Sound_Sensors_Status ]---------------------------------<br /></span></font>
Get_Sound_Sensors_Status:<br />
<br />
SoundRightSensor = SoundRightSensor + <font color="#800080">IN5</font><br />
SoundLeftSensor = SoundLeftSensor + <font color="#800080">IN6</font><br />
iCountSound = iCountSound + 1<br />
<br />
<font color="#0000ff"><b>IF</b></font> iCountSound = SoundFilterWindow <font color="#0000ff"><b>THEN</b></font><br />
iCountSound = 0<br />
LeftMIC = 0<br />
RightMIC = 0<br />
<font color="#0000ff"><b>IF</b></font> SoundLeftSensor<SoundRightSensor <font color="#0000ff"><b>THEN</b></font> LeftMIC = 1<br />
<font color="#0000ff"><b>IF</b></font> SoundRightSensor<SoundLeftSensor <font color="#0000ff"><b>THEN</b></font> RightMIC = 1<br />
SoundRightSensor = 0<br />
SoundLeftSensor = 0<br />
<font color="#0000ff"><b>ENDIF</b></font><br />
<font color="#0000ff"><b>RETURN</b></font><p>
We must also define the following constants and variables<br />
SoundFilterWindow <font color="#0000ff"><b>CON</b></font> 50<br />
<br />
iCountSound <font color="#0000ff"><b>VAR</b></font> <font color="#800080">Byte</font><br />
SoundLeftSensor <font color="#0000ff"><b>VAR</b></font> <font color="#800080">Byte</font><br />
SoundRightSensor <font color="#0000ff"><b>VAR</b></font> <font color="#800080">Byte</font><br />
LeftMIC <font color="#0000ff"><b>VAR</b></font> <font color="#800080">Bit</font><br />
RightMIC <font color="#0000ff"><b>VAR</b></font> <font color="#800080">Bit</font><p>
The status of the left microphone is stored to LeftMIC <i>(if is one, the sound is coming from the left)</i>. Variable SoundLeftSensor is actually showing how many times is Vleft > Vright + Vthres <i>(Vthres comes from hardware. Meaning it depends on the position of the comparator's trimmer, which is adjusting the sensitivity)</i>.<br />
Same things for the variable RightMIC, regarding the right microphone. Variable SoundRightSensor is showing how many times is Vright > Vleft + Vthres<p>
The constant SoundFilterWindow is showing how many measurements the program must do, in order to make a reliable result. The value will come out from the test and will be deferent in your case.<p>
In the following video you can see the robot in a simple test. In order to visually see which decision the robot made, regarding the direction of the sound, I connected two LEDs<p>
<iframe width="560" height="315" src="//www.youtube.com/embed/_uk5beyqqlc" frameborder="0" allowfullscreen></iframe>
</span>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-35057279807430519062014-01-18T17:42:00.001+02:002022-07-03T14:31:46.146+03:00Soccer and Sumo Robot???<table border="0" cellpadding="5" cellspacing="0" style="width: 100%px;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAaiOa9PpyaYdHzv-5GvzLIH_-FtsW5MwqOHOmXpFQcWkHih3LrI3bdU97u0c55URLA2LA2mjxe8Ofp1HbAGjrlQh8C0Z8-Sb4uwohxt_7QYhMvxPU5vtc9YrO6XMZAqY3txMQOBp4KHY/s1600/2014-01-18+17.15.13.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAaiOa9PpyaYdHzv-5GvzLIH_-FtsW5MwqOHOmXpFQcWkHih3LrI3bdU97u0c55URLA2LA2mjxe8Ofp1HbAGjrlQh8C0Z8-Sb4uwohxt_7QYhMvxPU5vtc9YrO6XMZAqY3txMQOBp4KHY/s320/2014-01-18+17.15.13.jpg"></a>
</div>
</td><td><div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana; font-size: 10pt;">
OK, this is a new design I am working on. It's a small robot with a kicking mechanism, a grip and a lot of other cool stuff <i>(e.g. BlueTooth and the ability to control it with an Android app, the ability to charge it to a charging base and much more)</i>. This is the prototype and I built it for the tests. Curently I am working on the new improved PCB's<br />
It is Arduino based<br />
I have also some thoughts of implementing a <a href="https://github.com/WardCunningham/Txtzyme">txtzyme</a> style language or a visual style programming using <a href="https://code.google.com/p/blockly/">Blockly</a> <i>(or maybe I will combine those two techniques)</i>
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<span style="font-family: Verdana; font-size: 10pt;">
<table><tr>
<td><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBqDGH1kJyMa6mowj1JBVTn2y8NLA3vm0PjcnGQRZdRbbhSyGNevnY1pd3Z1SyA3xQBOrWzs7Qp-O05hjM2Ugwi-XKWq6ArN1A6tBuLSnt8WiA54TAPuX-1FTbd-Y9Zyir4Z4idQpKNec/s1600/2014-01-18+17.15.38.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBqDGH1kJyMa6mowj1JBVTn2y8NLA3vm0PjcnGQRZdRbbhSyGNevnY1pd3Z1SyA3xQBOrWzs7Qp-O05hjM2Ugwi-XKWq6ArN1A6tBuLSnt8WiA54TAPuX-1FTbd-Y9Zyir4Z4idQpKNec/s320/2014-01-18+17.15.38.jpg"></a></td>
<td><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh74eXOACJnut03A14rXv_R44vst_wsGNFzXArgBh__eKdLYN6bIly_pecjkezMzy5UyLUojhHGAsxsfsWYUHJc_c_b1C8U6_sSTsNPKXfOww_zpFOrVdzw6nZrdKIZ61ruK20EUKg8D9w/s1600/2014-01-18+17.15.48.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh74eXOACJnut03A14rXv_R44vst_wsGNFzXArgBh__eKdLYN6bIly_pecjkezMzy5UyLUojhHGAsxsfsWYUHJc_c_b1C8U6_sSTsNPKXfOww_zpFOrVdzw6nZrdKIZ61ruK20EUKg8D9w/s320/2014-01-18+17.15.48.jpg"></a></td></tr></table>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRvICEs7zTu6EUrdG5lj3CuP9IPlut2MP9lfxTMh-kFwuXhh8bKmH5RD2bX3UBBzvp9lOtOUSZ7auus3iO4j44nhGBhQcmLwOtO37zUhK-ByOEp2WefBnytwIxVualqMSreqa6_udkCgk/s1600/2014-01-28+21.14.35.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRvICEs7zTu6EUrdG5lj3CuP9IPlut2MP9lfxTMh-kFwuXhh8bKmH5RD2bX3UBBzvp9lOtOUSZ7auus3iO4j44nhGBhQcmLwOtO37zUhK-ByOEp2WefBnytwIxVualqMSreqa6_udkCgk/s320/2014-01-28+21.14.35.jpg"></a>
</span>
Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-50518544571046871162012-08-27T11:45:00.005+03:002022-07-03T14:32:32.318+03:00Simple Volume Unit meter (VUmeter)<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="263" data-original-width="422" height="125" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-SkGeJQShpu3FfKd-CqopXzq1WUsj_3BW20wE1IC0rRUpBLFjCEFD0dXwKZOht_kyQ8z1y6XnUEB6-Zp7cDGWKnuImNvR9JjmtEl8esh6eBeFTv6KcbLTaIq-iaQjElwRfnhS2A4Rxk4/w200-h125/vumeter2.jpg" width="200" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
This is by far the simplest VUmeter you can build. It is based on a single chip. A volume unit <i>(VU)</i> meter or standard volume indicator is a device for displaying the level of any voltage signal source <i>(which is usually a sound signal)</i>.<br />
Connect the module to the output of any amplifier <i>(or preamplifier)</i> and set the trimmer where all LEDs are lighting, when the volume of the amp is at maximum<i> (or at least at that point, where you want all LEDs to light)</i>.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
LM3915 is a very powerful and easy to find chip. It's a
monolithic integrated circuit that senses analog voltage levels
providing a logarithmic 3 dB/step analog display. With it, you
can drive LEDs, LCDs or even VFDs <i>(Vacuum Fluorescent
Displays)</i>.<br />In this circuit we use it as a VUmeter, driving 10
LEDs. Each time a new LED is lighting when the input voltage is
1.41 times the voltage, where the previous LED started to light.
This is exactly the point where the voltage is 3dB higher than
the previous one.
<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
Here is the schematic diagram of the simple VUmeter.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyfj5PIz5A45zVgdWtpZQ75Y-6YCXcSIFl8GY2hRlaHwCscYhz2LOYlbqwrrR7LorO1bEKhrmrHzVG8agCzpsDgWjceNylCj-0NJigejmiLOTdJRuX3qlfdoc33nyx1pASXPGyLDIyiqg/d/vumeter.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="373" data-original-width="628" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyfj5PIz5A45zVgdWtpZQ75Y-6YCXcSIFl8GY2hRlaHwCscYhz2LOYlbqwrrR7LorO1bEKhrmrHzVG8agCzpsDgWjceNylCj-0NJigejmiLOTdJRuX3qlfdoc33nyx1pASXPGyLDIyiqg/d/vumeter.gif" /></a></div><p align="center"><br /></p>
<p><b>Note:</b> The schematic is upside down, meaning the first
LED <i>(that flashes at lower dBs)</i> is the one connected to
pin 1 of LM3915. </p>
<p><b>Attention:</b> Make sure you solder the 100nF capacitor as
close to LM3915 power supply pins as possible. The optional
electrolytic capacitor is required only if leads to the LED
supply are 15cm <i>(about 6 inches)</i> or longer. All 220<span lang="el">Ω
</span>resistors are used to limit LM3915 power dissipation and
aren't optional.</p><p>
</p><table bgcolor="#FFFFCC" border="1" cellpadding="4" cellspacing="1" id="AutoNumber39" style="border-collapse: collapse; width: 100%;">
<tbody><tr>
<td width="100%">
<font face="Verdana" style="font-size: 10pt;"><div align="justify">
Don't worry when the input voltage (signal) becomes negative.
LM3915 can handle negative <i>(and positive)</i> voltages up to
35V without damaging the chip.<br />You can use a precision full-wave
rectification circuit at the input, if you want a more accurate
reading.</div>
</font></td>
</tr>
</tbody></table>
<p> </p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Pictures</span></b><br /><hr size="1" />
In the following pictures you see the circuit built on a piece of Veroboard.</span><div><span style="font-family: "verdana"; font-size: 10pt;"><br />
<table border="0" cellpadding="1" cellspacing="0" style="width: 100%;"><tbody><tr>
<td align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjd5E1b8Dq5PdThxGLwI-CZYfRyhFno__9uwB4bs1i9-_bIFI00aRh4d0kgPtwTtrzxRpob2nTYfaXUyW3gC-sED3Kauz4QJdLivY2Vj9jMnh-7krQDvNSBg0OmkqsKdLJy8i-HZCDtsg/d/vumeter4.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="257" data-original-width="314" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjd5E1b8Dq5PdThxGLwI-CZYfRyhFno__9uwB4bs1i9-_bIFI00aRh4d0kgPtwTtrzxRpob2nTYfaXUyW3gC-sED3Kauz4QJdLivY2Vj9jMnh-7krQDvNSBg0OmkqsKdLJy8i-HZCDtsg/d/vumeter4.jpg" /></a></td>
<td align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK5AIz1ETaaKCzYBSID6X9DWDPuWmkBoJxUviY3Jx4_Pa2YmJTcl_7Z2b3ebhrnEOhFq1kHM-0772o1kJivFYVta_wH8F6FdM_EmaX-ZJNP7lfum0hAlcRvVHHmEHEr8lTalA4ULemEYs/d/vumeter3.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="227" data-original-width="294" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK5AIz1ETaaKCzYBSID6X9DWDPuWmkBoJxUviY3Jx4_Pa2YmJTcl_7Z2b3ebhrnEOhFq1kHM-0772o1kJivFYVta_wH8F6FdM_EmaX-ZJNP7lfum0hAlcRvVHHmEHEr8lTalA4ULemEYs/d/vumeter3.jpg" /></a></td></tr></tbody></table><p>
And in this picture you see the simple VUmeter in action.</p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-SkGeJQShpu3FfKd-CqopXzq1WUsj_3BW20wE1IC0rRUpBLFjCEFD0dXwKZOht_kyQ8z1y6XnUEB6-Zp7cDGWKnuImNvR9JjmtEl8esh6eBeFTv6KcbLTaIq-iaQjElwRfnhS2A4Rxk4/d/vumeter2.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="263" data-original-width="422" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-SkGeJQShpu3FfKd-CqopXzq1WUsj_3BW20wE1IC0rRUpBLFjCEFD0dXwKZOht_kyQ8z1y6XnUEB6-Zp7cDGWKnuImNvR9JjmtEl8esh6eBeFTv6KcbLTaIq-iaQjElwRfnhS2A4Rxk4/d/vumeter2.jpg" /></a></div><p align="center"><br /></p>
</span></div>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-23922365075205544642011-01-03T12:32:00.003+02:002022-07-03T14:33:43.908+03:00Convert a webcam to infrared<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="193" data-original-width="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOJV0xylmV5c7YctOVQGOPlApotIKy4OApySuI5CGmTii2nLXYZW9cn3RFGf8OJFwQGYh5QszuXvuvSWp0W-VsRSE7U54HhqvsChHUPdRj5VWrWtVVijRUKznbBh71cdk063vdXtmrwo4/s0/ledon.jpg" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
This is a very simple project and it doesn't require a circuit board to be made. We are going to convert a cheap web camera to an infrared camera, capable of viewing in the dark. You can use the IR camera for to a home security system <i>(surveillance system)</i>.
The only thing you need is a infrared light source witch is invisible to the naked eye. But this is the subject of another project!
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
As you may know web cameras include CCD sensors <i>
(charge-coupled device)</i> witch are sensitive to the near
infrared <i>(and of course to the visible light)</i>. In order
to block infrared light, the manufactures including a filter
between the lens and the CCD sensor, to allow only the visible
light to pass. However still a small amount of infrared light
manages to pass. That is why you can see the light coming out
form an infrared LED with your webcam.
<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
<ul><li>One cheap webcam <i>(I bought mine for 12 Euros)</i>. You can
use a more expensive webcam for better results, but make sure you
don't want it any more.</li><li>Some kind of infrared light source <i>(e.g. a lamp or a number
of infrared LED's).</i> The more light the
better<i>.</i></li><li>Some film negatives <i>(prefer the ones for color pictures)</i>.</li></ul>
<p><b>Attention:</b> It's possible to destroy your webcam by
following this procedure. Make sure you don't want it any more!</p>
<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Capturing infrared light with a webcam</span></b><br /><hr size="1" />
As you may know web cameras include CCD sensors that are
capable of capturing both visible and infrared light.
Manufactures include a filter to block the infrared light, but
some of it still passes through. This is the main reason you can
see the light coming out from an infrared LED <i>(look at the
next picture)</i>. These type of LED's are emitting infrared
light invisible to the naked eye.<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="192" data-original-width="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_V129PrXkKaxLlNiTy6FvxPbGCJTBkP-zu7rcD3sV97NKAQVERyUALxzJwhbWCpiCAisBumdxg8K0b_s3jtmk-r44Q9ZyYnlnaSz_UD9himRJ4z_EHmSEIINKPyvdpKwEAahyphenhyphenAi-MCwI/s0/cameratest.jpg" /></div><p align="center"><br /></p>
<p>If we remove the filter then more infrared light will be
captured from the webcam. We can use this phenomenon in
surveillance systems <i>(for example watching a dark room)</i>. Even if
we light the room with infrared radiation it will remain dark to
our naked eyes <i>(and to the intruder!)</i>.</p>
<p> </p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Conversion steps</span></b><br /><hr size="1" />
I will describe the procedure with few simple steps.
First we will need a standard usb webcam. I selected a joker
webcam by crypto. The are two main reason for that. It's a
cheap webcam <i>(so if we accidentally destroy it, we won't
loose a lot of money)</i> and it's easy to hack.<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="232" data-original-width="153" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh76wed18XWQ8Nzz3Wp65U0tfcMVxyPswZOGKl6M5NhE9BdN9Ok2AqsOwniVpeSGA65f1BjlZIi2wp_12suuLwMTjIO6Rs_i92egz8KSEu2At_U-0WfED9OfCKsKDUKGDT3TKtFgjA2YlQ/s0/cryptojoker.jpg" /></div><p align="center"><br /></p>
<p>Disassembly the camera. Unscrew the focusing lens until
it's completely removed</p>
<table border="0" cellpadding="0" cellspacing="0" id="table2" style="border-collapse: collapse; width: 100%px;">
<tbody><tr>
<td width="45%">
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="242" data-original-width="261" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWNCc4O-1j13VTTS0yoxeK89ynYYnTi_RscVI0OZXovy_ywAQH6W8XtyBmQGa1thyphenhyphenqCyRdcmuFsfyOuBITbgFRuoX6SnGe2GAM8moO6tixKRSq2MJuKEPiA7HOpi3DjKZQh_i2SaDkKYk/s0/disassemble1.jpg" /></div><p align="center"><br /></p></td>
<td width="55%">
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="149" data-original-width="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsahD503JvBLsaLisze8RVoVB5O6WJ_dp-AabWH07cyaTj7ZfipucD2TyM8k0jQCxDwtlPWIBgxdr5ZeWuweNqgvt9Jb-4UOPn_rOyTEDnA1kvOozoVT66MvFoTEaeJRw_vFhCOn8nNoI/s0/disassmble2.jpg" /></div><p align="center"><br />
The lens is now removed</p></td>
</tr>
</tbody></table>
<p align="justify">
Remove the infrared filter from the back of the lens. It was
impossible for me to remove it without breaking it. Be careful
when breaking the filter to avoid destroying the lens</p>
<table border="0" cellpadding="0" cellspacing="0" id="table1" style="border-collapse: collapse; width: 100%px;">
<tbody><tr>
<td width="45%">
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="163" data-original-width="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE5Cd7Zsim66WxjtlNyAl2ZLoNxqPx101Ahm-qeJ2yPmeJyPsfWtxrz42s_pwmY-VyOSeDgDv1T7ZJ1b6imBhTwW0gQooeB3lCA6WtVtDU9DMMd960eO9-f5hvvx_4Qb2dUtTEqFcRbQU/s0/irfilter.jpg" /></div><p align="center"><br />The
broken IR filter<br /><i>(this filter blocks infrared)</i></p></td>
<td width="55%">
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="256" data-original-width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZuEsrqKKJu4BeWARcV1XuOoHdJgjZIBhc6t_GN8lZDFF_eBnmXBtrEFi-eu4vj08i1kekrZYjalh4gbnVdhhJJrb7SnOBkpGJ121r633tLmsBz5HmQIAY3UI18wx-aJDVJg19Wb7DKcA/s0/cameralens.jpg" /></div><p align="center"><br />The
exposed lens after removing the filter.<br />Notice the nice area
above the lens.<br />This is the place where we will put our filters</p></td>
</tr>
</tbody></table>
<p align="justify">
In order our webcam to
work as an infrared camera, we must replace the original filter with
another one. The trick here is to block normal light and let
infrared pass through. The best<i> (simple and cheap)</i> choice is
to use film negatives<span lang="el"> </span><i>(from the old times
of analog photography)</i> like the one in the picture</p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="154" data-original-width="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhml5a1rdgo9jZCpORY1oax9Pys12K8L0TrrlgqWJswPypXoORpuG-4VAe9RGggcR1rFZ7VpUtvqwVW8WloTWmCaYnlYlyD4NcD0w8b9QnTAaJ8AJcCWFN09LZcNeYxRdECp5apzKS7Q5c/s0/film.jpg" /></div><p align="center"><br /></p>
<p align="justify">
<font face="Verdana" style="font-size: 10pt;">Cut the dark area of the
film in small squares and place them where the original IR filter
was. They must have approximately the same size as the original
filter.</font></p>
<p align="justify">
<font face="Verdana" style="font-size: 10pt;"><b>Attention:</b> Don't
use the area where the actual negative of the picture is. You will
not have the desired results.</font></p>
<p align="justify">
<font face="Verdana" style="font-size: 10pt;">For better results use
more than one <i>(I used two, but it's possible to have better
results by using three)</i>. Make sure you cut the squares big
enough in order to stack inside the area of the original filter.</font></p>
<center>
<table border="0" cellpadding="0" cellspacing="0" id="table3" style="border-collapse: collapse; width: 100%px;">
<tbody><tr>
<td width="45%">
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="194" data-original-width="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-bcjXU3HBNzNEfZYQ_u4GlOhlQDLFTpnBpBzUDRzSzjbOz0VwAiLeJLzq6WQQkIj0XvV3X9TlywXB-3aOZTKI_KoglICzLZT0f3rZeKSXaetTr6J2h5yBX3VTk3gu3nZQ9iLSgUNskIs/s0/filmfilter1.jpg" /></div><p align="center"><br />
The first square film filter<br /><i>(this will be the first
layer)</i></p></td>
<td width="55%">
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="184" data-original-width="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1psN7Zl1PDRI-NfCGPS1GomuI5vavoaqJw3j0XZAdwl2_HctnWedZ3t5YEkQfBLsOg0Cn-wZqQwT32aO7Go7IMk_uD43aaHHIKWLX7pWstEqL45c7itzXjQYDNsL4-Eq0WIZ6uLq-Zfg/s0/filmfilterincam1.jpg" /></div><p align="center"><br />
The first filter placed inside the area above the lens</p></td>
</tr>
<tr>
<td width="45%">
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="175" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8sRI6s3bH9sHbUSA_L3j9LtijjTjsr-hvQkrA4nmuqlQ446mNvuwcRcHGaF3BXRQr5sZF5WNtl0Rk40bA6BWzyNdQRWvWB88C6fs-hbSaKlDmGlmAbEEJm3jxlOcXEyiAB5_OBPsBL34/s0/filmfilter2.jpg" /></div><p align="center"><br />
The second square filter<br /><i>(this will be the second layer)</i></p></td>
<td width="55%">
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="158" data-original-width="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRtSa-BKo2-dgu2qdlkJCeUdt9iczTBB1nwXxf_QoD4xxhF7ovFT_5xaVznrb5y1WJFthDjWa2a5vXIqc9NoS_yvjABT1_twwH0BHNKpaFKKqJ0auDLw8m8yqkRZzEGNwxjfWcn7jClm0/s0/filterincam.jpg" /></div><p align="center"><br />
The second filter placed above the previous one<br /><i>(the completed
work)</i></p></td>
</tr>
</tbody></table> </center>
<p align="justify">
<b>Attention:</b> Avoid touching the film with your hands and make
sure it's clean. Make sure the lens is also clean, before fitting
the squared film filters. Don't use super glue to fit the filters in
place. It may accidentally go to the lens.<br /><b>Note:</b> This was one of the
reasons I selected the crypto joker camera. It has a nice area for
fitting the negatives without the need of a glue.</p>
<p align="justify">
In the following picture you see how things look in infrared <i>(the
light source is a lamp which is also emitting to infrared)</i></p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="275" data-original-width="374" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxZUa_ML2Ly7p1AC9jV1-gPx1j68wUClCB0oj5i9YKBobzLbtiULRilmPRS4VDFV9DF_bKgFVR9tXe6t-eJomy-6bQBs0PrMXj2ufg4DwPwERV5yQr0GuZHfcvDiK_iYqvlRHWwVFwWZE/s0/infrared.jpg" /></div><p align="center"><br /></p>
<p align="justify">
<b>Note:</b> Notice how bright an infrared LED is <i>(the original
filter was blocking most of the infrared light)</i>.</p>
<p align="justify">
The same picture in a dark room. Our light source is just a TV
remote control</p>
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="241" data-original-width="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqL6Pcl3WXFudU0D5PM3to9OP4vcGUMToh5AJDm6Xl8dHKmt12-iBNeAXM1y92Uo6WIA9LvWb_eSpTT5exfNmxBKBz3JU13aQFMTu79c_kVzUyLOZFg3_etYvOj_tUyk-Vq7KojE5ADLg/s0/infradark.jpg" /></div><p align="center"><br /></p>
<p align="justify">
</p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Seeing in the dark</span></b><br /><hr size="1" />
In order to see in the dark we need an infrared light
source. A lamp is our first choice but it emits visible light
too <i>(an the intruder will see it)</i>. So the next solution is
using infrared LED's<p align="justify"><b>Note:</b> Crypto joker webcam has
build in LED's, for viewing in the dark. These are ultra bright
white LED's <i>(see the picture below)</i> and they are not
emitting in infrared. The first thought was replace the
existing LED's with infrared ones. Unfortunately there is one problem.
The
driving circuit is not designed for infrared LED's, which means
they will not emit a lot of light <i>(infrared)</i>. In my
experiments I had more light coming out from a TV remote control
<i>(which has only one LED)</i> even when I replaced all six of
the original LED's with infrared ones. Short-circuiting the internal
current limiting resistors didn't help much.</p>
<table border="0" cellpadding="0" cellspacing="0" id="table4" style="border-collapse: collapse; width: 100%px;">
<tbody><tr>
<td width="45%">
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="193" data-original-width="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOJV0xylmV5c7YctOVQGOPlApotIKy4OApySuI5CGmTii2nLXYZW9cn3RFGf8OJFwQGYh5QszuXvuvSWp0W-VsRSE7U54HhqvsChHUPdRj5VWrWtVVijRUKznbBh71cdk063vdXtmrwo4/s0/ledon.jpg" /></div><p align="center"><br />
Unfortunately by replacing the original LED's with infrared
ones...</p></td>
<td width="55%">
<div class="separator" style="clear: both; text-align: center;"><img border="0" data-original-height="228" data-original-width="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuje6_w81lKzTXG7eogFcxNRydyU4w9E-VY9x0SYHRd3uF-8Ictl5rkNBJuIsBCMIxSNVEAOzLFNQmHP13OebdFzgw5ChR8glDg_mWMo9IEn2udsal-ROBFIjPTnuTrviLzQBXnLbf4X4/s0/irleds.jpg" /></div><p align="center"><br />
...will not give you the desired infrared light <i>(even if you
short-circuit the internal current limiting resistors) </i></p></td>
</tr>
</tbody></table>
<p align="justify">
My goal here is capturing images from a completely dark room. So I
will need more than six LED's to accomplish that. So why not doing
something extreme like the <i>
<font color="#FF0000"><b>*(not uploaded yet)*</b></font></i></p>
</span>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-49080606258298963502010-05-10T20:25:00.050+03:002022-07-03T14:35:59.451+03:00BasAVRa LiTe<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="353" data-original-width="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLq0FJE_YNzDayK6Q-xiKOAoCAksY4z4Ji93mCetU-apYZehyCrnRQp-rRKYZIWHIVmVhogC1QKFOH57a42xbbBy_r0BhAnKl81iPca4jUkku1NbHptU8sGSrImW67-9dRbY3K7Du35W8/s320/basavra_circuit.jpg" width="320" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
BasAVRa LiTe is an alternative programming board for the famous Basic Stamp II by Parallax <i>(OEM
version)</i>. We have already see how to make our own homemade
Basic stamp 2 board of education using the OEM chip, in the
article <a href="https://dimitrispiperidis.blogspot.com/2004/12/bs2boe.html">BS2 programming board</a>.<br />BasAVRa
LiTe goes one step further by replacing the wired serial
connection with a wireless Bluetooth to serial connection. With
BasAVRa LiTe you can program and control Basic Stamp 2 from your
computer without using wires and from great distance <i>(e.g.
from the next room)</i>.
</span></div>
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
With BasAVRa LiTe you can exchange data wirelessly <i>(via
Bluetooth)</i> between the computer and Basic Stamp 2, by using the
PBasic commands DEBUG and DEBUGIN. You don't have to use a third
party transceiver.<p>
</p><table bgcolor="#FFFFCC" border="1" cellpadding="4" cellspacing="1" id="AutoNumber39" style="border-collapse: collapse; width: 100%;">
<tbody><tr>
<td width="100%">
<div align="justify">
Because BasAVRa LiTe is not a product of Parallax you can not
buy it from their website <i>(<a href="http://www.parallax.com">www.parallax.com</a>)</i>.
Of course you will buy Basic Stamp 2 OEM chip.</div>
</td>
</tr>
</tbody></table>
<p>
Keep in mind that you can not use parallax
Basic Stamp Editor to program BasAVRa LiTe. You must use BasAVRa
Editor instead. This action has no affect to your PBasic
programs, because BasAVRa Editor uses Basic Stamp tokenizer
library <i>(with simple words your PBasic code stays the same)</i>.</p>
<p>
The graphical user interface <i>(GUI)</i> of BasAVRa Editor is very
close to Parallax's Basic Stamp Editor, so it will not be difficult
to use.<br />Download the program from this page:
<a href="https://drive.google.com/file/d/1e-W4ysbwdOzJdeqAQNGgMYM6I5XVaRdh/view?usp=sharing">BasAVRa Editor</a></p><p>
</p><table bgcolor="#FFFFCC" border="1" cellpadding="4" cellspacing="1" id="AutoNumber40" style="border-collapse: collapse; width: 100%;">
<tbody><tr>
<td width="100%">
<div align="justify">
In order BasAVRa LiTe to work, you need to download the
appropriate firmware to ATTiny2313 <i>(see
below)</i>. To do that you need a programmer supporting
ATTiny2313 <i>(e.g. STK500)</i>.</div>
</td>
</tr>
</tbody></table>
<p>
If you don't have such a programmer and you don't want to buy a new
one, there is an alternative. You can make your own. If you search
the internet you will find many implementations and schematics, but
I recommend building the one presented in this page:
<a href="https://dimitrispiperidis.blogspot.com/2005/04/siprog.html"> </a><a>A simple SI-Prog</a>.<br />I have included a
simple tutorial on how to download the firmware using the previous
programmer <i>(see below)</i>, to help you out.</p>
<div><br /><b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><hr size="1" />
<ul><li>Four 10K<span lang="el">Ω</span> resistors <i>(1/4 Watt)</i>.</li><li>Four 4.7KΩ resistors <i>(1/4 Watt)</i>.</li><li>One 180Ω resistor <i>(1/4 Watt)</i>.</li><li>One 240Ω resistor <i>(1/4 Watt).</i><br /><b>Attention:</b><i> </i>
Don't replace it with another resistor.</li><li>One 390Ω resistor <i>(1/4 Watt)</i>.<br /><b>Attention:</b> Don't
replace it with another resistor.</li><li>One 1000<span lang="el">μ</span>F electrolytic Capacitor <i>(16
Volts)</i>.</li><li>One 330<span lang="el">μ</span>F electrolytic Capacitor <i>(16
Volts)</i>.</li><li>One 470<span lang="el">μ</span>F electrolytic Capacitor <i>(16
Volts)</i>.</li><li>One 1<span lang="el">μ</span>F electrolytic Capacitor <i>(16
Volts)</i>.</li><li>Seven 100nF capacitors.</li><li>One transistor BC557B.</li><li>Two 1N4148 diodes. <b>Note:</b> You can replace these diodes
with two BAT85 Schottky diodes.</li><li>A common red LED.</li><li>One 20MHz piezoelectric crystal.</li><li>One 8MHz piezoelectric crystal.</li><li>One Basic Stamp 2 interpreter chip <i>(DIP)</i>.</li><li>One 24C16 memory chip <i>(I<sup>2</sup>C)</i>.</li><li>One AVR ATtiny2313 chip.</li><li>One LM2940 LDO voltage regulator <i>(with the appropriate cooler, if
you plan to drag more than 500mA)</i>.</li><li>One LM317 voltage regulator <i>(TO-92 package)</i>.</li><li>One Bluetooth to serial converter module. <i>(You can use the
module constructed by
<a href="http://www.sureelectronics.net/goods.php?id=402">Sure electronics</a> or anything else compatible
with it)</i>. <b>Note:</b> Remember BasAVRa works with 9600 baud.
Buy a Bluetooth module supporting the previous baud rate.</li><li>One ALPS button <i>(a digital push button. Not switch) </i>for a
manual reset feature.</li><li>One power jack.</li><li><i>(Optional)</i> Two single row female pin headers (one with 16 pins<i> and one
with 13. If you have headers with more pins, just cut them). </i>You
need 16 pins for the I/O ports and 13 for power <i>(look at the schematic)</i>.</li><li><i>(Optional) </i>One female double row pin header with 20 pins totally <i>(If you
have with more pins, just cut it)</i>. </li><li> <i>(Optional) </i>One small breadboard.</li><li>A 28 pin DIP socket<i> (for BS2 chip)</i>.</li><li>A 20 pin DIP socket<i> (for the AVR chip)</i>.</li><li>A 8 pin DIP socket<i> (for the memory chip)</i>.</li><li>A Veroboard <i>- StripBoard (or a PCB but I don't include a layout. Make your
own)</i>.</li><li>Wire for connections</li><li>Solder and soldering iron</li></ul>
<p>Also you will need a stabilized 12V, 9 Volt or even 6Volt external
power supply, due to the low dropout voltage regulator. I
recommend using six NiMH rechargeable batteries.</p></div><div><br /></div><div><b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><hr size="1" />
In the following picture you can see the general idea
behind BasAVRa LiTe and how, approximately, each unit costs <i>(<b>Note:</b>
The prices in the picture are old and now may vary. Probably
they would be cheaper)</i><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiADvaWUhploORmihBkxvrcvuu-NKfN1Er2lEeJyrVTWJPMiBl8a6h-TmypUD2CJkByeIyiXohmasoDN9pvUjybiS82L2HisySxEFov1a-zJjZ8Iim5McWYihbSbqAwTxL9obDWxMKXUo/d/bs2bluetooth.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="442" data-original-width="647" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiADvaWUhploORmihBkxvrcvuu-NKfN1Er2lEeJyrVTWJPMiBl8a6h-TmypUD2CJkByeIyiXohmasoDN9pvUjybiS82L2HisySxEFov1a-zJjZ8Iim5McWYihbSbqAwTxL9obDWxMKXUo/d/bs2bluetooth.jpg" /></a></div><p align="center"><br /></p>
<p>Here is the schematic diagram of BasAVRa LiTe <i>(Click
on the picture to enlarge)</i>.</p>
<p align="center">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtcjfNwkc_IrN2B5kaazTB25e1jus-N_KgcD14PAWUs0z5v7PJpyw-irjwHN8zBnQUZjOF6dyDBnINxVdVmqML7kUki5ouFZFdIY7CIo1jaWsNKNnA8zFKzUoBiA3iFPk344lbvq0ucfU/w640-h451/BasAVRaLiTe.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="971" data-original-width="1375" height="451" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtcjfNwkc_IrN2B5kaazTB25e1jus-N_KgcD14PAWUs0z5v7PJpyw-irjwHN8zBnQUZjOF6dyDBnINxVdVmqML7kUki5ouFZFdIY7CIo1jaWsNKNnA8zFKzUoBiA3iFPk344lbvq0ucfU/w640-h451/BasAVRaLiTe.gif" width="640" /></a></p>
<p><b>Attention:</b> Solder the 100nF capacitors as close to the
ICs power supply pins as possible. Same thing with the
piezoelectric crystals. Solder them, as close as possible to the
XTAL pins of the ICs. Don't replace the resistors of the LM317
regulator with other values. That regulator is used to generate
the necessary 3.3Volts for the Bluetooth module. If you don't
have the low-dropout voltage regulator LM2940, you can replace
it with the standard 7805 regulator.</p>
<h5> </h5>
<b><span style="font-family: "verdana"; font-size: 12pt;">Some Notes for the Bluetooth module</span></b><hr size="1" />
<font face="Verdana" style="font-size: 10pt;">Initially, I
used the Bluetooth to serial converter designed by
<a href="http://www.sureelectronics.net/">Sure electronics</a>.
However BasAVRa LiTe will work with any Bluetooth to serial
converter, as long as it's compatible with the one designed by
Sure <i>(and by compatible I mean, having the same pinout and
baud rate)</i>. Almost all the converters you can find are
compatible and they will work without any problems.</font><p align="center"><font size="2"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikovW1p5070zJMfhnuxgWTfkyyszwtRzDFvDTRN28uM41YT440jt_shls0ztZZlF37ek3WBWhJkAL7CEPsOZjqztApod86m2CIYJF6L18jgQGzjfwErrGI2LJM7hZNjGhM9C5e09Tl0x0//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="180" data-original-width="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikovW1p5070zJMfhnuxgWTfkyyszwtRzDFvDTRN28uM41YT440jt_shls0ztZZlF37ek3WBWhJkAL7CEPsOZjqztApod86m2CIYJF6L18jgQGzjfwErrGI2LJM7hZNjGhM9C5e09Tl0x0//" /></a></font><br />
<a href="http://www.sureelectronics.net/goods.php?id=402">Bluetooth
to serial converter</a><br />UART interface 9600 bps by Sure
electronics</p>
<p><b><font size="2">F.A.Q</font><font size="2">.</font></b> </p>
<center>
<table bgcolor="#F2F9FF" border="1" cellpadding="4" cellspacing="1" id="AutoNumber41" style="border-collapse: collapse; width: 89%;">
<tbody><tr>
<td width="83%">
<div align="justify"><font face="Verdana" size="2">
</font><u>
<font face="Verdana" size="2"><b>Question:</b></font></u><i><font face="Verdana" style="font-size: 10pt;">
Can I use a different type of Bluetooth module, even if it has no
the same pinout or baud rate like the one designed by Sure
electronics?</font></i></div>
<font face="Verdana" style="font-size: 10pt;">
<div align="justify">
</div>
</font>
<font face="Verdana" size="2">
</font><div align="justify"><font face="Verdana" size="2">
<u><b>Answer:</b></u></font><font face="Verdana" style="font-size: 10pt;">
Yes. If your Bluetooth module has a different pinout, you must
take care on how you'll connect it in the circuit. Remember that
<b>pin 1</b> <i>(see the schematic)</i> is <b>UART-TX</b>, <b>
pin 2</b> is <b>UART-RX</b>, <b>pin 12</b> is the <b>power
supply</b> <i>(usually 3.3V)</i> and <b>pin 13</b> is <b>ground
<i>(GND)</i></b>.</font></div><font face="Verdana" style="font-size: 10pt;">
<div align="justify">
If your Bluetooth module has a different baud rate, then you can
hack the source code of the firmware <i>(see below)</i>. Search
the code for the line <i> <b><font color="#000080">$baud</font></b>
<font color="#FF0000">=</font> 9600</i> and replace the number with
the baud rate of your Bluetooth module.</div>
<div align="justify">
</div>
<div align="justify">
<b>Attention:</b> If your Bluetooth to serial converter has a
high baud rate <i>(e.g. 56700)</i> then you may have to replace
the 8MHz crystal of ATtiny2313 with a different value, to
eliminate baud error. If you do replace the piezoelectric
crystal, don't forget to change the source code too <i>(find for
the line <b><font color="#000080">$crystal</font></b>
<font color="#FF0000">=</font> 8000000 and change the number
with
the new crystal's value. Value is in Hz)</i>.</div>
<div align="justify">
</div>
<div align="justify">
<b>Note:</b> With most Bluetooth to serial converters you can
set the baud rate to the desired value <i>(read manufacturer's
documentation)</i>.</div>
</font></td>
</tr>
</tbody></table></center>
<p> </p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Downloading the firmware to ATTiny2313 <i>(Only for the first time of use)</i></span></b><hr size="1" />
<font face="Verdana" style="font-size: 10pt;">In order
BasAVRa LiTe to work, you need to download the firmware to
ATTiny2313. You need to do this only once.<br />Of course you will
need a programmer to download the code. You can use whatever
programmer, supporting AVR microcontrollers, you like <i>(e.g.
STK500)</i>. If you don't have a programmer then you can buy a
new one, or you can build one by yourselves.<br />I recommend the
<a href="https://dimitrispiperidis.blogspot.com/2005/04/siprog.html">simple SI-Prog</a> programmer presented in this site. Is very easy to build
and it has a low total cost <i>(close to zero if you already
have the necessary parts)</i>. You also need to download and
install PonyProg2000 from the aythor's website <i>(<a href="http://www.lancos.com/ppwin95.html">www.lancos.com/ppwin95.html</a>)</i>.</font><p>
<font face="Verdana" style="font-size: 10pt;">Here I will describe
the downloading procedure in few steps, supposing you have built
the <a href="https://dimitrispiperidis.blogspot.com/2005/04/siprog.html">simple SI-Prog</a>.</font></p>
<blockquote>
<p><font face="Verdana" style="font-size: 10pt;"><b>Step 1:</b>
First download the hex file of the code <i>(firmware)</i>. <a href="https://drive.google.com/file/d/1b3VkrnoYM54lHMJ1qz1u2E8BptSp9Dn1/view?usp=sharing">BasAVRa LiTe firmware</a></font></p>
<table border="0" cellspacing="10" style="width: 90%;">
<tbody><tr>
<td width="308"><font face="Verdana" style="font-size: 10pt;"><b>Step 2:</b>
After unzipping the file, open PonyProg2000</font><p align="center">
<font size="2"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHDJPz3vJTSH9hBWYvoHoonctytzi2IBeJCPn0LdY3p4K2e3pLt6_uSelm1O2KlsmzZbi3UMzAMTlqAFhzdTgBALoWL45rn9aeg53tRhZJPFZ4TyHKjwUGrKeh38ejrkvaVP6_tq9Bisw/d/prog1.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="737" data-original-width="1260" height="117" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHDJPz3vJTSH9hBWYvoHoonctytzi2IBeJCPn0LdY3p4K2e3pLt6_uSelm1O2KlsmzZbi3UMzAMTlqAFhzdTgBALoWL45rn9aeg53tRhZJPFZ4TyHKjwUGrKeh38ejrkvaVP6_tq9Bisw/w200-h117/prog1.gif" width="200" /></a></font></p></td>
<td><b>Step 3:</b> From menu select <i>"Device" </i><i>→ "AVR micro" </i><i>→
"ATtiny2313"</i><p align="center">
<font size="2"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZQB9EJUJEvrxD_WHHvibDi-C2AMRdrQN-9F0NxBF69sXD4UZpxftiSwggvUP26-OWFXGDnsCanli43ScmIkgO0KFMpIiT1QyupuwiJNNRWpmElhIzsOiGzgsw4HqI6iizctdNhxiD8_k/d/prog2.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="735" data-original-width="1259" height="117" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZQB9EJUJEvrxD_WHHvibDi-C2AMRdrQN-9F0NxBF69sXD4UZpxftiSwggvUP26-OWFXGDnsCanli43ScmIkgO0KFMpIiT1QyupuwiJNNRWpmElhIzsOiGzgsw4HqI6iizctdNhxiD8_k/w200-h117/prog2.gif" width="200" /></a></font></p></td>
</tr>
</tbody></table>
<p><b>Step 4:</b> Remove ATTiny2313 from BASAVRa LiTe and
place it on the
programmer. Then connect the programmer to your computer's serial port.
<u>Power on the device</u>. From menu select <i>"setup" </i><i>→
"Interface
setup..."</i> and the I/O port setup window will pop-up.</p>
<p align="center"><font size="2"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM3ElvRq9aH-o77AU53JzBZY5jLIW03zJ9PRXXJLRiTxKMOM7B489kuxecnXZhY0FwOiYZgp8qPiTPFdK_I1ZF7jnInYfuXlepSKDzgHYu5DHNoD_ERP5U-qsGEEd8xpA19To6ZArFn1s//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="304" data-original-width="311" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM3ElvRq9aH-o77AU53JzBZY5jLIW03zJ9PRXXJLRiTxKMOM7B489kuxecnXZhY0FwOiYZgp8qPiTPFdK_I1ZF7jnInYfuXlepSKDzgHYu5DHNoD_ERP5U-qsGEEd8xpA19To6ZArFn1s//" /></a></font></p>
<p>Select the serial port you connect the programmer
<i>(usually COM1)</i>. From the dropdown list select "JDM API" or "SI-Prog
API". The window must look like the above picture.</p>
<table bgcolor="#FFE1E1" border="1" cellpadding="4" cellspacing="1" id="AutoNumber31" style="border-collapse: collapse; width: 90%;">
<tbody><tr>
<td width="100%">
<p align="justify">
<b>Attention:</b> SI- Prog and PonyProg2000 require a physical
serial port on your computer. <u>IT WILL NOT WORK with a USB to Serial
converter</u>.</p></td>
</tr>
</tbody></table>
<p><b>Step 5:</b> Select <i>"Command" </i><i>→
"Security and Configuration bits..."</i> and the Security and
configuration bits window will pop-up, after automatically
reading the device. Uncheck all the boxes like you see in the
picture below. Press the button "Write". Then Press "OK"</p><p align="center">
<font size="2"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSsDmsxKySlMgf1fMcdOKHuMKZSIsn8PDyN8FopQ7E0Ww1qjstIk53qE8y_9N43hdpkI97MITTfHSEBaInmFxIZN2pAt63atMs_kT1KlDdldh5T5HOZdtg2VmERoBs1L_iZC8IU7Aufgk/d/prog4.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="737" data-original-width="1261" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSsDmsxKySlMgf1fMcdOKHuMKZSIsn8PDyN8FopQ7E0Ww1qjstIk53qE8y_9N43hdpkI97MITTfHSEBaInmFxIZN2pAt63atMs_kT1KlDdldh5T5HOZdtg2VmERoBs1L_iZC8IU7Aufgk/w320-h187/prog4.gif" width="320" /></a></font></p>
<table border="0" cellspacing="10" style="width: 90%;">
<tbody><tr>
<td width="302"><b>Step 6:</b> Now we are ready to
load the hex file. Select <i>"File" </i><i>→
"Open Device File...". </i>Browse to the directory
you unzipped the hex file and press "Open"<p align="center">
<font size="2"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPCpLQLDNIeBjjKkvl8AQpvHSTyu7B4O5MHpvOfJwB8buywWWGx2E3Tpo4sGwF7B-t98U1GW93Q2NxtO1Vv1SjOhppoOpA25KN_YyiStSYJJyxq3IrfV95m0y8-bW-cIkgrdMoN_si6YQ/d/prog6.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="525" data-original-width="840" height="125" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPCpLQLDNIeBjjKkvl8AQpvHSTyu7B4O5MHpvOfJwB8buywWWGx2E3Tpo4sGwF7B-t98U1GW93Q2NxtO1Vv1SjOhppoOpA25KN_YyiStSYJJyxq3IrfV95m0y8-bW-cIkgrdMoN_si6YQ/w200-h125/prog6.gif" width="200" /></a></font></p></td>
<td><b>Step 7:</b> Now we are going to program the
chip. Select <i>"Command" </i><i>→
"Write All" </i>and press yes to the pop-up message.
Now you will see the programming procedure
initialized. First the program will write the code
and then will automatically verify it.<p align="center">
<font size="2"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYJimSq-wACDQHAYSLOPZ-U9uxN_75wNEMqJILk_I-EM8CzhJ9ZV9R3JXYTAhLx6BTmVcFi88maP6p35gcIi-Gw0Z8oFswVL5A56kbQHqMkwbZVnyyOK3F-_PZDiKq_FGoFvxTvgiDgFM/d/prog11.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="736" data-original-width="1260" height="117" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYJimSq-wACDQHAYSLOPZ-U9uxN_75wNEMqJILk_I-EM8CzhJ9ZV9R3JXYTAhLx6BTmVcFi88maP6p35gcIi-Gw0Z8oFswVL5A56kbQHqMkwbZVnyyOK3F-_PZDiKq_FGoFvxTvgiDgFM/w200-h117/prog11.gif" width="200" /></a></font></p></td>
</tr>
</tbody></table>
<p><b>Step 8:</b> If you see the write successful notice,
then the procedure has been completed. Now, the firmware has
been downloaded and your chip is ready to go. You don't have
to repeat these 8 steps anymore.</p>
<p align="center"><font size="2"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhswp4I5g2b7gO7LyhWHcYXfwqhXYF2tyBwceeOdzeTAbQOzS2kjvygsk2Rmf7JlSoaFg4ZavIAy7g7NrcVRLqnE4mmS5WNq29OQvv0D9aQ1VpeXilNQ45FDB5k5zlQhY7sn9qEouUFcfA/d/prog13.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="738" data-original-width="1260" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhswp4I5g2b7gO7LyhWHcYXfwqhXYF2tyBwceeOdzeTAbQOzS2kjvygsk2Rmf7JlSoaFg4ZavIAy7g7NrcVRLqnE4mmS5WNq29OQvv0D9aQ1VpeXilNQ45FDB5k5zlQhY7sn9qEouUFcfA/w320-h187/prog13.gif" width="320" /></a></font></p>
<p><b>Note:</b> If you have a write error message please try
again. Make sure you have powered the device on during the
whole procedure.</p>
</blockquote>
<p> </p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Source Code</span></b><hr size="1" />
<p>BasAVRa LiTe is <b>Open Source</b> and you can download the code
from the following link. The program is written with the demo
version of BASCOM-AVR by <a href="http://www.mcselec.com/">MCS
Electronics</a>.<br />You can download directly BASCOM-AVR Demo for free
from this link:
<a href="http://www.mcselec.com/index.php?option=com_docman&task=doc_download&gid=139&Itemid=54">
BASCOM-AVR Demo</a></p>
<p>Download BasAVRa's LiTe source code: <a href="https://drive.google.com/file/d/1q9jexcCH362RU7tv1bzGnujk6e9z6cEn/view?usp=sharing">BasAVRa LiTe</a></p>
<p>
</p><table bgcolor="#FFFFCC" border="1" cellpadding="4" cellspacing="1" id="AutoNumber42" style="border-collapse: collapse; width: 100%;">
<tbody><tr>
<td width="100%">
<font face="Verdana" style="font-size: 10pt;"><div align="justify">
<b>Note:</b> You can compile the code with BASCOM-AVR Demo, but
remember that the code for the flash and eeprom are saved to
separate files. The hex file is for flash and the eep file for
the eeprom. You must download both of them to the chip or it
will not work.</div>
<div align="justify">
To save you time from the extra work, I have created a single
hex file, ready to download it to the chip <i>(see above)</i>.</div>
</font></td>
</tr>
</tbody></table>
<p> </p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Pictures</span></b><hr size="1" />
<font face="Verdana" style="font-size: 10pt;">In the following
picture you see the BasAVRa LiTe, build on a Veroboard. You
can't see the power supply section, because it is build on
another Veroboard. Also I didn't add the small breadboard <i>(but I
will add it in the future)</i>.</font></div><div><font size="4"><b><br /></b></font></div><div><br /><div style="text-align: center;"><font size="4"><b><font size="2"><span style="font-family: "verdana";"><font style="font-size: 10pt;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLq0FJE_YNzDayK6Q-xiKOAoCAksY4z4Ji93mCetU-apYZehyCrnRQp-rRKYZIWHIVmVhogC1QKFOH57a42xbbBy_r0BhAnKl81iPca4jUkku1NbHptU8sGSrImW67-9dRbY3K7Du35W8//"><img border="0" data-original-height="353" data-original-width="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLq0FJE_YNzDayK6Q-xiKOAoCAksY4z4Ji93mCetU-apYZehyCrnRQp-rRKYZIWHIVmVhogC1QKFOH57a42xbbBy_r0BhAnKl81iPca4jUkku1NbHptU8sGSrImW67-9dRbY3K7Du35W8/d/basavra_circuit.jpg" /></a></font></span></font></b></font></div></div><p><span style="font-family: "verdana";"></span></p>
</span>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-33469890014776444412009-07-16T10:54:00.006+03:002022-07-03T14:37:26.928+03:00RS232 to TTL level converter<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="144" data-original-width="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXHD1Bc53Z_ErgKXtfVPogYrJ2la-gL5X20C3YXOi9c3WdlyWvZzKbBcZyubnxnK77D-21dAx-UvhcSuideb4yDTqkpA4g_F-rs06CaJjggWQva3EcHlsZ2GXSyB_2eXfM4HpMbsTfwdI//" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
Perhaps this is the most famous RS232 to TTL level converter. When launched by MAXIM, it become so popular that several clones acquired as the years went by. This project shows how it is possible to implement a small module to interact easily with devices which support the asynchronous serial interface <i>(TTL levels)</i>.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<div><span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE REST ARTICLE HERE-->
Modern computers don't have serial ports. They have USB
<i>(Universal Serial Bus)</i> ports instead. In order to use
this converter, you must install a PCI card to your motherboard<i>
(a rather expensive and risky solution if you are not an expert).</i>
A better and simpler way is to use a USB to serial converter.
The circuit will work just fine with no problems.</span></div><div><span style="font-family: "verdana"; font-size: 10pt;"><br /></span></div><div><span style="font-family: "verdana"; font-size: 10pt;"><br /> </span></div><div><span style="font-family: "verdana"; font-size: 10pt;"></span></div><span style="font-family: "verdana"; font-size: 10pt;">
<b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><br /><hr size="1" />
<ul><li>Five 1<span lang="el">μ</span>F /16Volt electrolytic capacitors.</li><li>One MAX232 Chip <i>(or a clone)</i>.</li><li>A 16 pin DIP socket <i>(for the MAX2323 chip)</i>.</li><li>A female 9 pin DSUB connector <i>(for PCB)</i>.</li><li>Female pin header <i>(4 pins. If you have one with more pins, just
cut it)</i>.</li><li>A small piece of a Veroboard</li><li>Wire for connections</li><li>Solder and soldering iron</li></ul>
<p>Also you will need a stabilized 5 Volt external power supply.
Normally, you get the necessary volts, from the external circuit
you connect to the converter.</p><p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
Here is the schematic diagram of the RS232 to TTL level
converter<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsNWvsI_NEZuO9IyW8KHDvfj_Yt7NkFLwjeS87rgxnu9pedeh5nRgrlHIXblIr6OM2TucTy5LsVQvr_Gr73XcFfY0hN02qZ3mMIXwgGVlyImz6bupNKkSZZ4luhFNtoMsYKtykRPEmfQ4//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="351" data-original-width="475" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsNWvsI_NEZuO9IyW8KHDvfj_Yt7NkFLwjeS87rgxnu9pedeh5nRgrlHIXblIr6OM2TucTy5LsVQvr_Gr73XcFfY0hN02qZ3mMIXwgGVlyImz6bupNKkSZZ4luhFNtoMsYKtykRPEmfQ4/d/max232.gif" /></a></div><p align="center"><br /></p>
<p><b>Attention:</b> If you have MAX232A or
MAX220, then you must change the values of all capacitors in the schematic, according to MAXIM.
In the
following array you see the values of the capacitors needed for
each chip.</p>
<center>
<table border="1" cellspacing="1" id="table1" style="border-collapse: collapse; width: 44%;">
<tbody><tr>
<td><font size="2"><span style="font-family: verdana;"><b>Chip</b></span></font></td>
<td colspan="5" style="text-align: center;"><font size="2"><span style="font-family: verdana;"><b>Capacitance (<span lang="el">μ</span>F)</b></span></font></td>
</tr>
<tr>
<td><font size="2"><span style="font-family: verdana;"> </span></font></td>
<td><font size="2"><span style="font-family: verdana;">C1</span></font></td>
<td><font size="2"><span style="font-family: verdana;">C2</span></font></td>
<td><font size="2"><span style="font-family: verdana;">C3</span></font></td>
<td><font size="2"><span style="font-family: verdana;">C4</span></font></td>
<td><font size="2"><span style="font-family: verdana;">C5</span></font></td>
</tr>
<tr>
<td><font size="2"><span style="font-family: verdana;">MAX232</span></font></td>
<td><font size="2"><span style="font-family: verdana;">1</span></font></td>
<td><font size="2"><span style="font-family: verdana;">1</span></font></td>
<td><font size="2"><span style="font-family: verdana;">1</span></font></td>
<td><font size="2"><span style="font-family: verdana;">1</span></font></td>
<td><font size="2"><span style="font-family: verdana;">1</span></font></td>
</tr>
<tr>
<td><font size="2"><span style="font-family: verdana;">MAX232A</span></font></td>
<td><font size="2"><span style="font-family: verdana;">0.1</span></font></td>
<td><font size="2"><span style="font-family: verdana;">0.1</span></font></td>
<td><font size="2"><span style="font-family: verdana;">0.1</span></font></td>
<td><font size="2"><span style="font-family: verdana;">0.1</span></font></td>
<td><font size="2"><span style="font-family: verdana;">0.1</span></font></td>
</tr>
<tr>
<td><font size="2"><span style="font-family: verdana;">MAX220</span></font></td>
<td><font size="2"><span style="font-family: verdana;">4.7</span></font></td>
<td><font size="2"><span style="font-family: verdana;">4.7</span></font></td>
<td><font size="2"><span style="font-family: verdana;">4.7</span></font></td>
<td><font size="2"><span style="font-family: verdana;">4.7</span></font></td>
<td><font size="2"><span style="font-family: verdana;">4.7</span></font></td>
</tr>
</tbody></table></center>
<p><b>*Note:</b> Special care you must take when
you connect the converter to the external circuit. You always
connect the RXD line of the converter to the TXD line of the
external circuit. Same thing with converter's TXD line. Connect
it to the RXD line of the external circuit. The following picture
shows this interconnection <i>(e.g. with a microcontroller)</i>.</p><p align="center">
<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPe7n_1mjt2jCrxMLhfbIT0OcWPbyiAGO0gZhF3wrJTd8uf-uz-bc29IGLXR5VQHTLo8cShmCLthOkMgWNLac94xl_hBr8SefYzYkyRZU14K2Q8q9_eGGZjsx3tLrd4Bc8LFiy5mHhj3Q//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="333" data-original-width="475" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPe7n_1mjt2jCrxMLhfbIT0OcWPbyiAGO0gZhF3wrJTd8uf-uz-bc29IGLXR5VQHTLo8cShmCLthOkMgWNLac94xl_hBr8SefYzYkyRZU14K2Q8q9_eGGZjsx3tLrd4Bc8LFiy5mHhj3Q/d/max232connect.gif" /></a></div>
<b><span style="font-family: "verdana"; font-size: 12pt;">Pictures</span></b><br /><hr size="1" />
<font face="Verdana" style="font-size: 10pt;">In the following
pictures you see the converter, build on a small piece of Veroboard.</font><p align="justify"> </p><table border="0" cellpadding="0" cellspacing="0" id="table2" style="border-collapse: collapse; width: 100%;">
<tbody><tr>
<td width="50%">
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-x4OIKj_g88f1XOe-BSEHMQ0paDDh9iNS6AK6AGG-_YCmnCJ_Eu7hesV_bQpICsrwX0maVmUTHVeAcvcOPBuM8et9kDQOwm_blA6D5uU3KyYy_eESHFsw8ULGFUf6O0Mfw1SgHx3Sr5M//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="192" data-original-width="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-x4OIKj_g88f1XOe-BSEHMQ0paDDh9iNS6AK6AGG-_YCmnCJ_Eu7hesV_bQpICsrwX0maVmUTHVeAcvcOPBuM8et9kDQOwm_blA6D5uU3KyYy_eESHFsw8ULGFUf6O0Mfw1SgHx3Sr5M//" /></a></div><p align="center"><br /></p></td>
<td width="50%">
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXHD1Bc53Z_ErgKXtfVPogYrJ2la-gL5X20C3YXOi9c3WdlyWvZzKbBcZyubnxnK77D-21dAx-UvhcSuideb4yDTqkpA4g_F-rs06CaJjggWQva3EcHlsZ2GXSyB_2eXfM4HpMbsTfwdI//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="144" data-original-width="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXHD1Bc53Z_ErgKXtfVPogYrJ2la-gL5X20C3YXOi9c3WdlyWvZzKbBcZyubnxnK77D-21dAx-UvhcSuideb4yDTqkpA4g_F-rs06CaJjggWQva3EcHlsZ2GXSyB_2eXfM4HpMbsTfwdI//" /></a></div><p align="center"><br /></p></td>
</tr>
</tbody></table><font face="Verdana" style="font-size: 10pt;">
</font><p><font face="Verdana" style="font-size: 10pt;">
Here, you see how is connected with <a href="https://dimitrispiperidis.blogspot.com/2004/12/bs2boe.html">AVR
board of Education</a></font></p><font face="Verdana" style="font-size: 10pt;">
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirk8bLJfxU9ZStkRBlWOdHHOAJ7WaAtJF2hXxzx1W50aypNS9YT1yEQsQwEH3Uc8f9ZugfXejT521vFjUHdbT1qUirMgOrQNnNek9-SmI7cMC7_xcv4xfKmaNoGz9hqMPsgYNPS6-725I//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="288" data-original-width="384" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirk8bLJfxU9ZStkRBlWOdHHOAJ7WaAtJF2hXxzx1W50aypNS9YT1yEQsQwEH3Uc8f9ZugfXejT521vFjUHdbT1qUirMgOrQNnNek9-SmI7cMC7_xcv4xfKmaNoGz9hqMPsgYNPS6-725I/d/rsttlconvert3.jpg" /></a></div><p align="center"><br /></p>
<p align="justify">
If you don't have any serial port to your computer, you can use a USB to serial
converter. Here is an example picture.</p>
</font><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghz2a7mzttF2vb_1TssRlHp-1yAbSTaLuClWqjcl7H20C-VTrjgKzKSEDUBxEkHDDDTAFaOSgZXpmr3tdcPuEFf0bTt-qL2txLMXAu25Ja9a2ER7p0JUzxE1n-KnIUp1OSUDpf1PrLJJc//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="240" data-original-width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghz2a7mzttF2vb_1TssRlHp-1yAbSTaLuClWqjcl7H20C-VTrjgKzKSEDUBxEkHDDDTAFaOSgZXpmr3tdcPuEFf0bTt-qL2txLMXAu25Ja9a2ER7p0JUzxE1n-KnIUp1OSUDpf1PrLJJc/d/rsttlconvert4.jpg" /></a></div><p align="center"><br /></p>
</span>
Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-15087536976261423312009-04-06T14:24:00.003+03:002022-07-03T14:38:35.084+03:00IR remote control tester circuit<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="167" data-original-width="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw-ml7fIeAVG_6Vr66oUXhzIU5RiTeEabO7wwj0JlWwAHalc7uOyG8m2E5Ejd0WBieBbHWAKCFcO98XYEUTU4x-TBEMuWF6Z6MToSc0jdnFHc7MoW2HhcIVZ_4icn-EQ4r2u1pv8bqA80//" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
This is a simple and small circuit you can build in order to test infrared remote controls, coming from audio and video devices <i>(e.g. television, DVDs, VCRs and more)</i>. You can also use it to test devices which are using the famous IrDA protocol.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
Keep in mind that this tester can detect almost all
devices that use infrared radiation <i>(even devices which are
using IrDA protocol).</i><br />
The circuit has low sensitivity, so keep the remote control at a
close distance. That was done on purpose in order to keep
external interferences low.<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><br /><hr size="1" />
<ul><li>One 10K<span lang="el">Ω</span> resistor <i>(1/4 Watt)</i>.</li><li>Two 27MΩ resistors <i>(1/4 Watt)</i>.</li><li>One 1KΩ resistor <i>(1/4 Watt)</i>.</li><li>One transistor BC516.</li><li>One transistor BC547B.</li><li>A common red LED.</li><li>One 47nF capacitor.</li><li>A phototransistor like BPW40. You can use different types of
phototransistors without problems <i>(e.g. BPW41N, TK19 148 etc)</i>.</li><li>One on-off switch.</li><li>A battery holder for two AA batteries <i>(a battery holder with
pressure contacts is by far the best choice)</i>.</li><li>A small piece of a Veroboard</li><li>Wire for connections</li><li>Solder and soldering iron</li></ul>
<p>Also you will need two alkaline AA 1.5V batteries.</p><p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
Here is the schematic diagram of the IR remote control
tester.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1KewOZ40rNCCIJpdGCa2PAk0ov7N3cv9J89VczbQSluv6DpUjCgRRlzpmhizBKRorzq0VJzloELNc2mAYpsETRbLBWCCkLICqtkMlvg1Mtw0Za2a9f8hW8jfuiYH9urA8FTfqwmdnMDI/d/irtester.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="365" data-original-width="454" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1KewOZ40rNCCIJpdGCa2PAk0ov7N3cv9J89VczbQSluv6DpUjCgRRlzpmhizBKRorzq0VJzloELNc2mAYpsETRbLBWCCkLICqtkMlvg1Mtw0Za2a9f8hW8jfuiYH9urA8FTfqwmdnMDI/d/irtester.gif" /></a></div><p align="center"><br /></p>
<p><b>Attention:</b> To avoid external interferences <i>(ambient
noise) </i>the circuit is designed with low sensitivity. Keep
the remote control under test, as close to the phototransistor
<i>(ir receiver)</i> as possible.</p>
<h5> </h5>
<b><span style="font-family: "verdana"; font-size: 12pt;">Pictures</span></b><br /><hr size="1" />
In the following
pictures you see the IR tester, build on a small piece of Veroboard.
I glued the circuit on the battery holder.<p align="justify"> </p><table border="0" cellpadding="0" cellspacing="0" id="table1" style="border-collapse: collapse; width: 100%;">
<tbody><tr>
<td width="50%">
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKxtxKSzMNOOPrS1fPhh8P9jNNqVkdHjCaqocCj4JYNrxNIwyhw_kU1KesOCoQMZ_fDIhobSGiYA3CXOOAXmd-vsj1wHQ81dDAXgpglhcTF6Pn8IOCt2YCXRKtS2EBA273ThnhGX9geEE//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="168" data-original-width="209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKxtxKSzMNOOPrS1fPhh8P9jNNqVkdHjCaqocCj4JYNrxNIwyhw_kU1KesOCoQMZ_fDIhobSGiYA3CXOOAXmd-vsj1wHQ81dDAXgpglhcTF6Pn8IOCt2YCXRKtS2EBA273ThnhGX9geEE//" /></a></div><p align="center"><br /></p></td>
<td width="50%">
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRCbqxtUSWUE686SlYem2x4BOXzh5kcBcYx_QMuGoh8hGCPetdTGQEiGx9IUrEHJWf_Apna4090I0aqHCQQu7SXJ4bcavc8FGnMRsmzDoDEATE1c-9ULBduadhlIMvfTHMTmBDYdGO25g//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="172" data-original-width="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRCbqxtUSWUE686SlYem2x4BOXzh5kcBcYx_QMuGoh8hGCPetdTGQEiGx9IUrEHJWf_Apna4090I0aqHCQQu7SXJ4bcavc8FGnMRsmzDoDEATE1c-9ULBduadhlIMvfTHMTmBDYdGO25g//" /></a></div><p align="center"><br /></p>
<p> </p></td>
</tr>
<tr>
<td width="50%">
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_WX5GN8bCmIV3j1SO657cL2YlyT4dagiUvOqWwJC7P9_9Y0COFkryRoM9jxbmuYIZpDyTirDSVmMG0WyjA47tVISqvHIKmj5mnPSGLjQgdaLFQNQ4qFHXY_vKHGKqMxa3_dXcngHHRFA//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="169" data-original-width="215" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_WX5GN8bCmIV3j1SO657cL2YlyT4dagiUvOqWwJC7P9_9Y0COFkryRoM9jxbmuYIZpDyTirDSVmMG0WyjA47tVISqvHIKmj5mnPSGLjQgdaLFQNQ4qFHXY_vKHGKqMxa3_dXcngHHRFA//" /></a></div><p align="center"><br /></p></td>
<td width="50%">
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw-ml7fIeAVG_6Vr66oUXhzIU5RiTeEabO7wwj0JlWwAHalc7uOyG8m2E5Ejd0WBieBbHWAKCFcO98XYEUTU4x-TBEMuWF6Z6MToSc0jdnFHc7MoW2HhcIVZ_4icn-EQ4r2u1pv8bqA80//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="167" data-original-width="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw-ml7fIeAVG_6Vr66oUXhzIU5RiTeEabO7wwj0JlWwAHalc7uOyG8m2E5Ejd0WBieBbHWAKCFcO98XYEUTU4x-TBEMuWF6Z6MToSc0jdnFHc7MoW2HhcIVZ_4icn-EQ4r2u1pv8bqA80//" /></a></div><p align="center"><br /></p></td>
</tr>
</tbody></table><font face="Verdana" style="font-size: 10pt;">
</font><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrJnGWJmLVmp2_55Nh5aDX19yfz2tPa-PZamOAOW_mjVrpzJTmO0WQWXyCoJEBmQR-QJtdOjZFPbJ8KqvN8cD2N1aAxC8d6gV3gT6YL0DiBcBFOlUtSvUiGrSaB-63fGWxirMcsKtJgKo//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="120" data-original-width="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrJnGWJmLVmp2_55Nh5aDX19yfz2tPa-PZamOAOW_mjVrpzJTmO0WQWXyCoJEBmQR-QJtdOjZFPbJ8KqvN8cD2N1aAxC8d6gV3gT6YL0DiBcBFOlUtSvUiGrSaB-63fGWxirMcsKtJgKo//" /></a></div><p align="center"><br /></p><font face="Verdana" style="font-size: 10pt;">
<p>
You can use the circuit almost for every IR remote control, even for devices
that use the IrDA protocol like mobile phones <i>(cellphones)</i>.</p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht1KVvA0Uvv1bpgp2MAry0jfsZiuVbcpGpsM-mOKNtLyQMQGBhalGIGhwyDRUi3SLillWSwi5LNFw99F55FswKPJpY36oE9gX9Il4RpieHnMIj8KGuiSFXblxPPiFtAd7XmgoSYIv_0og//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="232" data-original-width="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht1KVvA0Uvv1bpgp2MAry0jfsZiuVbcpGpsM-mOKNtLyQMQGBhalGIGhwyDRUi3SLillWSwi5LNFw99F55FswKPJpY36oE9gX9Il4RpieHnMIj8KGuiSFXblxPPiFtAd7XmgoSYIv_0og//" /></a></div><p align="center"><br /></p>
</font>
</span>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-70768582248304012812008-11-12T15:08:00.008+02:002022-07-03T14:39:45.106+03:00In circuit AVR programmer (ISP)<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="189" data-original-width="236" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS6iL3WGuxfjr_5eFshiuOsnaK4n80p4hsbwEKyYuF-dIqBWwIICKG5nL8RMj_JcqsbJVuLZpzfEXfv4TRw6P3Y383PoBpXGXsAeJlT7xI8o2u0d3x4oFV9RGdA2xddbbRaAWCpY8pPt8/w200-h160/ispprogrammer1.jpg" width="200" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
Perhaps this circuit is the simplest AVR programmer you can build. Its great advantage is the ability to program almost any AVR microcontroller, without the need to remove it from the circuit in which is connected <i>(in circuit programming).</i>
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
Actually the circuit is a simplified version of the
older SIProg programmer. For more details read the article
<a href="https://dimitrispiperidis.blogspot.com/2005/04/siprog.html">A simple SI-Prog.</a><br />
<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><br /><hr size="1" />
<ul><li>Two Zener diodes at 5.1V <i>(low Watt)</i>.</li><li>One 10K<span lang="el">Ω</span> resistor <i>(1/4 Watt)</i>.</li><li>Two 4.7K<span lang="el">Ω </span>resistors <i>(1/4 Watt)</i>.</li><li>One 15K<span lang="el">Ω</span> resistor <i>(1/4 Watt)</i>.</li><li>One BC547 npn bipolar transistor.</li><li>A female 9 pin DSUB connector <i>(for PCB)</i>.</li><li>A female pin header <i>(5 pins. If you have one with more pins, just
cut it)</i>.</li><li>A small piece of a Veroboard.</li><li>Wire for connections.</li><li>Solder and soldering iron.</li></ul>
<p>You don't need any external power supply.</p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" /></span><div><span style="font-family: "verdana"; font-size: 10pt;">
Here is the schematic diagram of the In circuit AVR
programmer</span></div><div><span style="font-family: "verdana"; font-size: 10pt;"><br /></span></div><span style="font-family: "verdana"; font-size: 10pt;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL8iYqNMQsrEL167pDJrMew2DaubSiZJB4xYnmnoJzvMfRrvEl0qxf6Y9_AX06Xd5MQG1V56Dk1qOaRZ0EAlI6jdlon2LMX8TysC-S7WyDrOP8Yyahj03P1Y2PJRZI71zon-2wJVFwhS0/d/ispavrprog.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="368" data-original-width="603" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL8iYqNMQsrEL167pDJrMew2DaubSiZJB4xYnmnoJzvMfRrvEl0qxf6Y9_AX06Xd5MQG1V56Dk1qOaRZ0EAlI6jdlon2LMX8TysC-S7WyDrOP8Yyahj03P1Y2PJRZI71zon-2wJVFwhS0/d/ispavrprog.gif" /></a></div><p align="center"><br /></p>
<p><b>Attention:</b> In order this programmer to work, the
circuit in which the microcontroller is connected, must have a
10K<span lang="el">Ω</span><i> (or 4.7K<span lang="el">Ω</span>)</i><span lang="el">
</span>pull-up resistor on AVR's reset pin.<br />Generally we call pull-up
resistor any resistor connected between the power supply and one
of the I/O pins of the microcontroller. On the other hand pull-down resistor
is a resistor
connected between the I/O pin and the ground <i>(GND)</i>.</p>
<h5> </h5>
<b><span style="font-family: "verdana"; font-size: 12pt;">Settings</span></b><br /><hr size="1" />
In order to
succesfully program the microcotrollers, you will also need the appropriate
software. You can find a lot of free software compatible with
this circuit. However in this article, I will show you the
settings only for icprog <i> (<a href="http://www.ic-prog.com/">www.ic-prog.com</a>)</i>
and PonyProg<i> (<a href="http://www.lancos.com/prog.html">www.lancos.com/prog.html</a>)</i>.<br />
<br /></span><div><span style="font-family: "verdana"; font-size: 10pt;">For
ic-prog you can see the necessary settings in the following
picture</span></div><div><span style="font-family: "verdana"; font-size: 10pt;"><br /></span></div><span style="font-family: "verdana"; font-size: 10pt;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMPD2DLuYD6KlAIr9SVywSiEYnpC17N1F_D8xQ6erLNSMWMFTJLTKBI6PaUKGtOmleV0fA-XiXLredgBr0Nw1tFvPZezHFYd7V6TThUn_4-XzsJPjwepLS4XgJb3b_gVMUEueGQv29h8Q/d/icprogharware.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="304" data-original-width="363" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMPD2DLuYD6KlAIr9SVywSiEYnpC17N1F_D8xQ6erLNSMWMFTJLTKBI6PaUKGtOmleV0fA-XiXLredgBr0Nw1tFvPZezHFYd7V6TThUn_4-XzsJPjwepLS4XgJb3b_gVMUEueGQv29h8Q/d/icprogharware.jpg" /></a></div>
<p><font face="Verdana" style="font-size: 10pt;">If your computer
isn't fast enough, increase the I/O Delay. With a Pentium II 333MHz, I
didn't have any problems with the delay.<br /><b>Attention:</b> In order to
use the Direct I/O interface setting in Windows XP, you need to
download the appropriate driver from the icprog's website <i>
(<a href="http://www.ic-prog.com">www.ic-prog.com</a>)</i>.</font></p><p class="auto-style1">
For PonyProg the settings are just like the next picture</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ5_rcsBUWPysGQf-OjMKsZCAr5Mf3VPKGrgDUIlXqM_OS9v6M5zFzYtSfGCZz0vPVi1TPPLw_5VLt9NStslUIAEXu-XOrxAbNOXLWGhADYrdW-tHsXLjGy7Ye6nlmL6ETarVEJVbYOes//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="298" data-original-width="305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ5_rcsBUWPysGQf-OjMKsZCAr5Mf3VPKGrgDUIlXqM_OS9v6M5zFzYtSfGCZz0vPVi1TPPLw_5VLt9NStslUIAEXu-XOrxAbNOXLWGhADYrdW-tHsXLjGy7Ye6nlmL6ETarVEJVbYOes//" /></a></div><h5> </h5>
<b><span style="font-family: "verdana"; font-size: 12pt;">Pictures</span></b><br /><hr size="1" />
In the
following pictures you see the programmer build on a small piece
of a Veroboard <i>(StripBoard)</i>.<p align="center">
</p>
<table border="0" cellspacing="1" id="table1" style="border-collapse: collapse; width: 100%;">
<tbody><tr>
<td align="center" width="50%"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS6iL3WGuxfjr_5eFshiuOsnaK4n80p4hsbwEKyYuF-dIqBWwIICKG5nL8RMj_JcqsbJVuLZpzfEXfv4TRw6P3Y383PoBpXGXsAeJlT7xI8o2u0d3x4oFV9RGdA2xddbbRaAWCpY8pPt8/d/ispprogrammer1.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="189" data-original-width="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS6iL3WGuxfjr_5eFshiuOsnaK4n80p4hsbwEKyYuF-dIqBWwIICKG5nL8RMj_JcqsbJVuLZpzfEXfv4TRw6P3Y383PoBpXGXsAeJlT7xI8o2u0d3x4oFV9RGdA2xddbbRaAWCpY8pPt8/d/ispprogrammer1.jpg" /></a></td>
<td align="center" width="50%"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPAV_VoTAbWFKIkVo3kJDXzZmF9cCQJwISDTVv0TmUomxUjZx4KHEiCEj090OyUdY2I2VSTRw5d8Vpc7hfE8jkbTtDAgY7Wel1uPfso1E4DKwz6wmVwLKKbEg8JIxL5jxiP8KoZ_Um3Q0//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="149" data-original-width="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPAV_VoTAbWFKIkVo3kJDXzZmF9cCQJwISDTVv0TmUomxUjZx4KHEiCEj090OyUdY2I2VSTRw5d8Vpc7hfE8jkbTtDAgY7Wel1uPfso1E4DKwz6wmVwLKKbEg8JIxL5jxiP8KoZ_Um3Q0//" /></a></td></tr></tbody></table>
</span> Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-86516101550076741052008-01-09T12:24:00.003+02:002022-07-03T14:40:19.928+03:00PIC16F876/3 adaptor for the simple PIC programmer<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="162" data-original-width="103" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj023LT5InKv40BcW7S4pg-ESQToWAR4vI59_EfVMm0duF-_Lai08X5aiQr3gNCSfNht21BMTrJuuNasqz9Ms_GVoek96kC3LvPHnm_eBVwyLb0Aw8SKriM6-FLIrCulPobNCuIjbFrXFI/d/picprogad3.jpg" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
This adaptor extends the possibilities of the <a href="https://dimitrispiperidis.blogspot.com/2008/01/PICProg.html">simple PIC programmer</a>, to be able to program PIC micros like PIC16F876, PIC16F876A, PIC16F873 and PIC16F873A. Simply connect it to the main board.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
Read the notes written in the <a href="https://dimitrispiperidis.blogspot.com/2008/01/PICProg.html">simple PIC programmer</a>
article.<br />Remember not to connect any microcontroller on the
main board when you're using this adaptor. Connect the supported
micros directly on the adaptor.<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><br /><hr size="1" />
<ul><li>First build the <a href="https://dimitrispiperidis.blogspot.com/2008/01/PICProg.html">simple PIC programmer</a>.</li><li>A 28 pin DIP socket <i>(for the PIC16F84 type of micros)</i>.</li><li>Female pin header <i>(5 pins. If you have one with more pins, just
cut it)</i>.</li><li>A small piece of a Veroboard.</li><li>Wire for connections.</li><li>Solder and soldering iron.</li></ul><p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
Here is the schematic diagram of the adaptor<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvN1gsjEGDyn6sNOB3LLd2txdj9G9TycihXIeBU1nl2upEPEPr4sx_dwYqg6uhE286xKwlaeEv1Spn1bATHqT7TnHw-XWR75Vgx7sx7OgGJ-zeD6IgpoSpiOYX4vcr4112_b0hCm2E0lE/d/pic16f876_sch.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="357" data-original-width="345" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvN1gsjEGDyn6sNOB3LLd2txdj9G9TycihXIeBU1nl2upEPEPr4sx_dwYqg6uhE286xKwlaeEv1Spn1bATHqT7TnHw-XWR75Vgx7sx7OgGJ-zeD6IgpoSpiOYX4vcr4112_b0hCm2E0lE/d/pic16f876_sch.gif" /></a></div><p align="center"><br /></p>
<p><b>Attention:</b> Read the notes and required settings in the
<a href="https://dimitrispiperidis.blogspot.com/2008/01/PICProg.html"> </a><a>simple PIC programmer</a> article. Do
not connect any micro on the main board when you're using the
adaptor.</p><h5> </h5>
<b><span style="font-family: "verdana"; font-size: 12pt;">Pictures</span></b><br /><hr size="1" />
In the following pictures you see the adaptor, build on a small piece of Veroboard.<p align="justify"> </p><table border="0" cellpadding="0" cellspacing="0" id="table2" style="border-collapse: collapse; width: 100%;">
<tbody><tr>
<td width="50%">
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL_DU0GAC97cch_rzHPqcl9I4jwmQM-RBjMkRVQXSnpMNOmgoX7-ADbFE6JP9XSjonvoOj3oOdt0InhyphenhyphensRs4LMPKTzsQgzWz3r4p5_4P8efN7hlMEDjg7UgX1Ku1PJ1k9xGQ19KZ08Kyw//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="83" data-original-width="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL_DU0GAC97cch_rzHPqcl9I4jwmQM-RBjMkRVQXSnpMNOmgoX7-ADbFE6JP9XSjonvoOj3oOdt0InhyphenhyphensRs4LMPKTzsQgzWz3r4p5_4P8efN7hlMEDjg7UgX1Ku1PJ1k9xGQ19KZ08Kyw//" /></a></div><p align="center"><br /></p></td>
<td width="50%">
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqOdLtMnPBoDc0JKZKoMw-oqdNdj2ygIBBrI_yONdQ_1pGWMHL2zlrz6B54_xewRO6xcAYrjwdfZEgMQvtAhrPqUzkwalW_NCE0v9_r-KNExvVppFQM5b2O0VeDUiFrdxeynhZOyP_joc//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="127" data-original-width="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqOdLtMnPBoDc0JKZKoMw-oqdNdj2ygIBBrI_yONdQ_1pGWMHL2zlrz6B54_xewRO6xcAYrjwdfZEgMQvtAhrPqUzkwalW_NCE0v9_r-KNExvVppFQM5b2O0VeDUiFrdxeynhZOyP_joc//" /></a></div><p align="center"><br /></p></td>
</tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj023LT5InKv40BcW7S4pg-ESQToWAR4vI59_EfVMm0duF-_Lai08X5aiQr3gNCSfNht21BMTrJuuNasqz9Ms_GVoek96kC3LvPHnm_eBVwyLb0Aw8SKriM6-FLIrCulPobNCuIjbFrXFI//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="162" data-original-width="103" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj023LT5InKv40BcW7S4pg-ESQToWAR4vI59_EfVMm0duF-_Lai08X5aiQr3gNCSfNht21BMTrJuuNasqz9Ms_GVoek96kC3LvPHnm_eBVwyLb0Aw8SKriM6-FLIrCulPobNCuIjbFrXFI/d/picprogad3.jpg" /></a></div><p align="center"><br /></p>
<p>
Here, you see the adaptor connected to the main board</p>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkXAbj91zUz9JTmpljm2odBS2rIp1e0F8eY4D0RlayPmcE1LddC0S7g-dwnCC7tjwDrQefseXq7jer3dDqLLZewQ4hyphenhyphenZKUTCS76gi2SIR9JHw5cZxVbTuxR38CLInPOnDRE4_SAzFKUG8//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="192" data-original-width="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkXAbj91zUz9JTmpljm2odBS2rIp1e0F8eY4D0RlayPmcE1LddC0S7g-dwnCC7tjwDrQefseXq7jer3dDqLLZewQ4hyphenhyphenZKUTCS76gi2SIR9JHw5cZxVbTuxR38CLInPOnDRE4_SAzFKUG8//" /></a></div><p align="center"><br /></p>
</span>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-1215163537251665382008-01-09T12:06:00.010+02:002022-07-03T14:41:42.005+03:00A simple programmer for PIC microcontrollers<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="163" data-original-width="342" height="95" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9e2wpIW05ElVx1KksVFWX77wWGXU-4KATIXSOnGnmREHIOQqlNZ1nkgJVS8ArvIpTA6jSGB7Z9wgZsXVHfO6mhUspLzd8_oMbODR6XQM-SsewesoVWCabYJOXLft-WxAWvqUNJC6TvqU/w200-h95/picprogfront.jpg" width="200" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
Perhaps this circuit is the simplest programmer for PIC microcontrollers you can build. It is connected to serial port of your PC and it has a very similar design with the SI-Prog programmer for the AVR microcontrollers. With the help of adaptors you can extend the possibilities and program more PIC microcontrollers.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE REST ARTICLE HERE-->
By default this programmer supports the micros:
PIC16C8x, PIC16F8x <i>(PIC16F83, PIC16F84, PIC16F84A),</i>
PIC16F62x <i>(PIC16F627, PIC16F627A PIC16F628, PIC16F628A)</i>,
PIC16F648A, PIC16F716 and generally any PIC microcontroller
which has the same pinout, with the very well known PIC16F84.
However, with the help of the adaptor, you will be able to
program almost any PIC micro that supports the ICSP programming
technique.<br />Keep in mind that the programmer is not
supporting low voltage programming. So you must always leave the MCLR fuse selected.<br />USB to serial converters will not work
with this programmer. Your motherboard must have build in serial
ports. If it doesn't then you can use PCI serial cards <i>(for
one serial port the cost is low)</i>.<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><br /><hr size="1" />
<ul><li>Two Zener diodes at 5.1V <i>(low Watt)</i>.</li><li>One 10K<span lang="el">Ω</span> resistor <i>(1/4 Watt)</i>.</li><li>Two 4.7K<span lang="el">Ω </span>resistors <i>(1/4 Watt)</i>.</li><li>One 100<span lang="el">μ</span>F electrolytic capacitor <i>(16
Volts)</i>.</li><li>One 100nF capacitor</li><li>One 7805 voltage regulator <i>(you don't need any cooler)</i>.</li><li>One 1N4001 common diode.</li><li>One resistor of 270 Ohms <i>(1/4 Watt)</i>.</li><li>One common green LED.</li><li>A 18 pin DIP socket <i>(for the PIC16F84 type of micros)</i>.</li><li>A female 9 pin DSUB connector <i>(for PCB)</i>.</li><li>Male pin header <i>(5 pins. If you have one with more pins, just
cut it)</i>.</li><li>One power jack.</li><li>A small piece of a Veroboard.</li><li>Wire for connections.</li><li>Solder and soldering iron.</li></ul>
<p>Also you will need a stabilized 9V or 12V external power
supply. A 9 Volt alkaline battery is the perfect choice.</p><p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
Here is the schematic diagram of the simple programmer
for PIC microcontrollers <i>(click on the picture to enlarge)</i>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GN00BPGDTNVlc1-3oAQEvwkCZw6ta9Np_7C6fXc6lcoVkC_8pcqOjW_6lZPvYnPLgaSRn3cRkiznA9-7CPQnV-xSnfD0rY3BhhI2oglSEGR3DZYLTik6DSuCZmSps0N7MS2DIVmXYFE/d/picsiprog_schematic.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="547" data-original-width="639" height="342" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GN00BPGDTNVlc1-3oAQEvwkCZw6ta9Np_7C6fXc6lcoVkC_8pcqOjW_6lZPvYnPLgaSRn3cRkiznA9-7CPQnV-xSnfD0rY3BhhI2oglSEGR3DZYLTik6DSuCZmSps0N7MS2DIVmXYFE/w400-h342/picsiprog_schematic.gif" width="400" /></a></div>
<p><b>Attention:</b> As we said earlier this programmer doesn't
support low voltage programming. So keep the MCLR fuse always
selected <i>(read the settings section)</i>.<br />Make sure
your serial port is capable to generate the necessary
programming voltage <i>(about 11 - 14V)</i> at pin 3 <i>(TxD -
Transmit Data)</i>. This is important to get into programming
mode. Although, in most cases <i>(over 90%)</i>, you will not
have any problems.<br />You can program more PIC microcontrollers with
the adaptor. See how you can program PIC16F876, PIC16F876A,
PIC16F873, PIC16F873A micros by building the
<a href="https://dimitrispiperidis.blogspot.com/2008/01/PICProgad.html">PIC16F876/3
adaptor</a>.</p>
<h5> </h5>
<b><span style="font-family: "verdana"; font-size: 12pt;">Settings</span></b><br /><hr size="1" /></span><div><span style="font-family: "verdana"; font-size: 10pt;">
In order to
work with this programmer you need also the appropriate
software. You can find a large number of free software you can
use. However here, I will discuss the settings only for icprog
programmer<i> (<a href="http://www.ic-prog.com/">www.ic-prog.com</a>)</i>.</span></div><div><br /><span style="font-family: "verdana"; font-size: 10pt;"><span style="font-family: "verdana"; font-size: 10pt;"></span></span></div><div><span style="font-family: "verdana"; font-size: 10pt;"><span style="font-family: "verdana"; font-size: 10pt;"></span></span></div><span style="font-family: "verdana"; font-size: 10pt;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUHV5wqEcd2sogSzdGSl7HY2SV2kvLgBIT_0m3W7S1cniUeUbgM86jBDgWLHZasNbo6KjxYvX73ok5OHcLbAAu3YgW-S32C7jrGFqWsST7h91TH8xCErzSwHt0uZVwgazKRrzH2r5ia74/d/icprogharware.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="304" data-original-width="363" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUHV5wqEcd2sogSzdGSl7HY2SV2kvLgBIT_0m3W7S1cniUeUbgM86jBDgWLHZasNbo6KjxYvX73ok5OHcLbAAu3YgW-S32C7jrGFqWsST7h91TH8xCErzSwHt0uZVwgazKRrzH2r5ia74/d/icprogharware.jpg" /></a></div><span style="font-family: "verdana"; font-size: 10pt;"><br />
<p><font face="Verdana" style="font-size: 10pt;">If your computer
isn't fast enough increase I/O Delay. With a Pentium II 333MHz I
didn't have any problems with the delay even when set at 1.<br /><b>Attention:</b> In order to
use Direct I/O in Windows XP, you need to download the
appropriate driver from the same source you downloaded icprog <i>
(<a href="http://www.ic-prog.com">www.ic-prog.com</a>)</i>.</font></p><p>
<font face="Verdana" style="font-size: 10pt;">Don't forget to
leave the MCLR fuse bit selected, like in the following picture</font></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1v2RfqW0Tyk69fLD67iTqs_nL6y7T4Syvj507-f4ukqGXdGFYsBPP7IvuTaqxV48mPl87GDcDX2Safw1AFP3KNQ6NENnEgxJN0o39mTNQMDsd_u9oEmHWR_9kJ9eleAHVQ1OdzepYms0//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="344" data-original-width="482" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1v2RfqW0Tyk69fLD67iTqs_nL6y7T4Syvj507-f4ukqGXdGFYsBPP7IvuTaqxV48mPl87GDcDX2Safw1AFP3KNQ6NENnEgxJN0o39mTNQMDsd_u9oEmHWR_9kJ9eleAHVQ1OdzepYms0/d/icprogMCLR.gif" /></a></div><p>Also
uncheck the LVP fuse bit <i>(but this is not so critical)</i>.</p><h5> </h5>
<b><span style="font-family: "verdana"; font-size: 12pt;">Pictures</span></b><br /><hr size="1" /></span></span><div style="text-align: left;"><span style="font-family: "verdana"; font-size: 10pt;">
In the following pictures you see the programmer build on small piece
of a Veroboard.<p><br /></p></span><div style="text-align: center;"><span style="font-family: "verdana"; font-size: 10pt;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9e2wpIW05ElVx1KksVFWX77wWGXU-4KATIXSOnGnmREHIOQqlNZ1nkgJVS8ArvIpTA6jSGB7Z9wgZsXVHfO6mhUspLzd8_oMbODR6XQM-SsewesoVWCabYJOXLft-WxAWvqUNJC6TvqU/d/picprogfront.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="163" data-original-width="342" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9e2wpIW05ElVx1KksVFWX77wWGXU-4KATIXSOnGnmREHIOQqlNZ1nkgJVS8ArvIpTA6jSGB7Z9wgZsXVHfO6mhUspLzd8_oMbODR6XQM-SsewesoVWCabYJOXLft-WxAWvqUNJC6TvqU/d/picprogfront.jpg" /></a>
</span></div></div><span style="font-family: "verdana"; font-size: 10pt;"><table border="0" bordercolor="#111111" cellspacing="1" id="table1" style="border-collapse: collapse;">
<tbody><tr>
<td align="center" width="50%">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWB3LE-Uz5dWiB4rLYBLNptW4VciOYW6W1OcbxePPKMb1NcRLa1Dxo-wHY0MZp-wsZ5kUPNI4EHIpwnDtFXalNERafrU76933Owc-5i6uQ9hUKQtvJk-ziGma-LwDIWRU1X4hxhhl0OCI//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="192" data-original-width="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWB3LE-Uz5dWiB4rLYBLNptW4VciOYW6W1OcbxePPKMb1NcRLa1Dxo-wHY0MZp-wsZ5kUPNI4EHIpwnDtFXalNERafrU76933Owc-5i6uQ9hUKQtvJk-ziGma-LwDIWRU1X4hxhhl0OCI//" /></a></td>
<td align="center" width="50%">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6NCfbzzT22g_nNQ50OzOdijqUnjQSI65O9M9ThCs73ykxe43PdEBRaKcYO37WRwiNanUnveHh-ZH6JLQ-0XQ39dmVBtB4FydLYOgcrycLEx79QuiBi-nG5SHrLXcx3LzMsNeI-c9QMRo//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="125" data-original-width="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6NCfbzzT22g_nNQ50OzOdijqUnjQSI65O9M9ThCs73ykxe43PdEBRaKcYO37WRwiNanUnveHh-ZH6JLQ-0XQ39dmVBtB4FydLYOgcrycLEx79QuiBi-nG5SHrLXcx3LzMsNeI-c9QMRo//" /></a></td>
</tr>
<tr>
<td align="center" width="50%">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOv8fkOW8Qkxh8ryubaQVfszu_YfQoYuqPBOKFneBXwT92HjzYnVR47oGZE-doG1lHtJjM0TYwyAITv57gEXssVZnXqcOh8WDAtb8QsFmvTmKn4iOQpuM-OHIPZgvygJ0JwOf3kFw9xLs//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="165" data-original-width="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOv8fkOW8Qkxh8ryubaQVfszu_YfQoYuqPBOKFneBXwT92HjzYnVR47oGZE-doG1lHtJjM0TYwyAITv57gEXssVZnXqcOh8WDAtb8QsFmvTmKn4iOQpuM-OHIPZgvygJ0JwOf3kFw9xLs//" /></a></td>
<td align="center" width="50%">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWMsE32BHjVdFJDoL89jl4aH8GNUR0n59NicGS43ABgWskdhiLzJS7krMuZlFoV8ql-D7v1g40egFOR0X46uPM77Siz1VYzshuseJbUkFge8bEqlgyRwaL7qWJO2mGisZT7QgNswsiD5c//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="192" data-original-width="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWMsE32BHjVdFJDoL89jl4aH8GNUR0n59NicGS43ABgWskdhiLzJS7krMuZlFoV8ql-D7v1g40egFOR0X46uPM77Siz1VYzshuseJbUkFge8bEqlgyRwaL7qWJO2mGisZT7QgNswsiD5c//" /></a></td>
</tr>
</tbody></table>
</span>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-2646551680130174532007-07-06T10:22:00.004+03:002022-07-03T14:42:16.664+03:00Simple pulse generator with accurate frequency 1Hz<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="558" data-original-width="518" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNQ7-dpbRQ7g6QOgokQEzxyduiekCOGIVaFtlrN7vbyWdfYOj8psopPnNi5K8DAnzAMjl9tg_Cfb_bY65SEke5Cg8MFq4pXW3p2l-_tiy_xn75ZLy49tIdBFFQORNyM2D2jU-PlxFKLXA/w186-h200/OneHzgen.gif" width="186" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
This circuit is ideal for clocks and anything that has to do with time measurement. The output pulse comes every one second with great accuracy <i>(without being affected by environmental interferences or time)</i>. Its accuracy is based on a quartz crystal oscillator, which guaranties that your clock will not desynchronize.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE REST ARTICLE HERE-->
The piezoelectric crystal is the most critical component and may hard
to find. You must use only the one I suggest. In any other case, the
output won't have the exact frequency of 1Hz. If you want different
frequencies we can get the pulse signal from the other output of 4521
CMOS chip. <br /><p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><br /><hr size="1" />
<ul><li>One CMOS 4521 Chip.</li><li>A 1MΩ resistor <i>(1/4 Watt)</i>.</li><li>One 3.9KΩ resistor <i>(1/4 Watt)</i>.</li><li>One 22pF capacitor.</li><li>One 82pF capacitor.</li><li>One piezoelectric crystal 4,194,304Hz. Crystal's frequency is
critical. If you use a different crystal, you will not have the
exactly 1Hz output frequency.</li><li>A 16 pin DIP socket <i>(for the 4521 CMOS chip)</i>.</li><li>A small piece of a Veroboard</li><li>Wire for connections</li><li>Solder and soldering iron</li></ul>
<p>Also you will need a stabilized 5 Volt external power supply.
You can use a 4.5 Volt battery or even a 9 Volt battery. Be aware
that with the 9Volt battery the output level will be also at 9
Volt <i>(not TTL logic)</i>.</p><p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
Here is the schematic diagram of the simple 1Hz accurate
pulse generator.<p align="center">
<font face="Verdana" style="font-size: 10pt;">
<br /></font></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNQ7-dpbRQ7g6QOgokQEzxyduiekCOGIVaFtlrN7vbyWdfYOj8psopPnNi5K8DAnzAMjl9tg_Cfb_bY65SEke5Cg8MFq4pXW3p2l-_tiy_xn75ZLy49tIdBFFQORNyM2D2jU-PlxFKLXA/d/OneHzgen.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="558" data-original-width="518" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNQ7-dpbRQ7g6QOgokQEzxyduiekCOGIVaFtlrN7vbyWdfYOj8psopPnNi5K8DAnzAMjl9tg_Cfb_bY65SEke5Cg8MFq4pXW3p2l-_tiy_xn75ZLy49tIdBFFQORNyM2D2jU-PlxFKLXA/d/OneHzgen.gif" /></a></div><p></p>
<p><b>Attention:</b> The piezoelectric crystal is the most
critical component and may hard to find. The circuit can be
powered by a various range of different voltages, from 5 to 15
Volts. Keep in mind that the output level depends on the power
supply.</p>
</span> Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-34459926937572563162005-11-18T13:55:00.009+02:002022-07-03T14:43:23.602+03:00R/2R ladder DAC<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="262" data-original-width="322" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq96k4W20_SRCVa9uL2174D0T6HiWdhWPlqxrzbFRgrLzwVnPaiK2RuY_I2g7R6yUbgq-Q9zn8zA_F0vUJ6fqe-bIrzjijTG6hmsvEtTNUHiVnIzYgbPdLzcZ6oGMkv1WXou7lDq_dH4s/w200-h163/dacmodule.jpg" width="200" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
This is a famous digital to analog converter that uses a resistor ladder network in order to convert the signal from digital to analog. It has 8bit resolution, but you can easily increase it, if you follow the pattern. The circuit is very reliable and it doesn't require a lot of time to build it.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
The DAC has 8bit resolution, which means will convert
any digital information with the length of one byte.<br />Normally,
R/2R ladder network has no bandwidth limitations. However,
bandwidth is limited due to the necessary output buffer. This
reduces the speed of the DAC.<br />
Accessory bandwidth limitation is coming from the low slew rate
of the OPAMP<i>, </i>because we are dealing with a large
signals. In the circuit presented here I used LM358.<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><br /><hr size="1" />
<ul><li>Nine 20K<span lang="el">Ω</span> resistors <i>(1/4 Watt)</i>.</li><li>Eight 10K<span lang="el">Ω </span>resistors <i>(1/4 Watt)</i>.</li><li>One LM358 OPAMP<i>.</i></li><li>A 8 pin DIP socket <i>(for the LM358 chip)</i>.</li><li>Female pin headers for the digital inputs, the output and the
power supply.</li><li>A small piece of a Veroboard.</li><li>Wire for connections.</li><li>Solder and soldering iron.</li></ul>
<p>Also you will need a stabilized 5 Volt external power supply <i>
(or even 3.3Volts)</i>.
It's better to use higher volts <i>(e.g. 6 Volts or a 9 Volt
battery)</i> to avoid saturation effects.</p>
<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
Here is the schematic diagram of the R/2R ladder DAC <i>
(click on the picture to enlarge)</i>.<p align="center">
<font face="Verdana" style="font-size: 10pt;">
<br /></font></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-csPvaZuTVcSPdEblcZuo0cKTyOzI7irGSicQHtKJiBteyLDqo9RNIcclo7Ev6PAlN7KgLoLsJlYHbwOmKIzz1tqpcVVshypj8CalIrkG1y005leOClQmsaLA6v07BmXsRu-HaxtLNUI/d/Dac_schematic.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="489" data-original-width="1188" height="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-csPvaZuTVcSPdEblcZuo0cKTyOzI7irGSicQHtKJiBteyLDqo9RNIcclo7Ev6PAlN7KgLoLsJlYHbwOmKIzz1tqpcVVshypj8CalIrkG1y005leOClQmsaLA6v07BmXsRu-HaxtLNUI/w640-h263/Dac_schematic.gif" width="640" /></a></div>
<p align="justify"><b>Attention:</b> Vin is the power supply. It's better to be
higher than 5 Volts <i>(e.g. 9 Volts from a battery)</i>, in
order to avoid saturation effects. I chose the LM358 OPAMP
because it can behave quite well close to zero<i> (meaning there
is now saturation with an input close to zero volts)</i>.
However, you can use whatever OPAMP you want, in order to achieve
the desirable performance.</p>
<h5> </h5>
<b><span style="font-family: "verdana"; font-size: 12pt;">Pictures</span></b><br /><hr size="1" /></span><div><span style="font-family: "verdana"; font-size: 10pt;">
In the following picture you see the circuit already build on
a small piece of a Veroboard. It is designed to fit perfectly to
<a href="https://dimitrispiperidis.blogspot.com/2004/12/bs2boe.html">Basic Stamp's 2 programming board</a>.</span></div><div><span style="font-family: "verdana"; font-size: 10pt;"><br /></span></div><span style="font-family: "verdana"; font-size: 10pt;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq96k4W20_SRCVa9uL2174D0T6HiWdhWPlqxrzbFRgrLzwVnPaiK2RuY_I2g7R6yUbgq-Q9zn8zA_F0vUJ6fqe-bIrzjijTG6hmsvEtTNUHiVnIzYgbPdLzcZ6oGMkv1WXou7lDq_dH4s//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="262" data-original-width="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq96k4W20_SRCVa9uL2174D0T6HiWdhWPlqxrzbFRgrLzwVnPaiK2RuY_I2g7R6yUbgq-Q9zn8zA_F0vUJ6fqe-bIrzjijTG6hmsvEtTNUHiVnIzYgbPdLzcZ6oGMkv1WXou7lDq_dH4s/d/dacmodule.jpg" /></a></div><p align="center"><br /></p>
</span>
Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-39094552285830653252005-09-20T13:45:00.030+03:002022-07-08T09:39:57.370+03:00Serial ADC for BS2<table border="0" cellpadding="5" cellspacing="0" style="width: 100%px;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!-- ENTER MAIN ARTICLE PICTURE HERE -->
<div class="separator" style="clear: both;"><img alt="" border="0" height="123" width="99" data-original-height="396" data-original-width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcEr8EZcQ7M-9t3c0tOjTVe6jjM8SdAfmorlzsRHaHpbg_su3v2yhWORG1Cx-zZcbVCas-VNe5x5Ik5inFhXzHfoCn-fKlLY3wcxW7SDNdsb0xjxeOeonDzqhDt9PLILe0I78_7VIrDj1DAqeRq6MhHKe7nCfHo1F5cAdRi5h7OjKTPLx0Is00tDeW/s320/ADC0831sch.gif"/></div>
</div>
</td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!-- WRITE PREVIEW HERE -->
Connect National's Semiconductors serial analog to digital converter ADC0831 to Basic Stamp 2 and digitize your analog data. The required program couldn't be simpler <i>(literally only 3 commands)</i>.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
<!-- WRITE REST ARTICLE HERE -->
There are many implementations of analog to digital converters. However none of them can be compared to simplicity with this. We need only three available ports from Basic stamp 2.
<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><br /><hr size="1" />
<ul> <li>One ADC0831 chip <i>(8bit serial A/D Converter)</i>.</li>
<li>One 1M<span lang="el">Ω</span> trimmer.</li>
<li>One Basic stamp 2.</li>
<li>Basic's stamp programming board <i>(You can buy it or make it by
your own: <a href="https://dimitrispiperidis.blogspot.com/2004/12/bs2boe.html">DIY BS2 board</a>).</i></li>
<li>Wires for the connections.</li></ul>
<p>Also you will need a stabilized 9 Volt external
power supply <i>(a 9Volt alkaline battery is the best choice)</i>.</p>
<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
There is no schematic. Just connect the components on
the BS2 board's breadboard like the following picture.<p align="center">
<img alt="" border="0" height="320" data-original-height="396" data-original-width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcEr8EZcQ7M-9t3c0tOjTVe6jjM8SdAfmorlzsRHaHpbg_su3v2yhWORG1Cx-zZcbVCas-VNe5x5Ik5inFhXzHfoCn-fKlLY3wcxW7SDNdsb0xjxeOeonDzqhDt9PLILe0I78_7VIrDj1DAqeRq6MhHKe7nCfHo1F5cAdRi5h7OjKTPLx0Is00tDeW/s320/ADC0831sch.gif"/></p>
<p><b>Attention:</b> The 1M<span lang="el">Ω
</span>trimmer you see in the picture is actually not necessary.
We only use it for demonstration purposes <i>(to generate the
analog voltage we want to convert)</i>. Instead of the trimmer
you can apply the analog voltage, you want to convert, directly
to pin 2 of the ADC0831 IC <i>(referenced to the ground Vss)</i>.</p>
<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">The program</span></b><br /><hr size="1" />
The program is the definition of simplicity. We reed the
converted data <i>(meaning the digitized analog voltage)</i>
with only one SHIFTIN command. Before that we enable the
chip bys setting the appropriate port to low (in our case port
P2). After the SHIFTIN command we set P2 high again.<blockquote>
<blockquote>
<blockquote>
<p><b><font face="Courier New" style="font-size: 10pt">
<font color="#0000FF">LOW</font> 2 <font color="#008000">
' Enable ADC0831</font><br>
<font color="#0000FF">SHIFTIN</font> 0,1,<font color="#CC0099">MSBPOST</font>,[ADResult\9]
<font color="#008000">' Read the data</font><br>
<font color="#0000FF">HIGH</font> 2
<font color="#008000">' Disable ADC0831</font></font></b></p>
</blockquote>
</blockquote>
</blockquote>
<p>ADResult is the byte where the digitized voltage will be
saved.</p>
<p>I wrote a simple program to demonstrate this.
<div class="code">
<font color="#008000">'{$STAMP BS2}<br>
'{$PBASIC 2.5}</font>
<br><br>
CS CON 2 <font color="#008000">' Chip Select</font><br>
D0 CON 0 <font color="#008000">' Data Output</font><br>
CLK CON 1 <font color="#008000">' Clock</font><br><br>
<font color="#008000">' Variable to store the result of the ADC (8 bit)</font><br>
ADResult VAR Byte<br><br>
<font color="#0000FF">HIGH</font> CS <font color="#008000">' Disable ADC0831</font><br>
<font color="#0000FF">DEBUG</font> <font color="#CC0099">CLS</font><br><br>
Main:<br>
<font color="#0000FF">DEBUG</font><font color="#CC0099"> HOME</font>,<font color="#FF0000">" "</font><br>
<font color="#0000FF">GOSUB</font> ADC0831<br>
<font color="#0000FF">DEBUG</font> <font color="#CC0099">HOME</font>,DEC ADResult<br>
<font color="#0000FF">GOTO</font> Main<br><p><br /></p>
<font color="#008000">'---- [ Subroutine ] -------------------------</font><br>
ADC0831:<br>
<font color="#0000FF">LOW</font> CS <font color="#008000">' Enable ADC0831</font><br>
<font color="#0000FF">SHIFTIN</font> D0,CLK,<font color="#CC0099">MSBPOST</font>,[ADResult\9] <font color="#008000">' Read reasult</font><br>
<font color="#0000FF">HIGH</font> CS <font color="#008000">' Disable ADC0831</font><br>
<font color="#0000FF">RETURN</font><br>
</div>
</span>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-29289059854469479102005-07-30T13:43:00.003+03:002022-07-03T14:43:49.160+03:00Voltage to current converter (V-I converter)<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="382" data-original-width="364" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBG-LsYeyuLwUSSeCtmxm1zYo9D7FcUeg2p_oJO8gJ0K9BBUl2DW2q7kVU6rRqX3K8KPdfSFwqk2seGivv3yPFZb50HxgoOpiFLJXStduS0EIG4LfCrM6Eg4FRC8n14-qT9-5KKOfFZGI/w191-h200/VoltToCurrent.gif" width="191" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
This circuit is one of the simplest voltage to current converters to drive low loads. In this example a small 0,25 Watts speaker, with 8Ω resistance, is driven. It is suitable for microcontroller designs or any other circuit that uses PWM <i>(TTL logic)</i>. You can use it for analog signals as well.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
The circuit is not amplifying the input voltage signal
<i>(use a preamp if it is necessary)</i>. For analog signals is
better to use a power supply higher than the maximum voltage of
the input signal, to avoid saturation effects. For digital
signals it is not necessary.<br />The equation applied to this
circuit is <b>I =<sup> Vin</sup>/<sub>R</sub></b> <i>(where R is
22 Ohms, and I the current at the transistor's emitter)</i>.<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
Here is the schematic diagram of the voltage to current
converter.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBG-LsYeyuLwUSSeCtmxm1zYo9D7FcUeg2p_oJO8gJ0K9BBUl2DW2q7kVU6rRqX3K8KPdfSFwqk2seGivv3yPFZb50HxgoOpiFLJXStduS0EIG4LfCrM6Eg4FRC8n14-qT9-5KKOfFZGI/d/VoltToCurrent.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="382" data-original-width="364" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBG-LsYeyuLwUSSeCtmxm1zYo9D7FcUeg2p_oJO8gJ0K9BBUl2DW2q7kVU6rRqX3K8KPdfSFwqk2seGivv3yPFZb50HxgoOpiFLJXStduS0EIG4LfCrM6Eg4FRC8n14-qT9-5KKOfFZGI/d/VoltToCurrent.gif" /></a></div><p align="center"><br /></p>
<p><b>Attention:</b> Vcc is the power supply <i>(5 or 9 Volts)</i>.
You can also use a 4.5 Volt battery. Do not use a 22 Ohm<span lang="el">
1/4</span> Watt resistor. Use a 0.<span lang="el">5</span> Watt resistor instead.</p>
</span>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-81072202308444050622005-06-26T12:56:00.008+03:002022-07-03T14:45:04.912+03:00Stereo amplifier with KIA6210AH<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="226" data-original-width="292" height="155" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI3Ci_R0Ljc6reTc64K8udfQ14c7MuenxFi8SUKtiKuEX5CfJOx4mx4XDLfv41rwzBhumcTtOFUwkDT6mhYuEzXjRWMIVo7ko6PEUP8duceITKg6EH4NmpWxvSG0NAv_YDGDh7a6fvSWU/w200-h155/kia6210.jpg" width="200" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
This is a HiFi stereo amplifier based on KIA6210AH dual audio power amplifier chip, with output power 2x22 Watts <i>(this is the circuit's true output power and not the sound power. As you can see is fairly high)</i>. KIA6210AH chip is not hard to find. Personally, I dig it out from an old car cassette player.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE REST ARTICLE HERE-->
KIA6210AH is a 2x22W stereo power amp, with 50dB gain
and 4<span lang="el">Ω </span>output resistance. The output
power is 22 Watt only when the power supply is 14.4 Volts. If
power supply is 13.2V the output power is 19W <i>(for each
channel).</i> At 12Volts the total drain current is
approximately 3.67 Amps <i>(1.8A for each channel)</i>. You need a power source capable of
giving this current.<br />Don't forget to use a cooler for KIA6210AH
or else you will destroy the chip.<br />For normal operation leave the mute cable
unconnected <i>(free to air)</i>. Alternatively connect it to
the power supply.<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><br /><hr size="1" />
<ul><li>One KIA6210AH dual audio power amplifier.</li><li>One 100K<span lang="el">Ω </span>resistor <i>(1/4 Watt)</i>.</li><li>One 68K<span lang="el">Ω </span>resistor <i>(1/4 Watt)</i>.</li><li>Four 2.2 Ohm resistors <i>(1/4 Watt)</i>.</li><li>Two 470 Ohm resistors <i>(1/4 Watt)</i>.</li><li>Two 1nF capacitors.</li><li>Four 150nF capacitors <i>(or close values)</i>.</li><li>Two 47<span lang="el">μ</span>F electrolytic capacitors <i>(16
Volts)</i>.</li><li>Two 4.7<span lang="el">μ</span>F electrolytic capacitors <i>(50
Volts or higher)</i>.</li><li>One 220<span lang="el">μ</span>F electrolytic capacitor <i>(16
Volts)</i>.</li><li>One 2200<span lang="el">μ</span>F electrolytic capacitor <i>(16
Volts)</i>. </li><li>Two speakers <i>(22 Watt, 4<span lang="el">Ω</span> Resistance)</i>.</li><li>An aluminum cooler for KIA6210AH <i>(I didn't make calculations
for the appropriate size. If you use a large one, you will not have
any problems)</i>.</li><li>Two female RCA connectors <i>(for the input signals)</i>.</li><li>A Veroboard <i>(or a PCB but I don't include a layout. Make your
own)</i>.</li><li>Wire for connections</li><li>Solder and soldering iron</li></ul>
<p>Also you will need a stabilized high current 12 Volt external
power supply<i> (3 Amps or more)</i>.</p>
<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
Here is the schematic diagram of the KIA6210AH stereo
amplifier <i>(click on the picture to
enlarge)</i>.<p align="center">
<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOIcdLLURvJQqNBYPFG0PN7cDx0kcJQ3yI2etZqbsxHFS1L8nBk5k4cBPvduXNlu6RpVL5R-6XrI24FftqfQLrbzKGgDFQSGDb3HYQk16jSK-vQYge9PPhB2e3ZLMA5k92JuEy8pITXLM/d/kia6210schematic.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="608" data-original-width="673" height="361" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOIcdLLURvJQqNBYPFG0PN7cDx0kcJQ3yI2etZqbsxHFS1L8nBk5k4cBPvduXNlu6RpVL5R-6XrI24FftqfQLrbzKGgDFQSGDb3HYQk16jSK-vQYge9PPhB2e3ZLMA5k92JuEy8pITXLM/w400-h361/kia6210schematic.gif" width="400" /></a></div>
<p align="justify"><b>Attention:</b> The power supply must be between 12 and
14.4 Volts. The power on signal is generating by the voltage
divider <i>(100K<span lang="el">Ω </span>and 88K<span lang="el">Ω</span>
resistors)</i>. This must be approximately 3 Volts when it is
connected with KIA6210AH chip <i>(pin 4)</i>.<br />According to the
constructor company, you can ignore the two feedback 470<span lang="el">Ω
</span>resistors. With out them, the gain is 50dB <i>(maximum)</i>.
According to the same source, if you use the 470<span lang="el">Ω
</span>feedback resistors <i>(like I did)</i>, the gain becomes
40dB and the two input capacitors must be 3.3<span lang="el">μ</span>F<span lang="el">.</span>
Also the two feedback electrolytic capacitors must be 33<span lang="el">μ</span>F.
As you can see in the schematic I used 4.7<span lang="el">μ</span>F
and 47<span lang="el">μ</span>F electrolytic capacitors instead.
This is not causing any problems. However, if you like you can
change them to what the constrictor suggests.<br />Make sure you
solder the two 1nF capacitors <i>(at both inputs)</i> as close
to KIA6210AH as possible.</p>
<h5> </h5>
<b><span style="font-family: "verdana"; font-size: 12pt;">Pictures</span></b><br /><hr size="1" />
In the following pictures you see the amplifier connected on
a breadboard <i>(for tests only).</i><br />Here is how I connected the chip.
You can also see that I used a large aluminum cooler.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI3Ci_R0Ljc6reTc64K8udfQ14c7MuenxFi8SUKtiKuEX5CfJOx4mx4XDLfv41rwzBhumcTtOFUwkDT6mhYuEzXjRWMIVo7ko6PEUP8duceITKg6EH4NmpWxvSG0NAv_YDGDh7a6fvSWU//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="226" data-original-width="292" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI3Ci_R0Ljc6reTc64K8udfQ14c7MuenxFi8SUKtiKuEX5CfJOx4mx4XDLfv41rwzBhumcTtOFUwkDT6mhYuEzXjRWMIVo7ko6PEUP8duceITKg6EH4NmpWxvSG0NAv_YDGDh7a6fvSWU/d/kia6210.jpg" /></a></div><p align="center"><br /></p>
<p align="justify"><font face="Verdana" style="font-size: 10pt;">And here is the
whole circuit, with the speakers included.</font></p>
<table border="0" cellpadding="0" cellspacing="0" id="table1" style="border-collapse: collapse; width: 100%;">
<tbody><tr>
<td width="50%">
<p align="center">
<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyOmYxiUNHo9VTMycBy7PZgPRTiGt369If0_lo1BLIaIPSmzgLi3YzfHZJZ8T5ZCCMLHeBtjMW-zViaQfrrNhpNTYl76ut-ExUNVeR9Yw-ygjKHCq70uKpDqfIVlSC4eK-d-YDvNYVdAc//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="158" data-original-width="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyOmYxiUNHo9VTMycBy7PZgPRTiGt369If0_lo1BLIaIPSmzgLi3YzfHZJZ8T5ZCCMLHeBtjMW-zViaQfrrNhpNTYl76ut-ExUNVeR9Yw-ygjKHCq70uKpDqfIVlSC4eK-d-YDvNYVdAc//" /></a></div><br /></td>
<td width="50%">
<p align="center">
<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRhp7R5LN7tugOwQsU6XswFTbIUo0kPJ7GsDRJRJX6RgGk-wD-IFT4UOLg02WkyPnD3znxV7ZiBdSX2Zr63EEEp0YQTd3UxePdd8Zz3IlNueGgvnmF0jiUu29aBSCjg5eYmlptYejS2N4//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="158" data-original-width="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRhp7R5LN7tugOwQsU6XswFTbIUo0kPJ7GsDRJRJX6RgGk-wD-IFT4UOLg02WkyPnD3znxV7ZiBdSX2Zr63EEEp0YQTd3UxePdd8Zz3IlNueGgvnmF0jiUu29aBSCjg5eYmlptYejS2N4//" /></a></div><br /></td>
</tr>
</tbody></table>
<p align="justify">
<font face="Verdana" style="font-size: 10pt;">This is the circuit from
a closer look.</font></p>
<p align="center">
<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCBgA-wMXVBQQFUowpPrf_haBZp1My2AxicHsfksaRV8TF2zNQPMWvgfOP2Y_Y8-Atvuyp0XJOA_XvTdrrbL11fPbSGuiJeIDJqRjv5lwpppgh7zouqzhV51cbrpceCvdOkdD0g8o0B10//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="226" data-original-width="292" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCBgA-wMXVBQQFUowpPrf_haBZp1My2AxicHsfksaRV8TF2zNQPMWvgfOP2Y_Y8-Atvuyp0XJOA_XvTdrrbL11fPbSGuiJeIDJqRjv5lwpppgh7zouqzhV51cbrpceCvdOkdD0g8o0B10//" /></a></div>
<p align="justify">
<font face="Verdana" style="font-size: 10pt;">In this picture you see
the mute cable <i>(the red unconnected wire at the left)</i>. When
you connect it to ground, the amplifier is muted. At normal
operation just leave it unconnected <i>(free to air).</i>
Alternatively connect it to the power supply <i>(12 Volts)</i>.</font></p>
<p align="center">
<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYZuEqfOEGGwfFaVIdhsYSPQid5nz-S0u1AGPrGFbMfMGGF8B7tiaA6ahf9GtuvkD3m4CwScEauYFumjRj8YYRavVN6hyphenhyphenZ6rAkmIgDw0VjLgkpKVZghaT3TEv8LNQKRxPMcihkQOW9fiI//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="226" data-original-width="292" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYZuEqfOEGGwfFaVIdhsYSPQid5nz-S0u1AGPrGFbMfMGGF8B7tiaA6ahf9GtuvkD3m4CwScEauYFumjRj8YYRavVN6hyphenhyphenZ6rAkmIgDw0VjLgkpKVZghaT3TEv8LNQKRxPMcihkQOW9fiI//" /></a></div>
</span>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-49268553086305765312005-04-25T09:49:00.004+03:002022-07-03T14:46:15.330+03:00A simple SI-Prog<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="778" data-original-width="881" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoE6tCOatmbaDxNErp8A0UVLc8AJCMjZl5cXDrdXaQo8F3F5ObzIYcRiHrp4NUDH1BUDqVfTpo9rrlYxdgXEx_73HfcbvJIJUi5EyxSptK44Benia3-pQY1R51JvFUNKfcVWWS3ZrqtDU/w200-h176/siprog_schematic.gif" width="200" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
With the following circuit you can easily program the AVR microcontrollers AT90S1200, AT90S2313 <i>(or ATtiny2313)</i>, AT90S8515 and AT90S4414, using the freeware programmer PonyProg by Claudio Lanconelli. You can download the program for free from the author's website <i>(<a href="www.lancos.com/prog.html">www.lancos.com/prog.html</a>)</i>.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE REST ARTICLE HERE--> </span><span style="font-family: "verdana"; font-size: 10pt;">The simple SI-Prog is actually a simplification of the
more complicated programmer designed by Claudio Lanconelli,
which is supporting a large number of programmable devices.<br />Visit
the author's site for more details: <a href="http://www.lancos.com/siprogsch.html">http://www.lancos.com/siprogsch.html</a><p align="center">
<br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><br /><hr size="1" />
<ul><li>Two 10K<span lang="el">Ω</span> resistors <i>(1/4 Watt)</i>.</li><li>One 15K<span lang="el">Ω </span>resistor <i>(1/4 Watt)</i>.</li><li>Two 4.5K<span lang="el">Ω </span>resistors <i>(1/4 Watt)</i>.</li><li>Two 27pF capacitors<i> (ceramic)</i>.</li><li>Two Zener diodes at 5.1V <i>(low Watt)</i>.</li><li>One 1N4001 common diode.</li><li>One BJT transistor BC547.</li><li>One common 7805 voltage regulator<i> (you don't need any cooler)</i>.</li><li>One 4MHz piezoelectric crystal.</li><li>A 20 pin DIP socket.</li><li>A 40 pin DIP socket.</li><li>A female 9 pin DSUB connector <i>(for PCB)</i>.</li><li>Male pin header <i>(6 pins. If you have one with more pins, just
cut it)</i>.</li><li>One power jack <i>(for PCB)</i>.</li><li>A small piece of a Veroboard.</li><li>Wire for connections.</li><li>Solder and soldering iron.</li></ul>
<p>Also you will need a stabilized 9V or 12V external power
supply. A 9 Volt alkaline battery is the perfect choice.</p><p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
Here is the schematic diagram of the simple SI-Prog <i>(click on the picture to enlarge)</i><p align="center">
<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoE6tCOatmbaDxNErp8A0UVLc8AJCMjZl5cXDrdXaQo8F3F5ObzIYcRiHrp4NUDH1BUDqVfTpo9rrlYxdgXEx_73HfcbvJIJUi5EyxSptK44Benia3-pQY1R51JvFUNKfcVWWS3ZrqtDU/d/siprog_schematic.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="778" data-original-width="881" height="352" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoE6tCOatmbaDxNErp8A0UVLc8AJCMjZl5cXDrdXaQo8F3F5ObzIYcRiHrp4NUDH1BUDqVfTpo9rrlYxdgXEx_73HfcbvJIJUi5EyxSptK44Benia3-pQY1R51JvFUNKfcVWWS3ZrqtDU/w400-h352/siprog_schematic.gif" width="400" /></a></div>
<p><b>Attention:</b> The circuit includes an adaptor to extend
the number of the supported AVR microcontrollers. Simply connect
each pin of the adaptor to the appropriate pins of the
microcontroller <i>(MISO pin of the adaptor with MISO I/O of the
microcontroller, etc)</i> without using additional
components.<br />Remember to connect a piezoelectric crystal <i>
(usually 4, 8 or 10MHz)</i> to the XTAL pins of the microcontroller or the programming procedure
will fail. <b>Note:</b> With the newer AVR micros that
include an internal crystal, you don't need the additional
piezoelectric crystal. If this is the case, you simply connect
the adaptor with the appropriate pins of the microcontroller and
you are ready to program!</p>
<h5> </h5>
<b><span style="font-family: "verdana"; font-size: 12pt;">Pictures</span></b><br /><hr size="1" /></span><div><span style="font-family: "verdana"; font-size: 10pt;">
<font face="Verdana" style="font-size: 10pt;">In the
following picture you see the programmer build on small piece
of a Veroboard.</font></span></div><div><span style="font-family: "verdana"; font-size: 10pt;"><font face="Verdana" style="font-size: 10pt;"><br /></font></span></div><div><span style="font-family: "verdana"; font-size: 10pt;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxooyXCTlUtde2EuHVSm7wnlrjE4tgx2c0TP4z3qabfp-T_U11yvBKJrvQXtiE0ch-DsszLN22vmbs-BwrVF0_K09ivItq3X_1G6TSgbC9VPTHCHxE5bdAW4XqV1mS85UMiRcude_pA_Q//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="177" data-original-width="209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxooyXCTlUtde2EuHVSm7wnlrjE4tgx2c0TP4z3qabfp-T_U11yvBKJrvQXtiE0ch-DsszLN22vmbs-BwrVF0_K09ivItq3X_1G6TSgbC9VPTHCHxE5bdAW4XqV1mS85UMiRcude_pA_Q/d/siprog.jpg" /></a></div><font face="Verdana" style="font-size: 10pt;"><br /></font><span style="font-family: "verdana"; font-size: 10pt;">
</span></span></div>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-44723634224622504442005-01-09T23:16:00.011+02:002022-07-03T14:46:59.171+03:00Sound detection circuit with variable sensitivity<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="341" data-original-width="556" height="123" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwSqtGplqk5kZnwdD-joQxqtnaqIrjMMc7mc_oqKMFO-dYyQ79OtmUZpU9iJHD6cIKbgyzlPe3ESHUJ_gLvjWo-bqwGk2MvhJO10lr1CnNicsDO9NVYYBWZhfpdrYAGIkGt-TnAKnvacA/w200-h123/micamp.png" width="200" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
This is a simple circuit that can detect sounds by using a common condenser microphone. Sensitivity is variable . The circuit's output becomes High each time a sound is detected, otherwise it is in low level. You can use it in simple robots for sound responding <i>(e.g. reaction -> when you clap your hands)</i>. This circuit recognize human voice as a common sound <i>(you can't use it for voice recognition)</i>.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE REST ARTICLE HERE-->
The circuit is very simple and has totally 3 stages:<ul><li>The microphone stage.</li><li>The amplification stage.</li><li>The comparator stage.</li></ul>
<p>The microphone stage captures the sound and converts it to
electrical signal. The amplification stage amplifies the signal
and the comparator changes the output level if the amplified
signal is higher from the reference voltage.</p><p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><br /><hr size="1" />
<ul><li>A condenser microphone <i>(like the common microphones for PCs).</i></li><li>Four 4.7ΚΩ resistors <i>(1/4 Watt)</i>.</li><li>One 100nF capacitor.</li><li>One BC 337 transistor.</li><li>The OPAMP LM358.</li><li>One 1ΜΩ pot</li><li>A 8 pin DIP socket <i>(for the LM358 chip)</i>. </li><li>A small piece of a Veroboard</li><li>Wire for connections</li><li>Solder and soldering iron</li></ul>
<p>Also you will need a stabilized 5 Volt external power supply.
You can use a 4.5 Volt battery or even a 9 Volt battery. Be aware
that with the 9 Volt battery the output level will be also at 9
Volt <i>(not TTL logic)</i>.</p>
<p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
Here is the schematic diagram of the simple sound
detector with variable sensitivity <i>(click on the picture to
enlarge)</i>.<p align="center">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwSqtGplqk5kZnwdD-joQxqtnaqIrjMMc7mc_oqKMFO-dYyQ79OtmUZpU9iJHD6cIKbgyzlPe3ESHUJ_gLvjWo-bqwGk2MvhJO10lr1CnNicsDO9NVYYBWZhfpdrYAGIkGt-TnAKnvacA/d/micamp.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="341" data-original-width="556" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwSqtGplqk5kZnwdD-joQxqtnaqIrjMMc7mc_oqKMFO-dYyQ79OtmUZpU9iJHD6cIKbgyzlPe3ESHUJ_gLvjWo-bqwGk2MvhJO10lr1CnNicsDO9NVYYBWZhfpdrYAGIkGt-TnAKnvacA/d/micamp.png" /></a></p>
<p><b>Attention:</b> Vdd is the power supply <i>(5 or 9 Volts)</i>. You
can also use a 4.5 Volt battery. You adjust the sensitivity by
turning the pot. The circuit can be extremely sensitive and can
detect low sounds or even whispers.</p>
</span> Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0tag:blogger.com,1999:blog-158306582761846329.post-7050362315687380142004-12-21T09:22:00.009+02:002022-07-03T14:47:39.801+03:00BS2 programming board (board of education)<table border="0" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody>
<tr><td><div class="separator" style="clear: both; text-align: center;">
<!--ENTER MAIN ARTICLE PICTURE HERE-->
<img border="0" data-original-height="163" data-original-width="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcMtwIEBW5o_WB67sd-e38NLqNUtPOxcZnRbaoIjPRprl2qusJr2wtK7YOH8M49U3R6HSjBucqmN8CEQmiWMmdH3fC5iZvgv6krqGxMf7qlcbuAheFl1ygdL-l32AYgUrYOb7jYn3oRtM//" />
</div>
<br /></td><td>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE PREVIEW HERE-->
Build your own low cost Basic Stamp II board of education by parallax. The "trick" here is to buy the OEM version of Basic Stamp 2 from parallax <i>(Basic Stamp 2 interpreter chip DIP)</i>. This will keep the cost very low but there's a catch. You must be able to solder electronic components on a Veroboard <i>(StripBoard)</i>.
</span></div>
<br />
</td></tr>
</tbody></table>
<a name='more'></a>
<b><span style="font-family: "verdana"; font-size: 12pt;">Details</span></b><br /><hr size="1" />
<span style="font-family: "verdana"; font-size: 10pt;">
<!--WRITE REST ARTICLE HERE-->
You can buy a complete programming board for basic stamp
2 from parallax<i> (<a href="http://www.parallax.com">www.parallax.com</a>)</i>,
but the cost is little bit high especially if you don't live in
United States.<p align="center">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcMtwIEBW5o_WB67sd-e38NLqNUtPOxcZnRbaoIjPRprl2qusJr2wtK7YOH8M49U3R6HSjBucqmN8CEQmiWMmdH3fC5iZvgv6krqGxMf7qlcbuAheFl1ygdL-l32AYgUrYOb7jYn3oRtM/d/Board_Of_Education.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="163" data-original-width="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcMtwIEBW5o_WB67sd-e38NLqNUtPOxcZnRbaoIjPRprl2qusJr2wtK7YOH8M49U3R6HSjBucqmN8CEQmiWMmdH3fC5iZvgv6krqGxMf7qlcbuAheFl1ygdL-l32AYgUrYOb7jYn3oRtM/d/Board_Of_Education.jpg" /></a></p>
<p>In this article we will create our board from common and
cheap electronic components. The only thing you have to buy from
parallax is Basic Stamp 2 interpreter chip <i>(DIP)</i>. The
cost of this chip is about 17$ <i>(at least at the time this
article was written).</i> So you save more than 50$.</p><p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Components</span></b><br /><hr size="1" />
<ul><li>One basic Stamp 2 interpreter chip <i>(DIP)</i>.</li><li>One 20MHz piezoelectric crystal.</li><li>One 24C16 memory chip <i>(I2C)</i>.</li><li>Two 1000<span lang="el">μ</span>F electrolytic capacitors <i>(16
Volts)</i>.</li><li>Four 4.7K<span lang="el">Ω</span> resistors <i>(1/4 Watt)</i>.</li><li>Eight 10K<span lang="el">Ω</span> resistors <i>(1/4 Watt)</i>.</li><li>Two 1nF capacitors.</li><li>Two 100nF capacitors.</li><li>Two BC547 npn transistros.</li><li>One BC557 pnp transistor.</li><li>One LM2940 LDO voltage regulator <i>(with the appropriate cooler, if
you plan to drag more than 500mA)</i>.</li><li>One green common LED.</li><li>One ALPS button <i>(a digital push button. Not switch) </i>for a
manual reset feature.</li><li>One power jack.</li><li>Two single row female pin headers (one with 16 pins<i> and one
with 13. If you have headers with more pins, just cut them).</i></li><li>One female double row pin header with 20 pins totally <i>(If you
have a header with more pins, just cut it)</i>.</li><li>One small breadboard <i>(optional)</i>.</li><li>A female 9 pin DSUB connector <i>(for PCB)</i>.</li><li>A 28 pin DIP socket<i> (for the microcontroller)</i>.</li><li>A 8 pin DIP socket<i> (for the memory chip)</i>.</li><li>A Veroboard <i>- StripBoard (or a PCB but I don't include a layout. Make your
own)</i>.</li><li>Wire for connections</li><li>Solder and soldering iron</li></ul>
<p>Also you will need a stabilized 12V, 9 Volt or even a 6Volt external
power supply, due to the low dropout voltage regulator <i>(a 9Volt alkaline battery will do just fine).</i></p><p><i><br /></i></p><p><br /></p>
<b><span style="font-family: "verdana"; font-size: 12pt;">Schematic Diagram</span></b><br /><hr size="1" />
Here is the schematic diagram of the BS2 programming
board <i>(click on the picture to
enlarge)</i>.<p align="center">
<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX-y0vMHyU0MvBZjtqhnILVPIZ7_TrEUmCup-4FF1DO-jUwgt-c-4hnI_437h2VD05RVOKp3xuIpkxX8LJRKQ2J2ZkTJcG3HGHCMbEPQGgozJjMgXCXT9sdDmmXol3mR4cOTGJWZEQ5mU/d/Bs2Board.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="898" data-original-width="1546" height="372" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX-y0vMHyU0MvBZjtqhnILVPIZ7_TrEUmCup-4FF1DO-jUwgt-c-4hnI_437h2VD05RVOKp3xuIpkxX8LJRKQ2J2ZkTJcG3HGHCMbEPQGgozJjMgXCXT9sdDmmXol3mR4cOTGJWZEQ5mU/w640-h372/Bs2Board.gif" width="640" /></a></div>
<p align="justify"><b>Attention:</b> Even if this is not shown
on the schematic, it's very wise to place a 100nF capacitor near
the power pins <i>(pin 2 and 4)</i> of PIC16C57C IC <i>(with the
emended basic stamp 2 interpreter)</i>. This will improve the
power's supply behavior when you use medium or high frequency
pulses <i>(or other signals)</i>.</p>
<h5> </h5>
<b><span style="font-family: "verdana"; font-size: 12pt;">Pictures</span></b><br /><hr size="1" />
In the following picture you see the completed board<i>.</i>
I didn't use the optional breadboard. Also I used a switch and a
9Volt battery holder instead of a power jack. The two male pin
headers<i> with 90<sup>o</sup> angle (3 pins each)</i> are there
in order to connect standard RC servos.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzQblFSZ7HH-Si_GdQZK1ROhYSEY-BeICy_0BPhxGnne-itkQBPQuGFoFQJqHEX1Snoq9dRyhANS0KhTznB92vrz2zWSttQwSnIxt5gni2BHWBXTWrOdgOJuIsV4hheZVETiRCXeUan14//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="284" data-original-width="287" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzQblFSZ7HH-Si_GdQZK1ROhYSEY-BeICy_0BPhxGnne-itkQBPQuGFoFQJqHEX1Snoq9dRyhANS0KhTznB92vrz2zWSttQwSnIxt5gni2BHWBXTWrOdgOJuIsV4hheZVETiRCXeUan14/d/Bs2Board2.jpg" /></a></div><p align="center"><br /></p>
<p align="justify"><font face="Verdana" style="font-size: 10pt;">And here is a
interesting use of the board. For this small robot I used two continuous
rotation servos from parallax</font></p><p align="justify"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFD0Quz5snzjS40ENktY3dCASxNIm71WFW4rygLIWgkTY9LY17Riucy0A-u6A1Lw53YhzU6pQcYoUW6KB56_ghbggfwGRhj1i9V_DTIStyNveNePRKCFA2hYpqD11ecAVdxBAWOKgMtfE//" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="285" data-original-width="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFD0Quz5snzjS40ENktY3dCASxNIm71WFW4rygLIWgkTY9LY17Riucy0A-u6A1Lw53YhzU6pQcYoUW6KB56_ghbggfwGRhj1i9V_DTIStyNveNePRKCFA2hYpqD11ecAVdxBAWOKgMtfE/s320/bs2board_robot.jpg" width="320" /></a></div><font face="Verdana" style="font-size: 10pt;"></font><p></p>
<span style="font-family: "verdana"; font-size: 10pt;">
</span></span>Dimitris Piperidishttp://www.blogger.com/profile/02371941437614814726noreply@blogger.com0