<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-3030619748984253626</atom:id><lastBuildDate>Thu, 16 Feb 2012 10:47:30 +0000</lastBuildDate><category>charger mk2 nokia lph7779 display board pcb finished</category><category>uMAX DIP adapter converter</category><category>leather</category><category>water heater thermostat temperature control ds1821</category><category>boards</category><category>fonera 1wire onewire hub interface</category><category>remote control rf radio switch lights attiny13 avr</category><category>home server power supply ATX 12v power d945gsejt</category><category>usbasp usb avr isp programmer system</category><category>capacitor esr inductor coil meter avr lcd</category><category>tft lcd monitor repair WSOD white screen</category><category>glass bottle cutting resistance heating wire</category><category>chrome</category><category>restore</category><category>audio</category><category>mouse</category><category>pda</category><category>surface-mount</category><category>printer</category><category>browser</category><category>laptop sla lead acid vrla boost step-up converter</category><category>lpt</category><category>water pipe heating avr atmega microcontroller</category><category>power supply</category><category>keyboard</category><category>zipit</category><category>repair</category><category>charger mk1 SLA lead acid vrla charger uc2906</category><category>compaq</category><category>driver</category><category>fonera 1wire onewire lcd interface</category><category>amplifier amp</category><category>nokia 770 maemo alternative window manager Qt antico</category><category>evo</category><category>soldering</category><category>boost step-up converter usb liion 5v</category><category>micro-switch</category><category>dock</category><category>usb</category><category>hardware repair lto ultrium soldering quartz</category><category>relay</category><category>random</category><category>eee car charger SLA LDO switching regulator</category><category>customize</category><category>sata power switch hdd</category><category>PSU</category><category>charger mk2 measure voltage current display bohttp://www.blogger.com/img/blank.gifard pcb</category><category>ATX</category><category>gui</category><category>SLA lead acid vrla overdischarge undervoltage protector saver detector</category><category>diy speaker housing woodworking</category><category>mouse trackball hacking ps2 pinout</category><category>cabl</category><category>ui</category><category>ds1821 heating thermostat programmer</category><category>water pipe heating avr attiny ds1821</category><category>mikmod</category><category>charger mk2 5v step down board</category><category>software</category><category>chromium</category><category>seiko</category><category>zipit2</category><category>fonera 1wire ibutton onewire ds2480 microlan</category><category>hot air</category><category>ir remote control attiny avr hack</category><category>charger mk2 nokia lph7779 display board pcb</category><category>14pin</category><category>label</category><title>Karosium</title><description>DIY Projects, Hardware modding</description><link>http://www.karosium.com/</link><managingEditor>noreply@blogger.com (Viktor)</managingEditor><generator>Blogger</generator><openSearch:totalResults>62</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Karosium" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="karosium" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-6860429925343452374</guid><pubDate>Wed, 19 Oct 2011 10:48:00 +0000</pubDate><atom:updated>2011-10-24T08:38:58.347-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">hardware repair lto ultrium soldering quartz</category><title>Repair: HP Ultrium2 Drive</title><description>Being the digital hoarder that I am I routinely end up with several hundred gigabytes I no longer actively need but don't want to just delete. The options when it comes to modern day large volume data archival are limited. The more straightforward choices are HDD, BluRay or DVDs. None of those are really reliable in the long run. The recoding layer in optical media deteriorates too fast and HDDs are generally unreliable if left idle for extended periods of time. So a good long time ago I bought an ancient DAT drive which I used for about a year then upgraded to an Ultrium1. Usually these enterprise grade backup devices are crazy expensive when released, then 5-10 years later they're within my budget :) The hard part is finding one that hasn't been used to death in some server-farm somewhere. Rarely drives bought as spares then never used go up on eBay which can turn out to be a killer deal, but otherwise It's basically a lottery. My first Ultrium1 drive did have some use in it, but nothing serious. I was happy enough with it and now have about 1TB archived all in all on LTO-1 tapes (they're 100GB per tape). About a week ago while browsing eBay I found an LTO-2 drive for $55+international shipping (which was $56, heh..) so I bought it.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-msmkTOjyzBU/TqU6pf0E1kI/AAAAAAAAAls/98rn0uY3mYU/s1600/lto2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 230px;" src="http://1.bp.blogspot.com/-msmkTOjyzBU/TqU6pf0E1kI/AAAAAAAAAls/98rn0uY3mYU/s400/lto2.jpg" alt="" id="BLOGGER_PHOTO_ID_5667000190704604738" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The drive is an HP C7379 double-height drive. (My LTO-1 was a single height).&lt;br /&gt;Now I assumed that the double-height drives are more robust mechanically and more reliable electronically because I took apart the single-height drive a few times and things are really cramped in there which I went ahead and blamed some of the stability issues on that I had with it over the years (without any real evidence).&lt;br /&gt;&lt;br /&gt;So the new drive arrives and I put it in my archival machine for testing. I insert the first cartridge and even before the insertion process is complete the Tape Error LED starts flashing. Not good!&lt;br /&gt;&lt;br /&gt;I proceeded to do a cleaning run, but the Tape Error came up for the Cleaning Tape as well. Hrmm..&lt;br /&gt;&lt;br /&gt;My first assumption was that the CM (Cartridge Memory, an RFID-like wireless EEPROM inside every LTO cartridge) is not being read properly because the LED started flashing even before the spooling sequence begun. The drive didn't even open the cartridge door to take out the leader pin before the error came up. (The way Ultrium works is basically the cartridges have a single roll of tape in them the end of which is glued onto a metal pin. The drive physically pulls the metal pin along with the tape out of the cartridge and starts spooling the tape onto an internal drum. In contrast with VCR where you have two drums inside the cartridge, in Ultrium one of the drums is in the drive.)&lt;br /&gt;&lt;br /&gt;So basically since the tape never even touched the heads when I got the errors, and there was no apparent mechanical failure during the load sequence, the CM reader became the prime suspect.&lt;br /&gt;&lt;br /&gt;Thankfully double-height drives are much more serviceable than the single-heights. The CM reader module is a separate daughter-board labeled Philips FCMWP PCA. (WP stands for Write-protect since this board also connects to the optical gate and mechanical arm responsible for detecting write protection.)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-zOHRqAdmUyc/TqU7FnymqyI/AAAAAAAAAl4/yMxU8h1i-_4/s1600/cm_reader.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/-zOHRqAdmUyc/TqU7FnymqyI/AAAAAAAAAl4/yMxU8h1i-_4/s400/cm_reader.jpg" alt="" id="BLOGGER_PHOTO_ID_5667000673882254114" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;So I took the board out and began to troubleshoot it. I was planning to capture the SPI communication to get a better picture of what's going on, but since I didn't have a 3.3v micro to do it and I was too lazy to bother with level shifting I decided to try other things that while more invasive I had the tools on hand for.&lt;br /&gt;I desoldered the CM reader chip LTRCC10. This chip is a black-box. No information about it seems to be available anywhere. Actually that could be said for most Ultrium drive hardware. The only worthwhile material is the HP Ultrium Technical Reference Manual (google CRCM2161 to CRCM2167). Anyway, I traced the pins on said chip and the daughter-board to some extent.&lt;br /&gt;The SPI stuff should be correct, the rest could be totally wrong, but maybe it'll be of some use to someone:&lt;br /&gt;&lt;br /&gt;LTRCC10: (Pin numbering as silkscreening on the daugtherboard. (Pin1 ----- Pin16))&lt;br /&gt;1: GND, 2: RF, 3: 5V Vcc, 4: RF, 5: GND, 6: XTAL1, 7: GND(? double-check), 8: XTAL2,&lt;br /&gt;9: SPI Clock, 10: SPI In,11: SPI Out, 12: SPI Chip Select, 13: GND, 14: RF, 15: RF, 16: GND&lt;br /&gt;I had no interest in the RF pins so whatever pins connected to the passives associated with RF I just labeled as such. If you want to build a CM reader with this chip you'll have to investigate them on your own, but you'll need a working drive anyway to reverse engineer the SPI protocol.&lt;br /&gt;The LTRCC10 works at 3.3v SPI despite the 5V Vcc. Not sure if it would tolerate 5V SPI.&lt;br /&gt;&lt;br /&gt;Daughterboard header :&lt;br /&gt;1: Optogate Common?, 2: Onboard Optogate, 3: Write-protect Optogate, 4: 5v (CM Reader VCC and Optogate VCC), 5: EEPROM SPI Chip Select, 6: SPI In, 7: SPI Out, 8: GND, 9: SPI Clock, 10: CM Reader SPI Chip Select, 11: 3.3v (EEPROM Vcc)&lt;br /&gt;&lt;br /&gt;The drive didn't really seem to be affected by the absence of the CM reader chip and continued to produce the exact same symptoms. I also tried disconnecting the EEPROM, which made the drive unable to boot up.&lt;br /&gt;&lt;br /&gt;So I soldered both of the chips back in, then hooked up the reader board to my good LTO-1 drive's SPI bus, since it had the same LTRCC10 CM reader chip. I wanted to see if it produces any RF activity when it receives the correct read command. I cobbled together a radio detector (based on &lt;a href="http://www.radiorampage.com/techpages/fsmeter.php"&gt;this&lt;/a&gt;) using a germanium transistor (as a diode), a 1nF capacitor and a +-50uA analog panel meter.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-RdzHdp7FQTE/TqU7aUYKXhI/AAAAAAAAAmE/QnFUDEihErk/s1600/fsm.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 388px;" src="http://3.bp.blogspot.com/-RdzHdp7FQTE/TqU7aUYKXhI/AAAAAAAAAmE/QnFUDEihErk/s400/fsm.jpg" alt="" id="BLOGGER_PHOTO_ID_5667001029448326674" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This test concluded that the reader chip did "something" at least, however the drive still failed to read CM. I assumed the reader chip was not the cause of the problem and left it alone.&lt;br /&gt;&lt;br /&gt;At this point the only things left on the daughter board were the various passives that I tested with a multimeter for the most part and a 13.56Mhz quartz.&lt;br /&gt;The operating frequency for the CM reader should be 13.56Mhz according to &lt;a href="http://ebookbrowse.com/lto-cm-13-56-mhz-pdf-d86298002"&gt;this document&lt;/a&gt;. I did a few insertion tests while lightly holding the quartz and managed to get the tape loaded without an error twice. This confirmed that the quartz was bad.&lt;br /&gt;&lt;br /&gt;I had no 13.56Mhz quartz (suitable or otherwise) on hand so I tried the closest value I got which was 12Mhz. The difference of 1560Khz is way out of the +/- 7 Khz tolerance in the spec but... It seems to work just fine. I don't get any tape errors and it reads the cartridge name from the CM correctly. Unless it starts acting up during testing I'm going to leave it alone.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-kwmVjFSBdTw/TqU8D3dXZLI/AAAAAAAAAmQ/ltDJw4mBrpQ/s1600/PA180046.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/-kwmVjFSBdTw/TqU8D3dXZLI/AAAAAAAAAmQ/ltDJw4mBrpQ/s400/PA180046.JPG" alt="" id="BLOGGER_PHOTO_ID_5667001743240029362" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So that's one LTO drive (bought as functional) that had to be repaired. A success story I guess since I basically started the repair without any hopes of success after the seller refunded the price (minus shipping) as a last Hail-Mary attempt before selling it for parts to recoup some of my loss. It was mostly luck that I managed to fix it. Had the CM reader chip been defective for example the drive would've been beyond repair since there's no way to get replacements for that other than having a friend in a Chinese component warehouse or buying a broken drive. The drive also possibly still has some other issues.. if I want to do an assessment test in HP Tape Tools the drive locks up and the SCSI card driver eventually BSODs Windows unless I  manually reset the drive. It does however appear to read and write tapes successfully.. for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-6860429925343452374?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/iBiAMg2cMyY" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2011/10/repair-hp-ultrium2-drive.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-msmkTOjyzBU/TqU6pf0E1kI/AAAAAAAAAls/98rn0uY3mYU/s72-c/lto2.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-8664653628555457964</guid><pubDate>Sun, 04 Sep 2011 13:56:00 +0000</pubDate><atom:updated>2011-09-04T07:49:39.271-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">charger mk2 nokia lph7779 display board pcb finished</category><title>Equalizing battery bank charger V2</title><description>The related projects:
&lt;br /&gt;
&lt;br /&gt;&lt;a href="http://www.karosium.com/2011/07/lph7779-nokia-display-board.html"&gt;LPH7779 Nokia display board&lt;/a&gt;
&lt;br /&gt;&lt;a href="http://www.karosium.com/2011/07/ltc4151-voltage-and-current-measuring.html"&gt;LTC4151 voltage and current measuring board&lt;/a&gt;
&lt;br /&gt;&lt;a href="http://www.karosium.com/2011/07/mini-5v-step-down-board.html"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;Mini 5V Step-down board&lt;/a&gt;
&lt;br /&gt;and the charger boards from &lt;a href="http://www.karosium.com/2011/07/equalizing-battery-bank-charger-v1.html"&gt;Equalizing battery bank charger V1&lt;/a&gt;&lt;h3 class="post-title entry-title"&gt; &lt;/h3&gt; &lt;div class="post-header"&gt;  &lt;/div&gt;  &lt;h3 class="post-title entry-title"&gt; &lt;/h3&gt;came together in the V2 charger.
&lt;br /&gt;
&lt;br /&gt;I chose a smaller box for this one. Screwed the PCBs to bakelite carrier boards and stacked the carrier boards on top of each other through 4 posts made from threaded rod like so:
&lt;br /&gt;
&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-9JsR9JLZVvM/TmOKdbhk6cI/AAAAAAAAAkc/n6MwJo2TIZQ/s1600/Untitled.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 289px;" src="http://3.bp.blogspot.com/-9JsR9JLZVvM/TmOKdbhk6cI/AAAAAAAAAkc/n6MwJo2TIZQ/s400/Untitled.png" alt="" id="BLOGGER_PHOTO_ID_5648510595862161858" border="0" /&gt;&lt;/a&gt;
&lt;br /&gt;From top to bottom we have Charging, Measurement then Power supply levels.
&lt;br /&gt;
&lt;br /&gt;Charging basically just has the UC2906-based charger boards from V1
&lt;br /&gt;Measurement has a completely overkill ATMega16 (only thing I had at home) that drives the display, and talks the to LTC4151 Voltage and current measurement board through I2C.
&lt;br /&gt;Power supply has simple filter/buffers for the 3 separate charger boards and the 5v step-down for the uC and display.
&lt;br /&gt;
&lt;br /&gt;Bottom level and measurement level:
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-lVThua9NAZw/TmOLsnzHuCI/AAAAAAAAAkk/P8hHUoQ0Gq8/s1600/P7010163.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/-lVThua9NAZw/TmOLsnzHuCI/AAAAAAAAAkk/P8hHUoQ0Gq8/s400/P7010163.JPG" alt="" id="BLOGGER_PHOTO_ID_5648511956366637090" border="0" /&gt;&lt;/a&gt;
&lt;br /&gt;Measurement level:
&lt;br /&gt;
&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-rQYnuciMSek/TmOMfmw0F2I/AAAAAAAAAk0/9H0I1J2dJ2M/s1600/P7010162.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/-rQYnuciMSek/TmOMfmw0F2I/AAAAAAAAAk0/9H0I1J2dJ2M/s400/P7010162.JPG" alt="" id="BLOGGER_PHOTO_ID_5648512832261855074" border="0" /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;Power supply level:
&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-GHhwH1-dCDw/TmOL7I8dyLI/AAAAAAAAAks/0r7JvPYWlvE/s1600/P7010174.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/-GHhwH1-dCDw/TmOL7I8dyLI/AAAAAAAAAks/0r7JvPYWlvE/s400/P7010174.JPG" alt="" id="BLOGGER_PHOTO_ID_5648512205782370482" border="0" /&gt;&lt;/a&gt;
&lt;br /&gt;The wiring isn't exactly pretty but whatever.
&lt;br /&gt;
&lt;br /&gt;The finished charger looks like this:
&lt;br /&gt;
&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-y3YeVOjEtDg/TmOND-iHemI/AAAAAAAAAlE/zncXHxk11Rs/s1600/done.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/-y3YeVOjEtDg/TmOND-iHemI/AAAAAAAAAlE/zncXHxk11Rs/s400/done.jpg" alt="" id="BLOGGER_PHOTO_ID_5648513457117952610" border="0" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/-1DZR4t_OB4M/TmONEHjRiBI/AAAAAAAAAlM/Zf5CMupwN1s/s1600/done_back.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/-1DZR4t_OB4M/TmONEHjRiBI/AAAAAAAAAlM/Zf5CMupwN1s/s400/done_back.jpg" alt="" id="BLOGGER_PHOTO_ID_5648513459538724882" border="0" /&gt;&lt;/a&gt;
&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-WVk0ZHxbNbw/TmONDjHfeKI/AAAAAAAAAk8/lvNQDuAv1IQ/s1600/P7010161.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/-WVk0ZHxbNbw/TmONDjHfeKI/AAAAAAAAAk8/lvNQDuAv1IQ/s400/P7010161.JPG" alt="" id="BLOGGER_PHOTO_ID_5648513449758521506" border="0" /&gt;&lt;/a&gt;
&lt;br /&gt;I added few extra features to it in the end. The AtMega can be programmed through the DB9 connector on the back. The UART is also exposed there, and periodic measurements are printed (in case I ever want to do any charge characteristic graphs or something).
&lt;br /&gt;
&lt;br /&gt;Here's the first test run on my old e-bike battery bank:
&lt;br /&gt;
&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-tFpaGCrsBTM/TmOOGH8k_eI/AAAAAAAAAlk/vl_PsFQqWkk/s1600/testrun_.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 188px;" src="http://2.bp.blogspot.com/-tFpaGCrsBTM/TmOOGH8k_eI/AAAAAAAAAlk/vl_PsFQqWkk/s400/testrun_.jpg" alt="" id="BLOGGER_PHOTO_ID_5648514593516223970" border="0" /&gt;&lt;/a&gt;
&lt;br /&gt;Bascom code for the measurement and display can be found &lt;a href="https://sites.google.com/site/praxisstuff/mega16.bas?attredirects=0&amp;amp;d=1"&gt;here&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;(I'd give credit for the LPH7779 code but I don't remember where I found it)
&lt;br /&gt;&lt;h3 class="post-title entry-title"&gt; &lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-8664653628555457964?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/DrGQIO6wwWw" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2011/09/equalizing-battery-bank-charger-v2.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-9JsR9JLZVvM/TmOKdbhk6cI/AAAAAAAAAkc/n6MwJo2TIZQ/s72-c/Untitled.png" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-9188558156787467814</guid><pubDate>Thu, 28 Jul 2011 21:11:00 +0000</pubDate><atom:updated>2011-07-28T14:11:00.256-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">charger mk2 5v step down board</category><title>Mini 5V Step-down board</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-9q7uHzgoANw/ThDbir-EXfI/AAAAAAAAAkQ/jEnVznCisxg/s1600/dcdc.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 346px;" src="http://1.bp.blogspot.com/-9q7uHzgoANw/ThDbir-EXfI/AAAAAAAAAkQ/jEnVznCisxg/s400/dcdc.jpg" alt="" id="BLOGGER_PHOTO_ID_5625237323550842354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I needed 5 volts for the micro-controller and display boards in the V2 charger from the 20V source that the charger boards themselves use. I decided to use an MC34063 I had lying around and designed this miniature board for it. Input cap, output cap, schottky, inductor and a current sense resistor. That's all there is to it. Works fine!&lt;br /&gt;&lt;br /&gt;Eagles:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/site/praxisstuff/mini5v.sch?attredirects=0&amp;amp;d=1"&gt;Schematic&lt;/a&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/site/praxisstuff/mini5v.brd?attredirects=0&amp;amp;d=1"&gt;PCB&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-9188558156787467814?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/gyC1hfLL3yY" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2011/07/mini-5v-step-down-board.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-9q7uHzgoANw/ThDbir-EXfI/AAAAAAAAAkQ/jEnVznCisxg/s72-c/dcdc.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-4513492347672041126</guid><pubDate>Fri, 22 Jul 2011 20:59:00 +0000</pubDate><atom:updated>2011-07-21T15:28:12.740-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">charger mk2 measure voltage current display bohttp://www.blogger.com/img/blank.gifard pcb</category><title>LTC4151 voltage and current measuring board</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-caCknn-83BY/ThDZuyn4z3I/AAAAAAAAAkA/BfkPKLoEVDM/s1600/meterpanel.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/-caCknn-83BY/ThDZuyn4z3I/AAAAAAAAAkA/BfkPKLoEVDM/s400/meterpanel.jpg" alt="" id="BLOGGER_PHOTO_ID_5625235332472033138" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I was looking for simple ways to monitor my charger boards for the V2 equalizing battery bank charger and came across this awesome chip by Linear.  The LTC4151 is an I2C voltage and current monitor that can be powered from the same voltage source it's measuring (7v minimum, up to 80(!)V)  and can measure current up to 4 Amps. It made it very easy to monitor the chargers.&lt;br /&gt;On my board I just basically implemented the datasheet-recommended design including  the kelvin sensing connection for the current sense resistor.&lt;br /&gt;Since getting anything under 0.1ohms seemed to be an impossible feat over here I just bought 0.1s and stacked 2 on top of each other to get 0.05ohm sense resistors.&lt;br /&gt;&lt;br /&gt;Combining this with the &lt;a href="http://www.karosium.com/2011/07/lph7779-nokia-display-board.html"&gt;Nokia display project&lt;/a&gt; after some calibration (calculating the divisors for the ADC values after measuring with a trusted source) the outcome is promising:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-9ySiUlNpcb8/ThDaME3IQQI/AAAAAAAAAkI/4VKz9FXgaro/s1600/meter.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 305px;" src="http://3.bp.blogspot.com/-9ySiUlNpcb8/ThDaME3IQQI/AAAAAAAAAkI/4VKz9FXgaro/s400/meter.jpg" alt="" id="BLOGGER_PHOTO_ID_5625235835584004354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now we're getting somewhere. I still needed 5 volts for the micro-controller from the 20volts used by the chargers. Will deal with that in the next post.&lt;br /&gt;&lt;br /&gt;Eagles:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/site/praxisstuff/monitor.sch?attredirects=0&amp;amp;d=1"&gt;Schematic&lt;/a&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/site/praxisstuff/monitor.brd?attredirects=0&amp;amp;d=1"&gt;PCB&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-4513492347672041126?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/hg2qrh0sbBw" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2011/07/ltc4151-voltage-and-current-measuring.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-caCknn-83BY/ThDZuyn4z3I/AAAAAAAAAkA/BfkPKLoEVDM/s72-c/meterpanel.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-3973439622732269398</guid><pubDate>Sun, 03 Jul 2011 20:28:00 +0000</pubDate><atom:updated>2011-07-14T14:04:19.186-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">charger mk2 nokia lph7779 display board pcb</category><title>LPH7779 Nokia display board</title><description>The first component project of the V2 equalizing battery bank charger came about to fill the need for a display. Sure I could've just used the regular old classic HD47780 character display but where's the fun (and learning experience) in that? I did a nice project with the classic display-of-choice when I built the &lt;a href="http://www.karosium.com/2010/03/fonera-1-wire-continued-display.html"&gt;1Wire interface&lt;/a&gt; for it, and years and years ago when I wrote a picture-display by custom characters thing, so I was already pretty well acquainted with it. The Nokia display on the other hand has been on my mind for the past few years. I'm talking about the monochrome 3310 displays that were first salvaged from phones and interfaced with by hobbyists back in the days. Salvaging and reusing a graphical LCD sounds like a pretty fun thing to do. And so I bought a broken 3310 for 2EUR  shipped. Can't beat that price buying a classic character display.&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-H1WFdbdQ594/ThDVeRC9r8I/AAAAAAAAAjo/QZvQBiemJ7k/s1600/displayboard.jpg"&gt;&lt;br /&gt;&lt;/a&gt;Next up was designing an interface board. There are basically two(three if you count dangling it off of a wire-strip) ways to reuse this display. Either taking it out of the plastic carrier board and building a small frame for it on the PCB, or cutting out the unneeded parts of the carrier board and re-purposing key and sound(?) holes as screw holes to fasten it to the board. Since someone over at this &lt;a href="http://www.mikrocontroller.net/topic/12150"&gt;German hobby electronics forum&lt;/a&gt;&lt;br /&gt;already made an Eagle library for the latter solution, and since that seemed like the option for lazier people anyway I went with that.&lt;br /&gt;Since my target is going to be a 5-volt system I'll need a level shifter. I had a MAX3393 to do the job. It's really an effortless IC to work with if you don't mind the pin spacing.&lt;br /&gt;I've also added a salvaged LT1117 3.3volt LDO voltage regulator to generate the 3.3v for the display on-board.&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-H1WFdbdQ594/ThDVeRC9r8I/AAAAAAAAAjo/QZvQBiemJ7k/s1600/displayboard.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://1.bp.blogspot.com/-H1WFdbdQ594/ThDVeRC9r8I/AAAAAAAAAjo/QZvQBiemJ7k/s400/displayboard.jpg" alt="" id="BLOGGER_PHOTO_ID_5625230650534375362" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Don't mind the SMD tantalum capacitor in these images I tried several but concluded that the display is sort of picky about it, so it needs to be as specified 4.7uF or the display will be unstable.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-_ZiPboutnWM/ThDV2foMGuI/AAAAAAAAAjw/S76o1DNKtDU/s1600/displayboard2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 300px; height: 400px;" src="http://4.bp.blogspot.com/-_ZiPboutnWM/ThDV2foMGuI/AAAAAAAAAjw/S76o1DNKtDU/s400/displayboard2.jpg" alt="" id="BLOGGER_PHOTO_ID_5625231066765466338" border="0" /&gt;&lt;/a&gt;Actually the single problem with this board is the lack of back-light which is about the biggest annoyance on the completed V2 charger and I'm really hating myself for it. If I ever make another one of these boards I'll definitely add SMD LEDs behind the display. Do this if you use this PCB. You'll thank yourself later. I'd add a minimum of 4.&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-H1WFdbdQ594/ThDVeRC9r8I/AAAAAAAAAjo/QZvQBiemJ7k/s1600/displayboard.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/-QN3TIpz7OSg/ThDWrIbZUbI/AAAAAAAAAj4/QS0CwW_qjAw/s1600/displayboard3.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/-QN3TIpz7OSg/ThDWrIbZUbI/AAAAAAAAAj4/QS0CwW_qjAw/s400/displayboard3.jpg" alt="" id="BLOGGER_PHOTO_ID_5625231971070857650" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The display does have great contrast and is easily readable in sunlight. But once it's behind a piece of Plexiglas and a thick front panel there will be shadow and It'll generally be a pain to read in less than full-on daylight conditions.  I guess I should've realized sooner. Oh well.&lt;br /&gt;&lt;br /&gt;Eagles:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/site/praxisstuff/DisplayBoard.sch?attredirects=0&amp;amp;d=1"&gt;Schematic&lt;/a&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/site/praxisstuff/DisplayBoard.brd?attredirects=0&amp;amp;d=1"&gt;PCB&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-3973439622732269398?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/R9PVwW3d_xI" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2011/07/lph7779-nokia-display-board.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-H1WFdbdQ594/ThDVeRC9r8I/AAAAAAAAAjo/QZvQBiemJ7k/s72-c/displayboard.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-5556827496046977707</guid><pubDate>Sun, 03 Jul 2011 19:11:00 +0000</pubDate><atom:updated>2011-07-11T16:28:48.754-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">charger mk1 SLA lead acid vrla charger uc2906</category><title>Equalizing battery bank charger V1</title><description>Background info: Years ago I bought a busted up chinese electric bicycle. It was in terrible shape and it took me make about 2 weeks to fix it up enough to make it rideable (full frame repaint, front wheel complete replacement, axle rebuild, lacing the  hubmotor into new rim) It became a full-on restore but that's another story.. Anyway the bike uses a 36v battery pack made from three 12Amp-hour Sealed-Lead-Acid batteries. The ones that came with it were mostly dead. I ran an inconclusive desulfator experiment on them, being still much of an SLA noob at the time and managed to rejuvenate them to around 4Amp-hours capacity. Ergo, worthless. I bought brand spanking new batteries for it. I admit they were overpriced, off-brand and not even specifically deep-cycle models. I've put about 500 kilometers into the bike with them, and then I couldn't even finish a grocery-shopping run. 500kms is definitely not much, so I started thinking about what I can do to prolong the life of the next pack that I inevitably had to invest into.&lt;br /&gt;I've been charging my batteries in series with a 36V charger, and never equalizing them. This would mean that if one cell in one of the batteries died the whole pack balance would be shot and the remaining batteries would die shortly after. But even if not the pack could go out of balance over time as the individual batteries wear out at different rates. It seems like a good idea to use an equalizing charger at least every once in a while.  And I'm not ruling out the possibility of modifying the pack to allow for individual charging of the batteries ALL the time. This would be ideal because the pack would always be balanced out perfectly.&lt;br /&gt;To be honest I'm not sure about the practical effectiveness of this and the cost of this project is possibly more than what I save even if I prolong the pack life by half a year or so, but it was great learning experience and I'm fairly pleased with the outcome (which is V2, this article is about V1 that I've completely dismantled after the first test run).&lt;br /&gt;&lt;br /&gt;I had this nice case. (I thought it was for an old desktop multimeter but it was probably just sold as an empty case originally.) that I wanted to use for the project.&lt;br /&gt;&lt;br /&gt;The charger was to be UCx906 based (Yes, a linear charger chip, not a switch-mode one. Yes It's not as efficient, but it's easy to work with.)&lt;br /&gt;There was a simple design up for an UCx906 charger &lt;a href="http://adventure-radio.org/ars/pages/back_issues/2003_text/0903_text/N7CEE.html"&gt;here&lt;/a&gt;. That I designed a PCB for some time ago.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-82nxLzI5toM/ThDKy2sgE5I/AAAAAAAAAi4/ctB90Sustjw/s1600/HPIM3157.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://2.bp.blogspot.com/-82nxLzI5toM/ThDKy2sgE5I/AAAAAAAAAi4/ctB90Sustjw/s320/HPIM3157.JPG" alt="" id="BLOGGER_PHOTO_ID_5625218909610185618" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I made 3 of these boards, for the 3 batteries in the pack.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-F26WNqPjbrw/ThDLZq2SZGI/AAAAAAAAAjA/olxrtcUmvzk/s1600/P5120152.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://3.bp.blogspot.com/-F26WNqPjbrw/ThDLZq2SZGI/AAAAAAAAAjA/olxrtcUmvzk/s320/P5120152.jpg" alt="" id="BLOGGER_PHOTO_ID_5625219576444904546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;One by one they all tested out fine, so I proceeded to put them in the case.&lt;br /&gt;&lt;br /&gt;The UC chips have a couple of working modes but the board above is basically for the 3-stage charge characteristic. Stage 1 is bulk charge which is a full-configured-power charge stage until the battery reaches 13.8V, Stage 2 is controlled overcharge where the charge current slowly tapers off to float-levels until the battery reaches 14.2-14.4 volts, Stage 3 is float charge where the charge current is the minimum required to maintain the battery at 13.8V&lt;br /&gt;&lt;br /&gt;(Or at least I think so.. To be honest I'm not sure about some aspects of this design but I'm going to trust it since the person who designed it has a HAM ID so they probably know more about the subject than I do (generally a good assumption in my case). It incorporates some elements from datasheet designs yet leaves some out.  It does SEEM to work close to how it's intended though I think it switches over to OVERCHARGE mode a bit too early considering it's configuration.. Oh well..)&lt;br /&gt;&lt;br /&gt;The controlled overcharge step is used (if I remember correctly) to  remove the layer of sulphate that forms during deep discharges.&lt;br /&gt;&lt;br /&gt;The chip itself has an OVERCHARGE INDICATE pin that goes low when the chip enters overcharge mode. Not really thinking anything through I went ahead and designed the following front panel:&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-qNQ2IeGw8Bc/ThDJR-Fz32I/AAAAAAAAAiw/EJM8MF0DdFE/s1600/HPIM3327.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://1.bp.blogspot.com/-qNQ2IeGw8Bc/ThDJR-Fz32I/AAAAAAAAAiw/EJM8MF0DdFE/s320/HPIM3327.JPG" alt="" id="BLOGGER_PHOTO_ID_5625217245148077922" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Can you see the problem here? I have about 4 useless, and 3 semi-useless LEDs.&lt;br /&gt;Knowing when the chip is in overcharge mode in itself is quite useless. And the power leds will all be on all the time unless one of the charger boards die. But I still proceeded to put it all together despite this.&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-gDQ2ZBTPv78/ThDMtXS74kI/AAAAAAAAAjI/bld0k_n_38k/s1600/HPIM3330.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://3.bp.blogspot.com/-gDQ2ZBTPv78/ThDMtXS74kI/AAAAAAAAAjI/bld0k_n_38k/s320/HPIM3330.JPG" alt="" id="BLOGGER_PHOTO_ID_5625221014305366594" border="0" /&gt;&lt;/a&gt;I sort of realized this while I was building, but at that point it just seemed like  a waste to not finish it without a clear idea for a second version. So I soldiered on even though I realized I'm never going to be satisfied with this design.&lt;br /&gt;&lt;br /&gt;I mean the panels turned out good! and I re-did them like 3 times (the front one anyway).. It'd be such a waste of effort..&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-IrkRPiFjk0M/ThDNwsPl3rI/AAAAAAAAAjQ/QqY3RcP9g0g/s1600/HPIM3328.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://2.bp.blogspot.com/-IrkRPiFjk0M/ThDNwsPl3rI/AAAAAAAAAjQ/QqY3RcP9g0g/s320/HPIM3328.JPG" alt="" id="BLOGGER_PHOTO_ID_5625222170979720882" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;And so I was almost done.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-opTpn56NSf0/ThDOEv9vjnI/AAAAAAAAAjY/kqcdKQ7NZDM/s1600/HPIM3331.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 240px; height: 320px;" src="http://4.bp.blogspot.com/-opTpn56NSf0/ThDOEv9vjnI/AAAAAAAAAjY/kqcdKQ7NZDM/s320/HPIM3331.JPG" alt="" id="BLOGGER_PHOTO_ID_5625222515575983730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;And then I was done, and doing initial tests.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-9Rc7jtr-mf4/ThDPm9jaF0I/AAAAAAAAAjg/LpR4J7W-IzE/s1600/test.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://4.bp.blogspot.com/-9Rc7jtr-mf4/ThDPm9jaF0I/AAAAAAAAAjg/LpR4J7W-IzE/s320/test.jpg" alt="" id="BLOGGER_PHOTO_ID_5625224202850801474" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;D'oh! Well what do you know? The lack of any informative displays is even more of an annoyance than I thought. But I did manage to track down a power supply issue at least...&lt;br /&gt;&lt;br /&gt;I let it sit for a couple of weeks then completely dismantled it when everything came together for V2.&lt;br /&gt;&lt;br /&gt;Eagles for the charger boards:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/site/praxisstuff/chg_smd.sch?attredirects=0&amp;amp;d=1"&gt;Schematic&lt;/a&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/site/praxisstuff/chg_smd.brd?attredirects=0&amp;amp;d=1"&gt;PCB&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-5556827496046977707?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/_nu8hjOEx7k" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2011/07/equalizing-battery-bank-charger-v1.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-82nxLzI5toM/ThDKy2sgE5I/AAAAAAAAAi4/ctB90Sustjw/s72-c/HPIM3157.JPG" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-3470892388556573796</guid><pubDate>Sun, 03 Jul 2011 18:27:00 +0000</pubDate><atom:updated>2011-07-03T12:47:40.252-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ir remote control attiny avr hack</category><title>Quick Project: IR remote-control power strip</title><description>I wanted a remote controllable power strip for my modest media-player setup consisting of  small PC multimedia speakers, a chinese SD media player like this&lt;br /&gt;&lt;a href="http://malaysiads.com/wp-content/uploads/classipress/mini-rmvb-player-1091949690.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 412px; height: 262px;" src="http://malaysiads.com/wp-content/uploads/classipress/mini-rmvb-player-1091949690.png" alt="" border="0" /&gt;&lt;/a&gt;and a USB HDD enclosure. I wanted the ability to conveniently power them off together for a couple of reasons: The speaker's amplifier produces an annoying hiss, and the media player's power LED is on constantly despite the player being off and is super bright, and I'd want to switch the HDD off anyway.&lt;br /&gt;I know I could've just went out and bought an RF thing for around 10EUR but where's the fun in that?&lt;br /&gt;Also this way I didn't add to the number of remotes I have. (I'll explain below.)&lt;br /&gt;Salvaged a SOIC ATTiny26 from a busted coffee maker earlier. Soldered wires to it's pads so I could use it on simple experimenter's board. It also looks funky enough.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-Ix-5ejAMnKY/ThC3dccNR4I/AAAAAAAAAiY/-TsunehkFUE/s1600/spider.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 275px; height: 320px;" src="http://1.bp.blogspot.com/-Ix-5ejAMnKY/ThC3dccNR4I/AAAAAAAAAiY/-TsunehkFUE/s320/spider.jpg" alt="" id="BLOGGER_PHOTO_ID_5625197651064342402" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;On the left is a standard ISP header.&lt;br /&gt;&lt;br /&gt;I had an SFH506 IR receiver/demodulator which was already discontinued back in the days when IR remote control was all the rage in hobby projects here. The suggested replacement units never seemed to last that long. Maybe they were rated for a 3.3v, didn't bother to check then. Anyways this was the real thing, salvaged from an old VCR.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-lGHh1OrfBAM/ThC5ugwwwaI/AAAAAAAAAig/v3cpBQ9OXCc/s1600/P7010173.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://1.bp.blogspot.com/-lGHh1OrfBAM/ThC5ugwwwaI/AAAAAAAAAig/v3cpBQ9OXCc/s320/P7010173.JPG" alt="" id="BLOGGER_PHOTO_ID_5625200143305327010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I had a generic 5V relay from a busted old CRT monitor which I'm switching from a GPIO of the ATTiny through a generic transistor. Power this all from an old cell phone charger board.&lt;br /&gt;That's basically the setup. Ghettoed it all together in an acrylic box using zipties, hot glue, heat shrink and double sided mounting foam tape. (It does say quick in the title.)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-qYyvwRnZbq4/ThC6Gl-lnZI/AAAAAAAAAio/b9A9sz3uMBA/s1600/dd.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 303px;" src="http://2.bp.blogspot.com/-qYyvwRnZbq4/ThC6Gl-lnZI/AAAAAAAAAio/b9A9sz3uMBA/s320/dd.jpg" alt="" id="BLOGGER_PHOTO_ID_5625200557022354834" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Besides the initial soldering wires to the pins of the SOIC chip operation the entire thing probably didn't take 30 minutes to finish (including coding time) and it's been working great ever since. As for the remote:&lt;br /&gt;I use a universal remote from my TV that has a slide switch for switching between TV and VCR modes. I decided to make use of that since I don't need the VCR functionality on it. It works out  great because I can just set up an RC5 VCR code on the thing and RC5 is extremely easy to handle in BASCOM (basically just 1 function in a loop.. GetRC5).&lt;br /&gt;&lt;br /&gt;All in all it was a fun project that I now use all the time, hardly took any effort to finish and was basically made from parts from the junk box.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-3470892388556573796?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/-COEyu-NCeU" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2011/07/quick-project-ir-remote-control-power.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-Ix-5ejAMnKY/ThC3dccNR4I/AAAAAAAAAiY/-TsunehkFUE/s72-c/spider.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-3641454575724336780</guid><pubDate>Fri, 04 Mar 2011 11:04:00 +0000</pubDate><atom:updated>2011-03-24T03:11:10.451-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">home server power supply ATX 12v power d945gsejt</category><title>DIY Power Supply for Home Server</title><description>I'm replacing my old power-hog home server with a new one based on the Intel D945GSEJT mainboard.  This board is essentially a netbook platform that's been "desktopified". Among it's weirder points are that it uses the Mobile 945GSE chipset, SODIMM ram, 44PIN IDE, and that it runs off a single 12V supply. The reason I chose this board is that it consumes 13W in idle and 18W under full CPU and GPU load which is pretty much the lowest power consumption one can get with an Atom system (excluding some server-specific boards that were beyond my budget). Not wanting to use an ATX PSU I've decided to build a completely new power supply for the board. Not having to bother with all the voltages needed for ATX makes this a lot easier. I've decided to make a high-amp 12V supply, and a 5V supply capable of driving two HDDs.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-_Ojyl03L6UU/TXDabFv5zyI/AAAAAAAAAgI/X-VneWfH_AY/s1600/Small_toroidal_transformer%255B1%255D.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 348px;" src="http://4.bp.blogspot.com/-_Ojyl03L6UU/TXDabFv5zyI/AAAAAAAAAgI/X-VneWfH_AY/s400/Small_toroidal_transformer%255B1%255D.jpg" alt="" id="BLOGGER_PHOTO_ID_5580200097246465826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I bought (actually it was a swap for some things I no longer had use for) a 100VA &lt;a href="http://www.raftabtronics.com/TECHNOLOGY/ElectromagneticBasics/ToroidalTransformerBasics/tabid/112/Default.aspx"&gt;toroidal-core transformer&lt;/a&gt; to start with. This type of transformer is widely used by audio amp builders for example as they're more efficient and take up less space than plate transformers. After that we have the usual bridge rectifier and smoothing capacitor combo. For the latter I'm using a single 10000uF/63V electrolytic cap, a RIFA PEH169 rated for 78000 operating hours(cca. 9 years) @85C.  Since we're nowhere near the rated voltage or the temperature given for the operating hours It should probably be safe to say that this cap will outlast everything else inside the case.&lt;br /&gt;&lt;br /&gt;After rectification I get around 18Vs from this setup. For the DC regulation I decided to go with TI's power modules. The 6Amp PTN78020 for the 12v supply, and the 1.5Amp PTN78000 for the 5V one. The 5v supply is because I don't want to run more than 1 HDD off the board's internal dc-dc power supply so I'm running a couple of molex connectors from inside the PSU for 2 more. These power modules are pretty impressive. Essentially they're complete switching regulators on a piece of PCB. You just need to add some input and output capacitors (and optional ripple filtering) and you're done. They can reach up to 96% efficiency and come in 1.5/3/6 amp versions with various protections against frying themselves and whatever it is they are powering.&lt;br /&gt;I went with the recommended implementation from the datasheet just adding the optional output ripple filter. Low ESR electrolytics and 1uF SMD ceramics. The thing to the left of the caps is a double ferrite bead.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-IZ3G73jleCc/TXNHKGy5zhI/AAAAAAAAAgo/1EdvTxb8C1Y/s1600/6A_2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 322px;" src="http://3.bp.blogspot.com/-IZ3G73jleCc/TXNHKGy5zhI/AAAAAAAAAgo/1EdvTxb8C1Y/s400/6A_2.jpg" alt="" id="BLOGGER_PHOTO_ID_5580882602190556690" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/--uhQOS4StxU/TXDVUvaaaVI/AAAAAAAAAf4/1beIFug9J9s/s1600/6am_done.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 380px; height: 400px;" src="http://3.bp.blogspot.com/--uhQOS4StxU/TXDVUvaaaVI/AAAAAAAAAf4/1beIFug9J9s/s400/6am_done.jpg" alt="" id="BLOGGER_PHOTO_ID_5580194490613393746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The 1.5Amp module doesn't have the optional filter. At this point I was considering what to use for the output cap. That's why there isn't one in this picture. Ended up using the same as in the 6Amp module (470uF Low-ESR Samxon)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-RWinWNMDvqU/TXNHsMO9uvI/AAAAAAAAAgw/R1Mhi1quCeU/s1600/1A.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 240px;" src="http://3.bp.blogspot.com/-RWinWNMDvqU/TXNHsMO9uvI/AAAAAAAAAgw/R1Mhi1quCeU/s400/1A.jpg" alt="" id="BLOGGER_PHOTO_ID_5580883187765983986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is how the completed PSU looks like:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-OMWQkKYiEQY/TXDVxtFMCRI/AAAAAAAAAgA/8mfEZZNJawg/s1600/psuuu.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 383px;" src="http://1.bp.blogspot.com/-OMWQkKYiEQY/TXDVxtFMCRI/AAAAAAAAAgA/8mfEZZNJawg/s400/psuuu.jpg" alt="" id="BLOGGER_PHOTO_ID_5580194988203706642" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Board layouts &amp;amp; schematics are here: &lt;a href="https://sites.google.com/site/praxisstuff/powermodules.zip?attredirects=0&amp;amp;d=1"&gt;Download&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I've just replaced  my old server with the new one powered by this PSU.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-VhcekV_iC1g/TYONNHB-7vI/AAAAAAAAAhI/3padZgQ46TE/s1600/sejt.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 300px; height: 400px;" src="http://4.bp.blogspot.com/-VhcekV_iC1g/TYONNHB-7vI/AAAAAAAAAhI/3padZgQ46TE/s400/sejt.jpg" alt="" id="BLOGGER_PHOTO_ID_5585463219234729714" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-3641454575724336780?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/FRSo9toN-CQ" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2011/03/home-server-power-supply.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-_Ojyl03L6UU/TXDabFv5zyI/AAAAAAAAAgI/X-VneWfH_AY/s72-c/Small_toroidal_transformer%255B1%255D.jpg" height="72" width="72" /><thr:total>6</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-662214462108590689</guid><pubDate>Tue, 08 Feb 2011 08:10:00 +0000</pubDate><atom:updated>2011-02-08T00:51:24.239-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">capacitor esr inductor coil meter avr lcd</category><title>Project builds</title><description>&lt;div&gt;Built myself a couple of things that were missing from my toolkit.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The &lt;a href="http://yo6pir.wordpress.com/proiecte/lc-meter-atmega8/"&gt;AVR-based LC Meter by YO6PIR&lt;/a&gt; to ballpark hand-wound and unknown inductors.&lt;/div&gt;&lt;div&gt;Yes.. It's not the prettiest thing to behold in the cheapo electrical box enclosure I put it in, but it works. There's some drift that I'm not sure whether is inherent in the design or something I messed up but it still works well enough.&lt;/div&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370" id="viddler_karosa_10"&gt;&lt;param name="movie" value="http://www.viddler.com/player/89b96175/"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;param name="allowNetworking" value="all"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="flashVars" value="f=1&amp;amp;autoplay=f&amp;amp;disablebranding=f"&gt;&lt;embed src="http://www.viddler.com/player/89b96175/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" allownetworking="all" name="viddler_karosa_10" flashvars="f=1&amp;amp;autoplay=f&amp;amp;disablebranding=f"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;and the &lt;a href="http://members.shaw.ca/swstuff/esrmeter.html"&gt;ESR Meter Project by VE7IT&lt;/a&gt; which will be very useful for random repairs.&lt;div&gt;(PCB shown incomplete and capacitor soldered in with wrong polarity)&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://1.bp.blogspot.com/_5JFl07VLeDw/TVD9z-LHtAI/AAAAAAAAAfY/6_0Y6KhKoGI/s1600/esrmeter.jpg"&gt;&lt;img src="http://1.bp.blogspot.com/_5JFl07VLeDw/TVD9z-LHtAI/AAAAAAAAAfY/6_0Y6KhKoGI/s400/esrmeter.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5571231808362099714" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 305px; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://2.bp.blogspot.com/_5JFl07VLeDw/TVD9NOOf7fI/AAAAAAAAAfQ/1SfsVgsTLSs/s400/esrmeter_box.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5571231142656339442" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 300px; height: 400px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt; I've since marked a few values on the cover with a sharpie. About 80% of the scale is 0-10 Ohms which works out well enough since looking at &lt;a href="http://www.your-book.co.uk/design/esrchart.htm"&gt;ESR charts&lt;/a&gt; will tell us that almost every electrolytic should have an ESR well under 10 ohms (except low capacitance high-voltage ones). Most of the time a good cap will produce close to full deflection. (The one being measured in the picture is a 3.3uF 400V so It should still be in great condition at around 8 Ohms ESR.)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-662214462108590689?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/QCkjK_kx-7k" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2011/02/project-builds.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_5JFl07VLeDw/TVD9z-LHtAI/AAAAAAAAAfY/6_0Y6KhKoGI/s72-c/esrmeter.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-8299019366498657714</guid><pubDate>Mon, 29 Nov 2010 17:31:00 +0000</pubDate><atom:updated>2010-12-08T07:00:20.013-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">remote control rf radio switch lights attiny13 avr</category><title>RF Remote Control v2</title><description>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/TPPkQnVicqI/AAAAAAAAAeU/zs-gHMXZkT0/s1600/minirem_1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/TPPkQnVicqI/AAAAAAAAAeU/zs-gHMXZkT0/s400/minirem_1.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5545026540311573154" /&gt;&lt;/a&gt;&lt;br /&gt;Made another remote control for my RF light switch. Pretty much the same &lt;a href="http://www.karosium.com/2010/10/rf-remote-control-emulation.html"&gt;as before&lt;/a&gt; but on a smaller PCB. Also ended up putting it in an old Maxim sample box.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I found a couple of button nubs in my junk box so decided to go with those. Even so I had to raise the buttons with pieces of rubber.  A piece of tape keeps the buttons from falling out when the box is opened and also adds some tolerance for misalignment.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://2.bp.blogspot.com/_5JFl07VLeDw/TPPkRsaKhxI/AAAAAAAAAek/o8oLWngYrCk/s400/minirem_3.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5545026558853023506" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 300px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;span class="Apple-style-span" style="-webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://2.bp.blogspot.com/_5JFl07VLeDw/TPPkREVgW1I/AAAAAAAAAec/XiT0GNQiyMM/s400/minirem_2.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5545026548096064338" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 300px; " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;span class="Apple-style-span" style="-webkit-text-decorations-in-effect: underline; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;PCB made with PnP Blue, the 12v battery is soldered.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here it is working:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt; &lt;div align="center"&gt;&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370" id="viddler_84d2f950"&gt;&lt;param name="movie" value="http://www.viddler.com/player/84d2f950/"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;embed src="http://www.viddler.com/player/84d2f950/" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_84d2f950"&gt;&lt;/embed&gt;&lt;/object&gt; &lt;/div&gt;&lt;div align="center"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;Board: &lt;a href="https://sites.google.com/site/praxisstuff/miniremote.brd?attredirects=0&amp;amp;d=1"&gt;here&lt;/a&gt;&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;ATTINY13 source: &lt;a href="https://sites.google.com/site/praxisstuff/pt2262_emu.txt?attredirects=0&amp;amp;d=1"&gt;here&lt;/a&gt; (set framesize:8, softstack:16 in bascom compiler settings, fusebits configured to 9.6mhz internal OSC)&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;Parts:&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;D6, D3, VCCZNR = 5.1V Zeners&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;R1 = &lt;s&gt;100ohm&lt;/s&gt; 1k&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;R3,R4 = 2.2k&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;R5,R7 = 10K&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;R11 = 10K&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;Q1 = some small RF transistor (I used MPSH10)&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;C1 = 1pF&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;C2= 2pF (these are not critical)&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;C3 = Trimmer cap ideally 1-5pF&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;C4= 2200pF&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;D1,D2 = 1n4148 or similar&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;L1 = 1uH&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;L2 = swapped out for 4pF cap&lt;/div&gt;&lt;div align="center" style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-8299019366498657714?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/REyoApRiSIw" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/11/rf-remote-control-v2.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_5JFl07VLeDw/TPPkQnVicqI/AAAAAAAAAeU/zs-gHMXZkT0/s72-c/minirem_1.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-6764870632167934509</guid><pubDate>Fri, 22 Oct 2010 20:00:00 +0000</pubDate><atom:updated>2011-01-18T11:46:11.952-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">remote control rf radio switch lights attiny13 avr</category><title>RF Remote Control Emulation</title><description>A few weeks ago I got one of these:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_5JFl07VLeDw/TMHwJt7-UoI/AAAAAAAAAdI/NuSjsSU0rVg/s1600/rf_switch.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 228px;" src="http://4.bp.blogspot.com/_5JFl07VLeDw/TMHwJt7-UoI/AAAAAAAAAdI/NuSjsSU0rVg/s400/rf_switch.jpg" alt="" id="BLOGGER_PHOTO_ID_5530965867128312450" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It's a remote controllable light switch that comes with an RF remote. The only light switch is across the room from my PC and it's a pretty large room. (The building's basically a 1-room apartment)  so this works out great with the remote. Of course since I'm using the remote to cut the lights when I go to bed I'm basically using the remote from two places which brings with it the unavoidable annoyance of the remote being in the wrong place all the time. Which means I have to get up and look for it which is effectively as much of an annoyance as it was meant to solve. So I wanted a second controller that would basically be a stationary switch by my bed so I could leave the portable remote around the desk.&lt;br /&gt;Call me lazy I won't even deny it.&lt;br /&gt;&lt;br /&gt;I popped the original remote open to see what I was dealing with.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_5JFl07VLeDw/TMHzzFl9m4I/AAAAAAAAAdQ/NHG4__cmWrU/s1600/remote_inside.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 255px;" src="http://1.bp.blogspot.com/_5JFl07VLeDw/TMHzzFl9m4I/AAAAAAAAAdQ/NHG4__cmWrU/s400/remote_inside.jpg" alt="" id="BLOGGER_PHOTO_ID_5530969876387961730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;After some research I concluded that LP801B is a PT2262 clone which is a remote control encoder chip. Has a few address and data pins and generates a signal on the output pin based on the configuration of those at the time the enable pin is connected to ground.&lt;br /&gt;At first I didn't think much of it and ordered some PT2262s and made a PCB which is basically a clone of the original remote adapted for components I had lying around (or just stupidly large pads where I had no idea what I was going to use when I made the board)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_5JFl07VLeDw/TMH1nR5t-9I/AAAAAAAAAdY/LV24Rv96Ijo/s1600/rfemu_pcb.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 245px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/TMH1nR5t-9I/AAAAAAAAAdY/LV24Rv96Ijo/s400/rfemu_pcb.jpg" alt="" id="BLOGGER_PHOTO_ID_5530971872556874706" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Not being patient enough however I started looking around to see if anyone's emulated this chip on a microcontroller before. Turns out, several people did.&lt;br /&gt;So I took the code at &lt;a href="http://www.mikroe.com/forum/viewtopic.php?f=13&amp;amp;t=10832"&gt;http://www.mikroe.com/forum/viewtopic.php?f=13&amp;amp;t=10832&lt;/a&gt; and ported it over to &lt;a href="https://sites.google.com/site/praxisstuff/pt2262_emu.txt?attredirects=0&amp;amp;d=1"&gt;BASCOM&lt;/a&gt; for the ATTINY13.&lt;br /&gt;I think that code has a bug though as the logic low component of the syncbit should be 31 times the short-pulse duration according to the datasheet not 7. (He's basically divided the datasheet units by 4 in case anyone actually looks into this) The decoders may not care as It seems to have worked for him. When I got mine to work I was using the datasheet-correct count so I didn't test with that. It took several modifications to my original board to get it working with the attiny. Had to put in 3 zeners as the PT2262 operates directly from 12v which the attiny can't do. I actually fried an ATTINY2313 the first time around because I forgot the two selector/power buttons that were still at 12v.  If I knew in advance that I'd be able to do this I would've designed a much smaller board..&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_5JFl07VLeDw/TMH4drB4pBI/AAAAAAAAAdg/Di158weEZYM/s1600/emu_rf_remote.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 356px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/TMH4drB4pBI/AAAAAAAAAdg/Di158weEZYM/s400/emu_rf_remote.jpg" alt="" id="BLOGGER_PHOTO_ID_5530975006038205458" border="0" /&gt;&lt;/a&gt;I was trying random numbers for the pulse duration and randomly tuning the white variable capacitor but with none of the parameters actually being correct this method was never going to work. After some wasted time I caved and connected the original remote's encoder chip data output pin to the microphone input of my netbook.&lt;br /&gt;Then with the cool Soundcard Oscilloscope from &lt;a href="http://www.zeitnitz.de/Christian/scope_en"&gt;http://www.zeitnitz.de/Christian/scope_en&lt;/a&gt; got this:&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_5JFl07VLeDw/TMH6l5U_yYI/AAAAAAAAAdo/76Ejm9qF1LY/s1600/command.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 338px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/TMH6l5U_yYI/AAAAAAAAAdo/76Ejm9qF1LY/s400/command.jpg" alt="" id="BLOGGER_PHOTO_ID_5530977346338670978" border="0" /&gt;&lt;/a&gt;To which I could adapt my pulse duration.&lt;br /&gt;At this point I tested my board and while tuning the variable cap it suddenly became dark in the room :) It took a few more iterations to get the delay "just right" but now it works perfectly.&lt;br /&gt;I put it in a small electrical box with 2 push-buttons and installed it in an easy to reach location from the bed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_5JFl07VLeDw/TMH8RrkxCpI/AAAAAAAAAdw/t2ClLzl4FGo/s1600/ultimate_lazyswitch.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_5JFl07VLeDw/TMH8RrkxCpI/AAAAAAAAAdw/t2ClLzl4FGo/s400/ultimate_lazyswitch.jpg" alt="" id="BLOGGER_PHOTO_ID_5530979198072588946" border="0" /&gt;&lt;/a&gt;Some component leg that I forgot to cut (probably a resistor) must have punctured the battery wire though as it drained to 10v by that night and since the circuit is basically open when none of the buttons are pressed that shouldn't happen at all.  I did find a puncture mark on the positive lead so that must have been it.. damn. After reseating the board in the box and making sure the battery wires don't pass under any component legs it hasn't happened again.&lt;br /&gt;&lt;br /&gt;Project files:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/site/praxisstuff/radioremotecontrol.brd?attredirects=0&amp;amp;d=1"&gt;Board&lt;/a&gt;&lt;br /&gt;Very large. But the (somewhat smaller, by about 20%, still fairly large) version is on the browsing/printing PC upstairs and I'm too lazy to get it :) Note below on the jumper blocks:&lt;br /&gt;[1] [2] [3]&lt;br /&gt;No connection: FLOAT bit&lt;br /&gt;1+3: Bit 0&lt;br /&gt;2+3: Bit 1&lt;br /&gt;1+2: Short out the battery&lt;br /&gt;And that this PCB is for the PT2262 (and clones) so it needs modifications to be used with an AVR. At least 1 5.1V zener for the CHIPPWR and 1 per button.&lt;br /&gt;&lt;br /&gt;The board runs off a 23A (12 volt) stack battery. Running from lower voltages may be possible but the RF circuit definitely needs to be retuned.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/site/praxisstuff/radioremotecontrol.sch?attredirects=0&amp;amp;d=1"&gt;Schematic&lt;/a&gt;&lt;br /&gt;Messy. The seemingly unconnected wires from the diodes on the data pins are actually connected to CHIPPWR.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/site/praxisstuff/pt2262_emu.txt?attredirects=0&amp;amp;d=1"&gt;PT2262 emulation code in BASCOM&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-6764870632167934509?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/IAc_mTCl2Bg" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/10/rf-remote-control-emulation.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_5JFl07VLeDw/TMHwJt7-UoI/AAAAAAAAAdI/NuSjsSU0rVg/s72-c/rf_switch.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-2049066458760782445</guid><pubDate>Thu, 14 Oct 2010 07:32:00 +0000</pubDate><atom:updated>2011-01-15T01:11:27.226-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">water heater thermostat temperature control ds1821</category><title>Water Heater Thermostat</title><description>I have a small(50L) electric water heater in my apartment. It was a cheapo and came with a mechanical thermostat. Just a few days after this was installed (and construction work still going on) I looked at the external thermometer and realized that the water temperature has dropped to a uselessly low level.  So I went ahead and set the thermostat to 4 (out of 5). This made it go up to about 65C but in a day or so it was already below 50.  I had to conclude that either the thermostat is broken or (what still seemed unlikely at the time) this type of thermostat either works completely unreliably when the cooling is slow or has a huge hysteresis gap that can't be changed or maybe both. So I bought one from a different manufacturer, installed it and got the exact same results. This is actually why I started looking into thermostats in the first place. Changing the pipe heater's was just a side-project. At first I considered just buying a capillary thermostat that higher-end water heaters use but decided against it because I've stumbled on the DS1821s.&lt;br /&gt;&lt;br /&gt;It was important for this to a be a drop-in replacement for the original mechanical thermostat.&lt;br /&gt;It was also important for it to be safe(ish) with at least one thermal overrun protection that isn't electronic. So I've designed a board that is essentially a relay driver adapter that the 1821 can control with a terminal block for connecting a &lt;a href="http://en.wikipedia.org/wiki/Thermal_cutoff"&gt;thermal fuse&lt;/a&gt;. The first version looked this like:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_5JFl07VLeDw/TLa9ExFbvHI/AAAAAAAAAc4/gRZ3c_kKJB8/s1600/thermo.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 266px; height: 400px;" src="http://3.bp.blogspot.com/_5JFl07VLeDw/TLa9ExFbvHI/AAAAAAAAAc4/gRZ3c_kKJB8/s400/thermo.jpg" alt="" id="BLOGGER_PHOTO_ID_5527813482237115506" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_5JFl07VLeDw/TLa47oHiU0I/AAAAAAAAAco/OS4NPefkBlA/s1600/thermo2.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 300px; height: 400px;" src="http://1.bp.blogspot.com/_5JFl07VLeDw/TLa47oHiU0I/AAAAAAAAAco/OS4NPefkBlA/s400/thermo2.jpg" alt="" id="BLOGGER_PHOTO_ID_5527808927164683074" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The measuring tube in the tank turned out to actually be really narrow so I had to throw out that chrome rod and use smaller wire for the thermal fuse. It doesn't look as nice or tidy now but it fits. Here's a test fitting with the thick wire still and no fuse at the end:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_5JFl07VLeDw/TLa62rQp2eI/AAAAAAAAAcw/kBC65h-YoaI/s1600/thermo3.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_5JFl07VLeDw/TLa62rQp2eI/AAAAAAAAAcw/kBC65h-YoaI/s400/thermo3.jpg" alt="" id="BLOGGER_PHOTO_ID_5527811041132141026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The relay is an 8A DPDT. I was unsure about the reliability of the 1821 at higher temperatures so at first I've built an ATTiny13 based "debugger" that reported the temperature and the config register to a PC that I checked on from time to time. It seemed stable enough so I've been using this for a few days now and water temperature is pretty much constant :)&lt;br /&gt;&lt;br /&gt;Board Eagle &lt;a href="https://sites.google.com/site/praxisstuff/simplesmrthr.brd?attredirects=0&amp;amp;d=1"&gt;here&lt;/a&gt;&lt;br /&gt;R6 - 2.2k&lt;br /&gt;R8 - 10k&lt;br /&gt;&lt;br /&gt;The board requires 5v and 12v DC and the AC for the water heater. Currently I'm using an external power supply in a modified wall adapter box.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_5JFl07VLeDw/TLbBA8y2XkI/AAAAAAAAAdA/RXyGC5UvTYk/s1600/wallpsu.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/TLbBA8y2XkI/AAAAAAAAAdA/RXyGC5UvTYk/s400/wallpsu.jpg" alt="" id="BLOGGER_PHOTO_ID_5527817814707428930" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Notes on soldering thermal fuses:&lt;br /&gt;&lt;br /&gt;For a project like this a 98C or 104C SEFUSE or ThermoDisc G4 works nicely. They're small (size of a larger resistor) and can do 10A.  They should be cooled (spray from some alcohol-based cleaner should do) and their leads held in a clamp or larger pair of pliers while soldering to keep them from reaching their cutoff point.  Being quick also helps.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;UPDATE&lt;/b&gt;: &lt;b&gt;Safety modification&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I've reencountered the problem that initially prompted me to build the ATTINY based debugging board. Apparently the 1821 can fail to enter thermostat mode when powering up.&lt;/div&gt;&lt;div&gt;Maybe it has to do with noise on the PSU during the initial stages of powerup and connection to mains that may be erroneously triggering Sensor-mode reset. I have no oscilloscope to see what's going on but the end result is that If the sensor fails to enter thermostat mode the boiler will overheat. Which is decidedly not a good thing. I can't reliably reproduce the problem but I'm going to assume that it's uninfluenced by the POL register and just basically makes the thermostat output stick at logic high. I've added an inverter and changed POL to 1. This way the 1821 is logic high once the upper threshold is reached, which is inverted to 0 turning off the heater. If it decides not to start up correctly sticking at logic high it just won't start heating.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;UPDATE:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The above modification seems to have fixed the issue. I've had no problems with the system since.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-2049066458760782445?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/lW2KyUKmH08" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/10/water-heater-thermostat.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_5JFl07VLeDw/TLa9ExFbvHI/AAAAAAAAAc4/gRZ3c_kKJB8/s72-c/thermo.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-2868641183371891633</guid><pubDate>Fri, 17 Sep 2010 16:25:00 +0000</pubDate><atom:updated>2011-01-15T01:03:53.548-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ds1821 heating thermostat programmer</category><title>Standalone DS1821 thermostat programmer</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/TJOW-zD5jxI/AAAAAAAAAcE/XS8H7HRSKgc/s1600/ds1821.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 363px; height: 296px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/TJOW-zD5jxI/AAAAAAAAAcE/XS8H7HRSKgc/s400/ds1821.jpg" alt="" id="BLOGGER_PHOTO_ID_5517919974061608722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As a continuation of the previous project I decided to make a standalone gadget to program DS1821 thermostats. As mentioned before these devices are non-MicroLan 1wire thermometers capable of standalone thermostat operation. After configuration for thermostat mode the center (1Wire DQ) pin becomes a thermostat output pin. Since it's still an open collector pin it needs a pull up resistor, and since it's still basically a 4mA GPIO a transistor at least is  needed to switch anything meaningful with it.&lt;br /&gt;&lt;br /&gt;I've used the ATMega8 "devboard" that I used in the v1 heating cable thermostat. Made a plug in board for that (don't call it shield) with a couple of TIL311s, 3 buttons, some pullup resistors and a socket for the 1821s.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_5JFl07VLeDw/TJOZGG0l9MI/AAAAAAAAAcM/PDomCUZy_A0/s1600/dsprog.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_5JFl07VLeDw/TJOZGG0l9MI/AAAAAAAAAcM/PDomCUZy_A0/s400/dsprog.jpg" alt="" id="BLOGGER_PHOTO_ID_5517922298648458434" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;On the underside is an incredible mess of cables that I'm not going to show.&lt;br /&gt;Buttons are Up, Down and OK&lt;br /&gt;&lt;br /&gt;First it asks for the TL, then the TH 1 digit each (settable 0-9).&lt;br /&gt;Then it'll display A0. with the 0 being switchable between 0 or 1. This is the POL (0 for heating 1 for cooling thermostat)&lt;br /&gt;B0 similarly is the thermostat mode (0 = 1wire sensor 1= thermostat)&lt;br /&gt;C0 is the negative setting. Since I'm only using 2 displays this is how I'm handling negative entry.&lt;br /&gt;C0 = neither value is negative&lt;br /&gt;C1 = TL is negative&lt;br /&gt;C2 = TH is negative&lt;br /&gt;C3 = Both are negative&lt;br /&gt;&lt;br /&gt;Once OK is pushed here it'll program the settings and display 00&lt;br /&gt;That's it!&lt;br /&gt;&lt;br /&gt;Spaghetti BASCOM code can be found &lt;a href="https://sites.google.com/site/praxisstuff/1821prog.txt?attredirects=0&amp;amp;d=1"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Any latching BCD display could be used in place of the TILs, these are just what I had lying around. Hookup can be determined from the source code. I have no schematics or pcb as I was just hooking stuff up on the fly and coding to adapt. Pullups needed for buttons and the 1wpwr and DQ pins. Most delays in the code are probably not needed.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;UPDATE:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Congrats if you've read this far. Two things I'd like to add. This is a sideproject from the more useful application of the DS1821: &lt;a href="http://www.karosium.com/2010/09/water-pipe-anti-freeze-heating-take-2.html"&gt;Keeping my pipes from freezing in during the winter.&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And I actually made two videos during the making of this that I didn't include because well.. They're dark and boring and I didn't think another blog(&lt;a href="http://hackedgadgets.com/"&gt;HackedGadgets&lt;/a&gt;) would pick up this particular project. Thanks Alan.&lt;/div&gt;&lt;div&gt;Well, here they are. If you're wondering no I didn't record it in the dark. Actually, the room was blasted with four 40W CFL tubes. This is just how bad my point-and-shoot is.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First one's just testing out the TILs counting 0-F on each. (and I called it shield.. d'oh!)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370" id="viddler_karosa_7"&gt;&lt;param name="movie" value="http://www.viddler.com/player/19e54c96/"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="flashVars" value="f=1&amp;amp;autoplay=f&amp;amp;disablebranding=f"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.viddler.com/player/19e54c96/" wmode="transparent" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_karosa_7" flashvars="f=1&amp;amp;autoplay=f&amp;amp;disablebranding=f"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Second one shows the programmer working&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;br /&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="370" id="viddler_karosa_8"&gt;&lt;param name="movie" value="http://www.viddler.com/player/bc5204d5/"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="flashVars" value="f=1&amp;amp;autoplay=f&amp;amp;disablebranding=f"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.viddler.com/player/bc5204d5/" wmode="transparent" width="437" height="370" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_karosa_8" flashvars="f=1&amp;amp;autoplay=f&amp;amp;disablebranding=f"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-2868641183371891633?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/4vXYxA48NaE" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/09/standalone-ds1821-thermostat-programmer.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_5JFl07VLeDw/TJOW-zD5jxI/AAAAAAAAAcE/XS8H7HRSKgc/s72-c/ds1821.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-3297592360610165212</guid><pubDate>Wed, 15 Sep 2010 13:28:00 +0000</pubDate><atom:updated>2010-09-25T08:42:29.255-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">water pipe heating avr attiny ds1821</category><title>Water Pipe Anti-Freeze Heating Take 2</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5JFl07VLeDw/S0MtpQ25oBI/AAAAAAAAAVM/JRa1aW-DzKw/s1600-h/heating_psu.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_5JFl07VLeDw/S0MtpQ25oBI/AAAAAAAAAVM/JRa1aW-DzKw/s400/heating_psu.jpg" alt="" id="BLOGGER_PHOTO_ID_5423228563207331858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;With winter approaching I decided to simplify my water pipe anti-freeze system. The initial project &lt;a href="http://www.karosium.com/2010/01/water-pipe-anti-freeze-heating.html"&gt;here&lt;/a&gt; used an ATMega8 and an I2C thermometer. I replaced that with a single &lt;a href="http://www.maxim-ic.com/datasheet/index.mvp/id/2794"&gt;DS1821&lt;/a&gt;. This small device looks like a transistor but is actually a thermometer chip capable of standalone thermostat operation once configured via 1Wire.&lt;p&gt;&lt;a href="http://1.bp.blogspot.com/_5JFl07VLeDw/TJDNIYY1LBI/AAAAAAAAAb8/sX7nwpN_k9A/s1600/heat_mark2.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 600px; height: 254px;" src="http://1.bp.blogspot.com/_5JFl07VLeDw/TJDNIYY1LBI/AAAAAAAAAb8/sX7nwpN_k9A/s800/heat_mark2.jpg" alt="" id="BLOGGER_PHOTO_ID_5517135087398104082" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;The DQ pin becomes a thermostat output pin, which in my case is then used to control a transistor which switches the Heating On LED and an optocoupler which then switches the ATX PSU. The system looks exactly the same from the outside and I'm not taking pictures of the inside as it's basically just the schematic above implemented on a piece of stripboard with the DS1821 at the end of some telephone cable running a few meters under the insulation putting the thermostat where the yellow tape is on the picture below.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/S0MtKN3MaVI/AAAAAAAAAVE/dwY62uwlDhw/s1600-h/pipe+heating.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 314px; height: 704px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/S0MtKN3MaVI/AAAAAAAAAVE/dwY62uwlDhw/s400/pipe+heating.jpg" alt="" id="BLOGGER_PHOTO_ID_5423228029827311954" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Note that the DS1821 is NOT a MicroLAN capable device, it doesn't support the protocol required for MicroLan enumeration/operation. It also cannot be connected to my 1-Wire &lt;a href="http://www.karosium.com/2010/03/fonera-1-wire-microlan-extension.html"&gt;MicroLan modded Fonera&lt;/a&gt;. To program it I used an ATTiny2313 and some ugly hacked-together &lt;a href="https://sites.google.com/site/praxisstuff/1821.txt?attredirects=0&amp;amp;d=1"&gt;piece of BASCOM code&lt;/a&gt;. The 1821 has to be hooked up according to the pins configured in the code (the bottom 3 pins on the left side of the chip by the way,  I basically just put 3 pins from an ic socket there to hot-swap the devices.) pullups then need to be added to DQ and Vcc(4.7kohm will do). Also configure the fusebits to use the internal osc of the ATTiny with the clock divider disabled, setting it to run at 8MHz.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The ATTiny's UART then needs to be connected to a PC. To program first issue a read command.&lt;/p&gt;&lt;p&gt;&gt;read&lt;br /&gt;temp:0&lt;br /&gt;conf:84&lt;br /&gt;TH:10&lt;br /&gt;TL:5&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This device is already configured for my pipe-heater. The temp will be 0 because we haven't issued a Start command to the chip. For info on the conf register byte consult the datasheet.&lt;br /&gt;TL is the low threshold TH is the high threshold.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;the set command configures the device. It'll just ask for TL and TH, then print out the read-back values for verification.&lt;/p&gt;&lt;p&gt;&gt;set&lt;br /&gt;TL:5&lt;br /&gt;TH:10&lt;br /&gt;5&lt;br /&gt;10&lt;/p&gt;&lt;p&gt;deploy then ends the configuration of the device&lt;/p&gt;&lt;p&gt;&gt;deploy&lt;br /&gt;POL1&lt;br /&gt;Thermo1&lt;/p&gt;&lt;p&gt;POL is the POL bit in the config register. It determines whether the Thermostat output is active-low or active-high. Simply put: you use POL0 for heating and POL1 for cooling.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thermo1 actually switches the device over into standalone thermostat mode. If you set 0 here the device will remain in 1Wire mode.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;When the device is in thermostat mode it can't communicate over 1Wire anymore unless a specific reset sequence is performed. The read command in the code automatically performs this sequence if the device doesn't respond. It will mark this with ".." so if you see .. .. .. .. it means the device isn't responding despite that and you should check your connections :)&lt;/p&gt;&lt;p&gt;As always, leave a comment if you end up building this.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-3297592360610165212?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/YK22lwvEz1s" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/09/water-pipe-anti-freeze-heating-take-2.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_5JFl07VLeDw/S0MtpQ25oBI/AAAAAAAAAVM/JRa1aW-DzKw/s72-c/heating_psu.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-2281023873271217876</guid><pubDate>Wed, 08 Sep 2010 09:22:00 +0000</pubDate><atom:updated>2010-09-08T02:34:56.353-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">usbasp usb avr isp programmer system</category><title>USBasp</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/TIdXPZHfC4I/AAAAAAAAAbg/GWrsxJATY14/s1600/usbasp_complete.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/TIdXPZHfC4I/AAAAAAAAAbg/GWrsxJATY14/s400/usbasp_complete.jpg" alt="" id="BLOGGER_PHOTO_ID_5514472190690397058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/TIdXDbx7LAI/AAAAAAAAAbY/YOjcF8EWSrs/s1600/usbasp_working.jpg"&gt;&lt;br /&gt;&lt;/a&gt;Just made an &lt;a href="http://www.fischl.de/usbasp/"&gt;USBasp&lt;/a&gt;. It's a USB AVR in-system programmer project by Thomas Fischl.  Used the PCB by  J.A. de Groot found on the USBasp project page. Had to add 2 missing zeners, but other than that the build was straightforward and problem-free.&lt;br /&gt;This programmer handles USB communication in firmware on an AtMega8 or 48.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5JFl07VLeDw/TIdXDGJ296I/AAAAAAAAAbQ/g6C6T5hn5B4/s1600/usbasp_zener.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_5JFl07VLeDw/TIdXDGJ296I/AAAAAAAAAbQ/g6C6T5hn5B4/s400/usbasp_zener.jpg" alt="" id="BLOGGER_PHOTO_ID_5514471979441649570" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Tested with ATTiny2313 and ATMega8 sofar. Works fine.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/TIdXDbx7LAI/AAAAAAAAAbY/YOjcF8EWSrs/s1600/usbasp_working.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 323px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/TIdXDbx7LAI/AAAAAAAAAbY/YOjcF8EWSrs/s400/usbasp_working.jpg" alt="" id="BLOGGER_PHOTO_ID_5514471985246841858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;No need to bother with the LPT port anymore.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-2281023873271217876?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/YVWgyH_rKFA" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/09/usbasp.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_5JFl07VLeDw/TIdXPZHfC4I/AAAAAAAAAbg/GWrsxJATY14/s72-c/usbasp_complete.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-6141729747717861392</guid><pubDate>Fri, 23 Jul 2010 14:17:00 +0000</pubDate><atom:updated>2010-07-23T07:39:27.973-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SLA lead acid vrla overdischarge undervoltage protector saver detector</category><title>Overcomplicated Battery Protector Take 2.</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5JFl07VLeDw/TEmo8M43-GI/AAAAAAAAAas/s835VPRPyEY/s1600/ocuc.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 293px;" src="http://3.bp.blogspot.com/_5JFl07VLeDw/TEmo8M43-GI/AAAAAAAAAas/s835VPRPyEY/s400/ocuc.jpg" alt="" id="BLOGGER_PHOTO_ID_5497110572387792994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My second take on the battery protector.&lt;br /&gt;The way it works now is: I added a simple monostable relay. The protection circuit itself is powered through that relay. Basically when connected to the battery, nothing happens. There's a push button switch between Battery + and the relay coil end designated to be the positive. When the button is pushed the relay switches on momentarily, the circuit becomes active and if the voltage is above threshold the FET continues to hold the relay on when the button is released. If not then there's nothing to keep the relay on so it just switches off.&lt;br /&gt;Since the FET is only driving the relay coil there's no heat dissipated there.&lt;br /&gt;Also no chance of oscillation: When the voltage dips below threshold the relay cuts out and that's that.&lt;br /&gt;Possible unnecessary and overkill, but whatever. It works.&lt;br /&gt;According to my cheapo DMM It consumes 50milliamps when holding the relay on, which translates to about a 0.6W average. I can live with that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-6141729747717861392?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/ujAwRZGAIHE" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/07/overcomplicated-battery-protector-take.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_5JFl07VLeDw/TEmo8M43-GI/AAAAAAAAAas/s835VPRPyEY/s72-c/ocuc.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-2936342531109548335</guid><pubDate>Fri, 16 Jul 2010 15:12:00 +0000</pubDate><atom:updated>2010-07-16T08:39:10.962-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">diy speaker housing woodworking</category><category domain="http://www.blogger.com/atom/ns#">amplifier amp</category><title>DIY Speakers Part 2.</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5JFl07VLeDw/TEB25p6vp9I/AAAAAAAAAaY/wQDQ0FrtX2M/s1600/spk4.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 293px;" src="http://4.bp.blogspot.com/_5JFl07VLeDw/TEB25p6vp9I/AAAAAAAAAaY/wQDQ0FrtX2M/s400/spk4.jpg" alt="" id="BLOGGER_PHOTO_ID_5494522278268872658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Done with them for now. Got a Tripath &lt;a href="http://www.alldatasheet.com/datasheet-pdf/pdf/87302/TRIPATH/TA2020-020.html"&gt;TA2020&lt;/a&gt;-based Chinese (Lepai) amp off eBay to use with these. Should get here in a couple of weeks. I chose this amp because: 1, The amplifier chip itself it worthy to be one of the &lt;a href="http://spectrum.ieee.org/semiconductors/processors/25-microchips-that-shook-the-world/5"&gt;25 chips that shook the world according to IEEE Spectrum&lt;/a&gt;. 2, There is a &lt;a href="http://www.diyaudio.com/forums/class-d/90500-lepai-t-amp-ta2020.html"&gt;thread&lt;/a&gt; on diyAudio detailing several all-around improvement mods for this particular amp. But most people seem to agree that it sound at least "pretty good" even without them (Though that certainly won't stop me from doing them). 3, It was cheap ($20 shipped)&lt;br /&gt;&lt;br /&gt;Should be interesting to compare to the &lt;a href="http://www.alldatasheet.com/datasheet-pdf/pdf/25037/STMICROELECTRONICS/TDA2004.html"&gt;TDA2004&lt;/a&gt; board I used for testing. Which I could describe in one word as: unspectacular.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-2936342531109548335?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/PEdcoNXH7GM" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/07/diy-speakers-part-2.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_5JFl07VLeDw/TEB25p6vp9I/AAAAAAAAAaY/wQDQ0FrtX2M/s72-c/spk4.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-6963159627016981907</guid><pubDate>Sun, 11 Jul 2010 21:16:00 +0000</pubDate><atom:updated>2010-07-11T14:34:15.714-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">diy speaker housing woodworking</category><title>DIY Speakers Part 1.</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/TDo3Qf1E-zI/AAAAAAAAAaA/Thl3RN-aEFQ/s1600/spk1.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 293px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/TDo3Qf1E-zI/AAAAAAAAAaA/Thl3RN-aEFQ/s400/spk1.jpg" alt="" id="BLOGGER_PHOTO_ID_5492763452093299506" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Housing made out of scrap (not to mention low quality, and pretty old) MDF from some trashy office furniture.  Cut the boards out with a jigsaw, screwed them together, filled the gaps with wood putty. Gave it a run with a power sander for good measure.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/TDo3TpUDBQI/AAAAAAAAAaI/bQtgZ9JTngY/s1600/spk2.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 293px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/TDo3TpUDBQI/AAAAAAAAAaI/bQtgZ9JTngY/s400/spk2.jpg" alt="" id="BLOGGER_PHOTO_ID_5492763506178721026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Upholstered them with some white fabric. (I know it's a bad choice, but it's what I could get for free and I don't intend to spend much on this ) I haven't decided yet whether I'll paint it over black.&lt;br /&gt;&lt;br /&gt;These are the speakers that will go in there. They're some leftover "5way" car speakers with a "ProAudio" brand.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5JFl07VLeDw/TDo3zC77j9I/AAAAAAAAAaQ/TU4F8mDZWrw/s1600/spk3.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 293px;" src="http://4.bp.blogspot.com/_5JFl07VLeDw/TDo3zC77j9I/AAAAAAAAAaQ/TU4F8mDZWrw/s400/spk3.jpg" alt="" id="BLOGGER_PHOTO_ID_5492764045632835538" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-6963159627016981907?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/CrNds8Vccc4" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/07/diy-speakers-part-1.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_5JFl07VLeDw/TDo3Qf1E-zI/AAAAAAAAAaA/Thl3RN-aEFQ/s72-c/spk1.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-3924513148948230567</guid><pubDate>Sun, 11 Jul 2010 20:53:00 +0000</pubDate><atom:updated>2010-07-20T06:36:02.235-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SLA lead acid vrla overdischarge undervoltage protector saver detector</category><title>Lead-Acid Battery Overdischarge Protector</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5JFl07VLeDw/TDozoK1OSyI/AAAAAAAAAZw/jg1FIo69Fss/s1600/SLAProtector.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 272px;" src="http://3.bp.blogspot.com/_5JFl07VLeDw/TDozoK1OSyI/AAAAAAAAAZw/jg1FIo69Fss/s400/SLAProtector.jpg" alt="" id="BLOGGER_PHOTO_ID_5492759460727114530" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Don't really have a schematic for this small project. I had an &lt;a href="http://www.intusoft.com/onsemipdfs/mc34161.rev5.pdf"&gt;MC34161&lt;/a&gt; (datasheet PDF link) &lt;s&gt;glorified comparator&lt;/s&gt; voltage monitor IC in an old inverter PSU that I decided to re-use to protect a single SLA battery against over-discharge. Only one voltage monitor channel is used, and the chip is configured to be an overvoltage detector.  The open collector output it pulled high with a random resistor and it's connected to the gate input of a random N channel FET. The MC34161 is calibrated with a precision trim-pot (not the one in the picture, I replaced that because the threshold would crawl 0.5V just by blowing on it :) ) to detect overvoltage at around 10.6V. At which point it'll switch the FET enabling the output terminals.  If the voltage sinks below 10.6V it'll disconnect the battery from the output. (overvoltage condition disappears)&lt;br /&gt;&lt;br /&gt;I actually haven't tested whether the chip's built-in hysteresis is enough to prevent oscillation yet (large load on battery -&gt; battery discharges below 10.6V -&gt; battery is disconnected -&gt; battery voltage rebounds ? -&gt; ? above hysteresis threshold -&gt; repeat until something melts/breaks/explodes)&lt;br /&gt;This is obviously something to avoid. It's probably not a issue for me because it doesn't matter for the devices I'll be powering off this battery. (I'd just realize what's going on and power them off) but it's something to keep in mind in case anyone builds something similar based on this chip.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;UPDATE:&lt;/b&gt; Ok, you probably shouldn't build this unless you use an extremely low RDS-on FET or something. I'll be modifying this to work as an undervoltage detector and to use a bistable relay when I have the time. This'll also have the advantage of solving the hysteresis issue (the relay will just switch off when the undervoltage detector triggers it). If I set up the chip as a dual detector I could use it to switch the relay back on when the voltage rises above say.. 13 volts. I'll either do that, or just add a "reset protection" button if I'm lazy. (I'll probably just do that)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-3924513148948230567?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/qnSw6c-yYjA" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/07/lead-acid-battery-overdischarge.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_5JFl07VLeDw/TDozoK1OSyI/AAAAAAAAAZw/jg1FIo69Fss/s72-c/SLAProtector.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-147301792290082051</guid><pubDate>Sun, 21 Mar 2010 13:25:00 +0000</pubDate><atom:updated>2010-03-21T07:17:26.167-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">fonera 1wire onewire lcd interface</category><title>Fonera 1-wire continued... The Display</title><description>OWFS supports HD44780 character LCDs on the 1-wire bus. The most common interface is with a DS2408 8-pin GPIO to 1-Wire chip.  The interface from &lt;a href="http://www.hobby-boards.com/catalog/howto_lcd_driver.php?referer=product_info.php?products_id=1505"&gt;hobby-boards&lt;/a&gt; runs the display in 4-bit mode, so 3 GPIO lines are left over for buttons and whatnot.  I based my design on their &lt;a href="http://www.hobby-boards.com/catalog/links/lcd2-r1/LCD%20Driver%20v2.0%20Schematic.pdf"&gt;schematic&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5JFl07VLeDw/S6Ymj06oaWI/AAAAAAAAAYA/IkmRktTTkuc/s1600-h/lcdbrd.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 293px;" src="http://4.bp.blogspot.com/_5JFl07VLeDw/S6Ymj06oaWI/AAAAAAAAAYA/IkmRktTTkuc/s400/lcdbrd.jpg" alt="" id="BLOGGER_PHOTO_ID_5451086795920402786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The SOIC8 is an NE555 in monostable mode. It provides timed backlight control. When a button is pressed the backlight will stay on for about 20 seconds then turn off.&lt;br /&gt;&lt;br /&gt;OWFS (theoretically) supports this interface with the LCD_H module.&lt;br /&gt;In ideal-land I'd hook up my hobby-boards clone and type&lt;br /&gt;printf "Hello World"&gt;/ow/29.xxxxxxxxxx/LCD_H/message&lt;br /&gt;and that would actually work. Well, as it turns out: Not so much.&lt;br /&gt;&lt;br /&gt;It would seem that OWFS 2.7p13-1 has a broken LCD_H module. I've tested with 2.6.5 in an Ubuntu VM where it worked fine.  With 2.7p13-1 however, all I got was garbage for the output.&lt;br /&gt;There's a bug report &lt;a href="http://www.mail-archive.com/owfs-developers@lists.sourceforge.net/msg03642.html"&gt;here&lt;/a&gt;, that may or may not describe the same issue. If it does then it would seem that the bug has been ignored for several years. Nice!&lt;br /&gt;&lt;br /&gt;Problem is I'm not ready to devote days to building a crosscompile environment for mips/OpenWrt because of some random bug. Since byte-based access to the GPIO-port worked it was faster to just re-implement the protocol. Which I did..&lt;a href="http://sites.google.com/site/praxisstuff/1wphp.txt"&gt; in PHP..&lt;/a&gt; (it's just a testing script at this point, so adapt as needed if you wish to use it. Should be easy to figure out.)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5JFl07VLeDw/S6YqAWD3czI/AAAAAAAAAYI/neG6ScRao9I/s1600-h/1wlcd_ok.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 293px;" src="http://1.bp.blogspot.com/_5JFl07VLeDw/S6YqAWD3czI/AAAAAAAAAYI/neG6ScRao9I/s400/1wlcd_ok.jpg" alt="" id="BLOGGER_PHOTO_ID_5451090584388727602" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-147301792290082051?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/nCacK3ICSh0" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/03/fonera-1-wire-continued-display.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_5JFl07VLeDw/S6Ymj06oaWI/AAAAAAAAAYA/IkmRktTTkuc/s72-c/lcdbrd.jpg" height="72" width="72" /><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-6796459664146054628</guid><pubDate>Thu, 18 Mar 2010 16:10:00 +0000</pubDate><atom:updated>2010-03-18T09:19:27.476-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">fonera 1wire onewire hub interface</category><title>Fonera 1-wire continued.. The Hub</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/S6JQ4Rl8blI/AAAAAAAAAX4/fItcqIohTjQ/s1600-h/1whub.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 293px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/S6JQ4Rl8blI/AAAAAAAAAX4/fItcqIohTjQ/s400/1whub.jpg" alt="" id="BLOGGER_PHOTO_ID_5450007426797170258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;5port dumb 1-Wire hub. Made from a 5-way RJ11 splitter.&lt;br /&gt;I also added a DC connector to allow powering non bus-powered devices from the same RJ connectors.&lt;br /&gt;PIN1 is external Power&lt;br /&gt;PIN2 &amp;amp; 3 are 1-Wire and GND&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-6796459664146054628?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/qTkFmzIGVaQ" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/03/fonera-1-wire-continued-hub.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_5JFl07VLeDw/S6JQ4Rl8blI/AAAAAAAAAX4/fItcqIohTjQ/s72-c/1whub.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-6264966570561866641</guid><pubDate>Wed, 17 Mar 2010 14:49:00 +0000</pubDate><atom:updated>2010-03-17T07:58:17.609-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">glass bottle cutting resistance heating wire</category><title>Hot wire glass bottle cutter</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5JFl07VLeDw/S6Dsx25DozI/AAAAAAAAAXw/gz3h-t5CJvg/s1600-h/cutter.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 293px;" src="http://1.bp.blogspot.com/_5JFl07VLeDw/S6Dsx25DozI/AAAAAAAAAXw/gz3h-t5CJvg/s400/cutter.jpg" alt="" id="BLOGGER_PHOTO_ID_5449615890410873650" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In a surge of boredom I did a search for glass bottle cutting. I found &lt;a href="http://mikegigi.com/bottle.htm"&gt;this page&lt;/a&gt;. That shows a hot-wire bottle cutter. I cloned the design. It's basically a laminate board with a couple of screws and nuts, a spring and some NiChrome wire.&lt;br /&gt;&lt;br /&gt;I used an old AT PSU to heat up the wire. The 5v rail is loaded with a 20-something ohm 10W resistor that can't be seen on the photo. (A load on 5V is needed to stabilize the 12V rail)&lt;br /&gt;&lt;br /&gt;It works reasonably well.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5JFl07VLeDw/S6DsOxnDGwI/AAAAAAAAAXo/EEiQt1VRRl4/s1600-h/cutter02.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 191px; height: 400px;" src="http://1.bp.blogspot.com/_5JFl07VLeDw/S6DsOxnDGwI/AAAAAAAAAXo/EEiQt1VRRl4/s400/cutter02.jpg" alt="" id="BLOGGER_PHOTO_ID_5449615287697742594" border="0" /&gt;&lt;/a&gt;Precision depends on how straight you can get the wire around the bottle without shorting it. The rim still needs a lot of tedious work to complete a viable drinking glass which I'm definitely too lazy to do. But it was worth the 5 minutes it took to build it.&lt;br /&gt;&lt;br /&gt;I might come up with a rim auto-sanding contraption in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-6264966570561866641?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/BbYIdTx_Sns" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/03/hot-wire-glass-bottle-cutter.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_5JFl07VLeDw/S6Dsx25DozI/AAAAAAAAAXw/gz3h-t5CJvg/s72-c/cutter.jpg" height="72" width="72" /><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-5332828118507316857</guid><pubDate>Sat, 06 Mar 2010 15:19:00 +0000</pubDate><atom:updated>2010-03-09T08:16:08.681-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">fonera 1wire ibutton onewire ds2480 microlan</category><title>Fonera 1-wire MicroLAN extension</title><description>I wanted to add a 1-wire bus to one of my Foneras. I already flashed it to DD-WRT some time ago, but realized that I can't disable the serial system console or the shell so there's no way to use the serial port for anything else. I searched around and it seemed like &lt;a href="http://www.gargoyle-router.com/"&gt;Gargoyle&lt;/a&gt; might be a better solution. It's a firmware based on &lt;a href="http://openwrt.org"&gt;OpenWRT&lt;/a&gt;. I flashed it, only to realize that the same restriction applies to the system console part. It seems all Fonera firmwares ignore the kernel command string set in RedBoot and just work with a hardcoded one. Which usually contains console=/dev/ttyS0 making the serial port useless.&lt;br /&gt;A post on the Gargoyle forums refers me to setconsole, which isn't included in either version (stable/testing) anymore. I tried with several setconsole compiles of my own only to get an assortment of error messages. Because compiling a whole new firmware is entirely too much of a pain for something as simple as freeing up a serial port i ended up unpacking the kernel image and modifying the hardcoded string with a hex editor. Then repacking, padding, and flashing the modified image to the Fonera. (modify the string to console=/dev/null)&lt;br /&gt;The &lt;a href="http://www.7-zip.org/sdk.html"&gt;LZMA SDK from 7zip&lt;/a&gt; can be used for the compression.&lt;br /&gt;Make note of the kernel image size before unpacking, and pad with null bytes to that exact size after repack. This is not optional. Flashing will fail otherwise.&lt;br /&gt;&lt;br /&gt;This worked, so I proceeded to disable the shell in /etc/inittab making the serial port usable again.&lt;br /&gt;Thanks to the OpenWRT roots the rest was pretty easy on the software side.&lt;br /&gt;the commands&lt;br /&gt;opkg update&lt;br /&gt;opkg install owfs&lt;br /&gt;opkg install owhttpd&lt;br /&gt;gave me all the tools I needed to work with 1-wire.&lt;br /&gt;And ..&lt;br /&gt;opkg install php4-cli&lt;br /&gt;opkg install php4-mod-gd&lt;br /&gt;gave me what I needed to code up web interfaces.&lt;br /&gt;&lt;br /&gt;The CLI compile is required because the CGI one is Apache specific. Gargoyle has a small httpd lacking most of Apache's features. The CGI compile will error out however the CLI release can be made to work. There are certain annoyances like a missing $_GET/$_POST and the requirement to send a \n before page content and after headers, but they are not that serious.&lt;br /&gt;( to fix get: parse_str($SERVER["QUERY_STRING"],$_GET) )&lt;br /&gt;&lt;br /&gt;On the hardware side I opted to use a &lt;a href="http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2923"&gt;DS2480B&lt;/a&gt; 1-Wire Line Driver chip. This chip is used in the DS9097U adapters so it's basically the standard in UART to 1-Wire interfacing. I wanted to include fancy things on the board like a software controlled power switch and an activity LED, but in the end I  abandoned both. The power switch didn't work out, and the LED was pretty useless due to the low activity on the bus. Because of this the original board is ugly and overkill.  It is however extremely simple to hook this chip up. There are no external component requirements. POL VPP and VDD needs to be connected to together. Rest is obvious. (TXD,RXD, 1-w DQ and GNDs to appropriate holes/solderpads on the interface board, then TXD,RXD,GND to Fonera, and DQ and GND to some sort of connector for the 1-Wire bus. You can also get the 5V for the interface board by soldering to the Fonera's  PSU connector)&lt;br /&gt;Here's a simplified interface board:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/S5YnSq5jSzI/AAAAAAAAAW4/4MRcGR-Cwl4/s1600-h/1ws.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 345px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/S5YnSq5jSzI/AAAAAAAAAW4/4MRcGR-Cwl4/s400/1ws.jpg" alt="" id="BLOGGER_PHOTO_ID_5446584001057999666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;eagle brd &lt;a href="http://sites.google.com/site/praxisstuff/1w_simple.brd"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;I opted to use an RJ9 connector simply because I had one on hand, and because it fit right next to the Ethernet's RJ45.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5JFl07VLeDw/S5YlFRk_fnI/AAAAAAAAAWw/Y1ZWm4jDDiQ/s1600-h/microlanfon.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 205px;" src="http://1.bp.blogspot.com/_5JFl07VLeDw/S5YlFRk_fnI/AAAAAAAAAWw/Y1ZWm4jDDiQ/s400/microlanfon.jpg" alt="" id="BLOGGER_PHOTO_ID_5446581571899326066" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;You might want to consider including the Fonera's 5V on your connector. It could become handy if you want to attach non-parasitic devices in the future. I opted not to do so. I will be building a "powered hub" out of a 5way phone-line splitter later.&lt;br /&gt;&lt;br /&gt;For testing I used iButtons hooked up as seen below.&lt;br /&gt;RJ11 Blue dot receptor -&gt; Ghetto RJ9&lt;-&gt;RJ11 cable -&gt; Fonera&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5JFl07VLeDw/S5Yk-3zYsnI/AAAAAAAAAWo/YH7OfmkIOUw/s1600-h/1w_fonera3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_5JFl07VLeDw/S5Yk-3zYsnI/AAAAAAAAAWo/YH7OfmkIOUw/s400/1w_fonera3.jpg" alt="" id="BLOGGER_PHOTO_ID_5446581461901161074" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Simple OWFS testing: (connecting and removing iButton)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5JFl07VLeDw/S5YqcNcjp5I/AAAAAAAAAXI/kcAAEqBHFmI/s1600-h/owfs.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 252px;" src="http://4.bp.blogspot.com/_5JFl07VLeDw/S5YqcNcjp5I/AAAAAAAAAXI/kcAAEqBHFmI/s400/owfs.jpg" alt="" id="BLOGGER_PHOTO_ID_5446587463485335442" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Success!&lt;br /&gt;Now I have a LAN/WLAN/MicroLAN router :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-5332828118507316857?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/WYoO0WCqUlU" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/03/fonera-1-wire-microlan-extension.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_5JFl07VLeDw/S5YnSq5jSzI/AAAAAAAAAW4/4MRcGR-Cwl4/s72-c/1ws.jpg" height="72" width="72" /><thr:total>29</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-7657003174282664222</guid><pubDate>Tue, 23 Feb 2010 16:52:00 +0000</pubDate><atom:updated>2010-03-03T03:56:02.695-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">eee car charger SLA LDO switching regulator</category><title>EEE Car Charger</title><description>I have an Eee 701 that I find extremely practical to have around. About a week ago I needed a car charger for the machine, and decided to buy one. There doesn't seem to be much choice in the matter. You either go with Asus's $50+ thing or get a chinese one. I got a chinese one, which lasted all of 30 minutes. It got extremely hot, then blew the fuse.  I replaced it with a new one, which it immediately blew out as well. When I got home after some considerable trouble I took the damn thing apart (It was partly glued, yay.)  and was staring down at a switch-mode DC DC converter.&lt;div&gt;I tried replacing pretty much every component besides the PWM controller chip but it still kept blowing the fuse.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I gave up shortly afterward and decided to build a PSU myself. I wanted to use things I had on hand so I went with the MAX668 that I used in the &lt;a href="http://www.karosium.com/2009/09/running-laptop-off-single-lead-acid.html"&gt;Laptop powered from SLA project&lt;/a&gt;. This is a Step-Up converter but it supports a SEPIC topology which would make it work in both Step-Up and Step-Down modes.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5JFl07VLeDw/S4voTgj0fOI/AAAAAAAAAWI/ZKe9Ph2124g/s1600-h/SEPIC_1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 300px; height: 400px;" src="http://4.bp.blogspot.com/_5JFl07VLeDw/S4voTgj0fOI/AAAAAAAAAWI/ZKe9Ph2124g/s400/SEPIC_1.jpg" alt="" id="BLOGGER_PHOTO_ID_5443699996462709986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I designed the board, carefully hand-wound the SEPIC dual-power inductor, soldered it all together&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/S4voeCx8ceI/AAAAAAAAAWQ/iuI-E_alPP4/s1600-h/SEPIC_2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 300px; height: 400px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/S4voeCx8ceI/AAAAAAAAAWQ/iuI-E_alPP4/s400/SEPIC_2.jpg" alt="" id="BLOGGER_PHOTO_ID_5443700177447449058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And failed miserably in my attempts to get it working right.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I've tried 3 different FETs, 5 different inductors (both dual windings and separate cores), 4 different filter cap configurations, 3 different SEPIC coupling capacitors and 3 different Schottky diodes. I've replaced ALL of the components at least three times, yet my best result was an over 4Volt drop with a 2 Amp load. To sum it up in one word "Useless". At this point I wasted 2 days trying to track down the problem. I've compared the board layout to the schematic, and the schematic to example designs about a dozen times and I couldn't find the reason for the drop. I was not ready to waste any more time on it.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Determined to not waste more money either, especially on a chinese charger that might last under an hour again I asked around and managed to get a UA78HGASC part. This blast from the past is an adjustable 5 Amp &lt;a href="http://en.wikipedia.org/wiki/Low-dropout_regulator"&gt;Low-Drop-Out Linear Regulator&lt;/a&gt; in the TO-3 package. I've seen it mentioned in hobby electronics publications  from 1987. From what I understand it's also a relatively rare part.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5JFl07VLeDw/S4vpvNqCa_I/AAAAAAAAAWY/1OjoaA3biGs/s1600-h/LDO.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_5JFl07VLeDw/S4vpvNqCa_I/AAAAAAAAAWY/1OjoaA3biGs/s400/LDO.jpg" alt="" id="BLOGGER_PHOTO_ID_5443701571936480242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;For anyone who'd slam this because LDOs are inefficient consider the following.&lt;br /&gt;According to &lt;a href="http://www.national.com/nationaledge/feb06/article.html"&gt;this&lt;/a&gt; LDO efficiency equation:&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:'Times New Roman';font-size:medium;"  &gt;&lt;span class="Apple-style-span" style="color: rgb(68, 68, 68); line-height: 14px;font-family:arial,verdana,geneva,helvetica,sans-serif;font-size:12px;"  &gt;% Efficiency = [(V&lt;sub style="margin: 0px; padding: 0px; font-size: 8px;"&gt;OUT&lt;/sub&gt;) / (V&lt;sub style="margin: 0px; padding: 0px; font-size: 8px;"&gt;IN&lt;/sub&gt;)] * 100&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;The efficiency of this circuit, if we use 13V for Vin (as a voltage average for SLA) and 9.8V for Vout, is around 75%.&lt;br /&gt;Theoretically a 90% efficiency can be achieved with switching regulators. A measured efficiency of around 80% was achieved by the good people who've come up with the reference designs for MAX668 SEPIC configurations. (The efficiency also declines as the load increases, but let's not think about that) So around 80% using Ultra Low RDS-On FETs, Ultra-Low ESR capacitors and taking all board design rules and recommendations into account. I have neither of those custom components, and buying them would cost more than a chinese car charger. Not to mention that I can't even BUY the kinds of ceramic caps that most of the reference designs require. It is because of this that I probably can't achieve efficiency even close to 80% with a home-built switching regulator. BUT let's say I did. Even then is 5% worth all the extra trouble/time/components?&lt;br /&gt;&lt;br /&gt;So back to the LDO.&lt;br /&gt;I had the perfect project box for this. The heat sink fit perfectly on top of it. I soldered it all together. It only needs 2 small caps and 2 resistors, as opposed to all the things a switching circuit does. I just put those on a piece of &lt;a href="http://en.wikipedia.org/wiki/Stripboard"&gt;stripboard&lt;/a&gt;. Set the voltage. Did a load test at 50Watts. Voltage Drop.. 0.06 Volts. Things were looking great. I plug it in and... the Eee doesn't charge.&lt;/div&gt;&lt;div&gt;At this point I was close to setting both attempts and the Chinese charger on fire but on a whim I measured the voltage on the SLA battery I was using for testing and I got 14 Volts. Wait.. what? 14Volts is too much even for a fully charged &lt;a href="http://en.wikipedia.org/wiki/VRLA_battery#Absorbent_glass_mat_.28AGM.29"&gt;AGM SLA&lt;/a&gt;, and this one was nowhere near fully charged.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So after the inevitable realization that my multimeter is measuring around 1.5volts more than the actual voltage of things because it's battery was dead, and raising the output voltage of the regulator accordingly the Eee gave in and started charging like it should. Finally.. after several days I had a car-charger.  I don't know about other laptops or netbooks but the Eee 701s can run off their chargers with the battery removed. This also effectively turns this charger into a way to run the Eee off an SLA battery directly.&lt;br /&gt;&lt;br /&gt;I feel that I should add a little bit of info on the Eee charging voltage.&lt;br /&gt;On the sticker, and on the AC charger it says 9.5V @ 2.135A.&lt;br /&gt;This is wrong. In fact something around 9.8 is preferred, and that's still 0.2Volts LESS than the AC charger outputs while running the Eee directly off it, without a battery.&lt;br /&gt;Other people have also confirmed that their AC chargers drop only to around 9.8 - 10 Volts while powering the Eee. In fact, it seems like anything below 9.8 is insufficient (Eee shuts down, charging led blinks on-off). Best way to make sure is to measure the charger voltage while running the machine off it. YMMV but 9.8 worked out perfectly for me.&lt;br /&gt;&lt;br /&gt;The end result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/S45OO6c-uYI/AAAAAAAAAWg/8UYchTrj2m8/s1600-h/eeechg.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 267px; height: 400px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/S45OO6c-uYI/AAAAAAAAAWg/8UYchTrj2m8/s400/eeechg.jpg" alt="" id="BLOGGER_PHOTO_ID_5444375017653451138" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-7657003174282664222?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/HgGh7T4xfHI" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/02/eee-car-charger.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_5JFl07VLeDw/S4voTgj0fOI/AAAAAAAAAWI/ZKe9Ph2124g/s72-c/SEPIC_1.jpg" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3030619748984253626.post-1402663587443843212</guid><pubDate>Mon, 01 Feb 2010 12:13:00 +0000</pubDate><atom:updated>2010-09-20T08:46:36.018-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">water pipe heating avr atmega microcontroller</category><title>Water Pipe Anti-Freeze Heating</title><description>&lt;div&gt;&lt;b&gt;UPDATE&lt;/b&gt;:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check out V2 of this project &lt;a href="http://www.karosium.com/2010/09/water-pipe-anti-freeze-heating-take-2.html"&gt;here&lt;/a&gt;. Simpler and much less overkill :)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;hr /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;We have 2 buildings on our property: the house and an office building. Between the two is a semi-open garage. Through this garage runs the water pipe to the office building which is exposed to outside temperatures.&lt;br /&gt;The usual procedure for this pipe during winter was to completely drain and disconnect it so that it doesn't freeze in.  This has become somewhat of a pain as I needed the water during winter so solving this has become a project of mine.&lt;br /&gt;I managed to acquire a bit of heating cable that I could run in pair along the length of the pipe.&lt;br /&gt;One "channel" at 12volts came out to about 47ish Watts for the entire length of the cable.&lt;br /&gt;I wasn't sure at first if this would suffice, but I gave it a try. The heating cable was taped to the underside of the pipe with PVC tape and copper tape where I assumed it would matter (I would've done it with copper tape along the entire length but it's expensive :) ) The pipe was then covered in foam insulation.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/S0MtKN3MaVI/AAAAAAAAAVE/dwY62uwlDhw/s1600-h/pipe+heating.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 314px; height: 704px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/S0MtKN3MaVI/AAAAAAAAAVE/dwY62uwlDhw/s400/pipe+heating.jpg" alt="" id="BLOGGER_PHOTO_ID_5423228029827311954" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;A DS1621 temp. probe was installed (marked with yellow tape on the picture) on the top of the pipe. (The heating cable running at the bottom should ensure that the probe isn't being heated directly by the cable, which would make measurements useless.)&lt;br /&gt;Both the cable for the probe and the heating cable go into the boiler room that is accessible from the garage.&lt;br /&gt;I designed a controller from what I had on hand. An old ATX PSU and an ATMega8(overkill). The AtMega is powered by the standby voltage of the PSU (5VSB). PSON is connected to PORTB.0 so the AtMega can switch the ATX PSU ON or OFF depending on temperature. (The PSU turns on when PSON is pulled low). The heating cables are hooked up to a 4pin Molex Connector.&lt;br /&gt;&lt;br /&gt;I admit I didn't make exact measurements of the pipe temperature with the heating on, but the day after I finished this project we had -16 degrees Celsius and the pipe didn't freeze in. Good enough test for me, as we didn't have anything colder in the past 10 years. The controller sits on top of the ATX psu&lt;br /&gt;in a cheap electrical box. 2 LEDs were installed, one shows that there's standby voltage, the other is a heating status / error led.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5JFl07VLeDw/S0MtpQ25oBI/AAAAAAAAAVM/JRa1aW-DzKw/s1600-h/heating_psu.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_5JFl07VLeDw/S0MtpQ25oBI/AAAAAAAAAVM/JRa1aW-DzKw/s400/heating_psu.jpg" alt="" id="BLOGGER_PHOTO_ID_5423228563207331858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I use only 1 channel for now, since it seems to have been enough to keep the pipe from freezing in at -16C. The other channel is used as a load for the 5v rail of the PSU (at 5V it doesn't provide much in terms of heating) As it turns out, the 5V rail has to be loaded to stabilize the 12V rail, otherwise there will be huge voltage drop.&lt;br /&gt;&lt;br /&gt;The DS1621 was actually a thermostat IC and I was considering using it in a standalone configuration but sadly that can't be done as the thermostat&lt;br /&gt;functionality doesn't start until a "Start Convert" command is sent to the chip through I2c. That meant a microcontroller was mandatory, so instead of&lt;br /&gt;relying on the internal functionality of the chip I just implemented the thermostat function in code. This also meant I only had to run 4 wires from the&lt;br /&gt;temp probe instead of 5, and I had 4 wire telephone cable lying around.&lt;br /&gt;&lt;br /&gt;One could use an Arduino for this, or any other dev board. Since I had an ATmega8 lying around, and my 2051 programmer was out of commission I used that. If I need the Mega8 in the future I'll probably end up replacing the controller with a 2051.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update Feb. 01:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A few days ago I noticed some weirdness while running the tap, so I checked on the controller. The LED was flashing meaning there was an error condition, and the heating was off. The pipe was beginning to freeze in. There were 2 possible places in the code that could produce that. Either the temp. probe didn't respond or a measurement returned a value greater than 25C (which would be a bad measurement as temperatures were mostly sub-zero that day).  It was probably a random hiccup as it continued to work fine after a power cycle. This however convinced me that the code needed to be more resilient. So now it retries if the temp. probe doesn't answer or if the measurement is out of bounds. Only after 3 subsequent failures does it go into the error condition. I also added a speaker that beeps out an error code if that happens, making it easier to notice. I took a picture of the controller after I reflashed it with the new version. It has become somewhat of wiring chaos, especially now that the speaker was added. The board design is a modification of &lt;a href="http://www.youritronics.com/atmega8-development-board/"&gt;this project&lt;/a&gt;. I didn't intend to use it here. It just happened to be the easiest solution at the time.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/S2bZ-DeJHSI/AAAAAAAAAVY/gHntcRWM7SA/s1600-h/heating_p2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/S2bZ-DeJHSI/AAAAAAAAAVY/gHntcRWM7SA/s400/heating_p2.jpg" alt="" id="BLOGGER_PHOTO_ID_5433269660575931682" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;And the speaker on a strip of mounting tape:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5JFl07VLeDw/S2bax-z2w6I/AAAAAAAAAVg/Fh4OkduNLL0/s1600-h/spk.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_5JFl07VLeDw/S2bax-z2w6I/AAAAAAAAAVg/Fh4OkduNLL0/s400/spk.jpg" alt="" id="BLOGGER_PHOTO_ID_5433270552678024098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;You can find the controller code &lt;a href="http://sites.google.com/site/praxisstuff/heating_cable_thermostat.bas"&gt;here&lt;/a&gt;. (BASCOM/AVR)&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3030619748984253626-1402663587443843212?l=www.karosium.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Karosium/~4/52jFGynjFIo" height="1" width="1"/&gt;</description><link>http://www.karosium.com/2010/01/water-pipe-anti-freeze-heating.html</link><author>noreply@blogger.com (Viktor)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_5JFl07VLeDw/S0MtKN3MaVI/AAAAAAAAAVE/dwY62uwlDhw/s72-c/pipe+heating.jpg" height="72" width="72" /><thr:total>3</thr:total></item></channel></rss>

