<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7140922047377970601</id><updated>2012-02-16T06:05:51.068-08:00</updated><category term='frs'/><category term='AVR'/><category term='text message'/><category term='radio'/><category term='walkie-talkie'/><category term='teletype'/><category term='wireless'/><title type='text'>Why buy it when you can build it?</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://takethingsapart.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7140922047377970601/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://takethingsapart.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Travers Buda</name><uri>http://www.blogger.com/profile/04076931107581418547</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7140922047377970601.post-6292234354961846438</id><published>2010-07-05T11:55:00.000-07:00</published><updated>2010-09-15T15:47:18.441-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='walkie-talkie'/><category scheme='http://www.blogger.com/atom/ns#' term='radio'/><category scheme='http://www.blogger.com/atom/ns#' term='frs'/><category scheme='http://www.blogger.com/atom/ns#' term='teletype'/><category scheme='http://www.blogger.com/atom/ns#' term='wireless'/><category scheme='http://www.blogger.com/atom/ns#' term='text message'/><category scheme='http://www.blogger.com/atom/ns#' term='AVR'/><title type='text'>Text messages over walkie-talkies</title><content type='html'>&lt;span style="color: black; font-size: 100%;"&gt;For my 12&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;th&lt;/span&gt; birthday, my dad got me a pair of Radio Shack&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;FRS&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;walkie&lt;/span&gt;-talkies. They never did get much use after our initial range test (2km, LOS) and have been sitting around in various drawers ever since. Here's what they look like:&lt;/span&gt;  &lt;a href="http://2.bp.blogspot.com/_mWBCc8h66bU/TDIyhfOo3bI/AAAAAAAAAAM/fblG7ZZSAEw/s1600/P1010020.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" style="color: black;"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5490506446618025394" src="http://2.bp.blogspot.com/_mWBCc8h66bU/TDIyhfOo3bI/AAAAAAAAAAM/fblG7ZZSAEw/s320/P1010020.JPG" style="cursor: pointer; height: 240px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;So, what to do with a pair of unused &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;walkie&lt;/span&gt;-talkies? &lt;span style="font-weight: bold;"&gt;Send text messages with them, of course!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Step 1: take 'em apart.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_mWBCc8h66bU/TDI1QY4NlBI/AAAAAAAAAAU/y4PTKu8WtJ0/s1600/P1010026.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" style="color: black;"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5490509451390456850" src="http://3.bp.blogspot.com/_mWBCc8h66bU/TDI1QY4NlBI/AAAAAAAAAAU/y4PTKu8WtJ0/s320/P1010026.JPG" style="cursor: pointer; height: 240px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Notice all those nice pads to solder onto? I ended up using power, speaker, and the power switch pads. Transmission is hooked up with a microphone jack. Channel select, etc are just left static.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;The cases got a bit trashed in the process of taking the circuit boards out. It would have been nice to keep them around, however. It could have been possible to just plug into the radios' microphone and headphone jacks, they could have been driven exclusively via these. Then, the radios could be disconnected from the text transceiver circuit and used "normally" for other activities.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_mWBCc8h66bU/TDJJNCbce9I/AAAAAAAAABE/hiVZ2IIcnEY/s1600/P1010027.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" style="color: black;"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5490531384057166802" src="http://1.bp.blogspot.com/_mWBCc8h66bU/TDJJNCbce9I/AAAAAAAAABE/hiVZ2IIcnEY/s320/P1010027.JPG" style="cursor: pointer; height: 240px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;A bit of damage to the case.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Step 2: Build a circuit for interfacing.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_mWBCc8h66bU/TDI2li0xN8I/AAAAAAAAAAc/xbEq0QEvc0U/s1600/P1010090.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" style="color: black;"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5490510914349250498" src="http://4.bp.blogspot.com/_mWBCc8h66bU/TDI2li0xN8I/AAAAAAAAAAc/xbEq0QEvc0U/s320/P1010090.JPG" style="cursor: pointer; height: 240px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Here's a bit closer up:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_mWBCc8h66bU/TDI2yDan1nI/AAAAAAAAAAk/RbNjM_1m_k0/s1600/P1010091.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" style="color: black;"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5490511129256384114" src="http://4.bp.blogspot.com/_mWBCc8h66bU/TDI2yDan1nI/AAAAAAAAAAk/RbNjM_1m_k0/s320/P1010091.JPG" style="cursor: pointer; height: 240px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Top left is a 5v linear power supply. Top center is an &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;Atmel&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;AVR&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;ATMEGA&lt;/span&gt;88PA &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;MCU&lt;/span&gt;. Top right is a MAX232 for converting &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;TTY&lt;/span&gt; voltage levels to RS232 levels so this can be plugged into a computer via a DB9 serial port. The &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;IC&lt;/span&gt; in the middle breadboard is a common single supply op-amp. To the left of it is a passive bandpass filter.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Not shown are a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;MOSFET&lt;/span&gt; and a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;JFET&lt;/span&gt;. These were used for powering on the radio and transmission enable, respectively.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Step 3: &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;MCU&lt;/span&gt; programming&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;So, how do you convert text like &lt;/span&gt;&lt;span style="color: black; font-style: italic;"&gt;this&lt;/span&gt;&lt;span style="color: black;"&gt; (01110100011010000110100101110011) to go over the air? Turn the bits that comprise letters into different frequencies, of course. Alternatively, you could do &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;OOKing&lt;/span&gt; with Manchester encoding, or really whatever else you want.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;One of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;MCU's&lt;/span&gt; timers is clocked via rising edge waves from the op-amp. By sampling the number of edges received (the timer's value) at regular known intervals, the frequency of the received signal can be computed. Sampling is done three times in the duration that it takes to send one bit. Thus, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;at least&lt;/span&gt; one of three samples will always be part of a complete bit and not a transition to or from another.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;The algorithm for receiving is as such:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Sample the frequency.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;If the start bit is received (only sent at the beginning of a letter), wait three individual sample periods and then sample again. (Because the start bit came through cleanly, if we wait for three sample periods, we should have another non-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;adultered&lt;/span&gt; part of a bit.)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt; Bit bang that first bit into a 8 bit &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;datatype&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt; Repeat until we've banged in 8 bits.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Send that data out to the serial port as a character.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Transmitting is a fairly simple operation of bit banging a character &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_19"&gt;received&lt;/span&gt; on the serial port and toggling an I/O pin at a rate for a period of time depending on the bit.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;These radios really were a bit of a black box, and strange things happened during assembly. Everything was hunky-dory on the bread board. The radios would turn on via &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;MOSFETs&lt;/span&gt; nicely, they'd stop transmitting when I set my P-channel &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;JFETS&lt;/span&gt; high, etc. It was only once everything was soldered down onto &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;stripboard&lt;/span&gt; that problems cropped up. I had to tie the mic port high to keep the radios from sticking in transmit (which could sometimes be alleviated by touching the bare antenna with my finger,) etc. The passive bandpass filter which was necessary on the breadboard caused the radios not to produce a sine wave once on the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;stripboard&lt;/span&gt; (except for one time that it did for a few seconds...) all sorts of odd things. I'd like to put most of the blame on the old electrolytic capacitors these radios have.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;In a nutshell, this project took way more time than I anticipated due to &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_24"&gt;erratic&lt;/span&gt; behaviour of the radios. (And also because I did not have an oscilloscope when I started.) I had to do a lot of guess-and-check experimentation to find things that worked. I'm loath to open up the project boxes to do any tweaking. They work, I'm happy, and I don't ever want to mess with them again. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Now I just need to find a problem I can solve with these....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_mWBCc8h66bU/TDJDTTKuWQI/AAAAAAAAAA8/H93bBTyyf6k/s1600/P1010093.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" style="color: black;"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5490524894559885570" src="http://4.bp.blogspot.com/_mWBCc8h66bU/TDJDTTKuWQI/AAAAAAAAAA8/H93bBTyyf6k/s320/P1010093.JPG" style="cursor: pointer; height: 240px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;One of two identical boxes.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_mWBCc8h66bU/TDJDPEHDM3I/AAAAAAAAAA0/ZIke3BhZjhE/s1600/P1010092.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" style="color: black;"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5490524821798466418" src="http://4.bp.blogspot.com/_mWBCc8h66bU/TDJDPEHDM3I/AAAAAAAAAA0/ZIke3BhZjhE/s320/P1010092.JPG" style="cursor: pointer; height: 240px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Another shot.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_mWBCc8h66bU/TDI-SHp8XXI/AAAAAAAAAAs/IicOoN-U0w4/s1600/newerfile.bmp" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" style="color: black;"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5490519376731594098" src="http://1.bp.blogspot.com/_mWBCc8h66bU/TDI-SHp8XXI/AAAAAAAAAAs/IicOoN-U0w4/s320/newerfile.bmp" style="cursor: pointer; height: 202px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;&lt;span style="color: black;"&gt;Super exciting operation, I know. Text goes in one box, text comes out another. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;Wohoo&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;Some thoughts on efficiency:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;I ended up with a baud rate of 10. Not super speedy, but fine for some applications. I never did squeeze the radios to see how many &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_26"&gt;separate&lt;/span&gt; frequencies I could shove into smaller and smaller &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;timeslots&lt;/span&gt;. I would not be surprised by a 4x speedup or more by this alone.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;ASCII is not the best choice for a space-efficient character encoding. I transmitted the check digit, and never computed it. Plus I did not use any compression schemes (e.g., one frequency and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;timeslot&lt;/span&gt; for '11' instead of taking up two &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;timeslots&lt;/span&gt; by transmitting '1' and then '1'.) There are plenty of things that could be done to speed this up and cram quite a bit of text in one second.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7140922047377970601-6292234354961846438?l=takethingsapart.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7140922047377970601/posts/default/6292234354961846438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7140922047377970601/posts/default/6292234354961846438'/><link rel='alternate' type='text/html' href='http://takethingsapart.blogspot.com/2010/07/note-before-constructing-device-such-as.html' title='Text messages over walkie-talkies'/><author><name>Travers Buda</name><uri>http://www.blogger.com/profile/04076931107581418547</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_mWBCc8h66bU/TDIyhfOo3bI/AAAAAAAAAAM/fblG7ZZSAEw/s72-c/P1010020.JPG' height='72' width='72'/></entry></feed>
