<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>accomplished &#187; mod</title> <atom:link href="http://www.accomplished.org/tag/mod/feed/" rel="self" type="application/rss+xml" /><link>http://www.accomplished.org</link> <description>inventions, projects and tinkering</description> <lastBuildDate>Mon, 08 Aug 2011 21:40:04 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Servo feedback mod</title><link>http://www.accomplished.org/2010/01/10/servo-feedback-mod/</link> <comments>http://www.accomplished.org/2010/01/10/servo-feedback-mod/#comments</comments> <pubDate>Sun, 10 Jan 2010 22:57:36 +0000</pubDate> <dc:creator>Owen</dc:creator> <category><![CDATA[Electronics]]></category> <category><![CDATA[arduino]]></category> <category><![CDATA[mod]]></category> <category><![CDATA[servos]]></category> <guid
isPermaLink="false">http://www.accomplished.org/?p=117</guid> <description><![CDATA[Today I&#8217;ve modified two of my servos to allow access to the output of the variable resistor inside them. This very simple modification opens up a world of possibilities that really should come as standard on all servos. All that&#8217;s involved is opening your servo, locating the potentiometer that provides feedback on where the output [...]]]></description> <content:encoded><![CDATA[<div
id="attachment_125" class="wp-caption alignnone" style="width: 425px"><a
href="http://www.accomplished.org/wp-content/uploads/2010/01/ModifiedServo.jpg" rel="lightbox[117]"><img
class="size-medium wp-image-125 " title="Servo with feedback mod" src="http://www.accomplished.org/wp-content/uploads/2010/01/ModifiedServo-415x214.jpg" alt="Servo with feedback mod" width="415" height="214" /></a><p
class="wp-caption-text">Servo with new feedback wire</p></div><p>Today I&#8217;ve modified two of my servos to allow access to the output of the variable resistor inside them. This very simple modification opens up a world of possibilities that really should come as standard on all servos. All that&#8217;s involved is opening your servo, locating the potentiometer that provides feedback on where the output shaft is and then adding an extra wire onto the center tap. After adding this wire you can read the voltage present using an A/D converter and following some simple calibration, know quite precisely what angle the output shaft is at.</p><p>The actual modification is discussed in detail over at <a
title="Servo feedback mod" href="http://forums.trossenrobotics.com/tutorials/how-to-diy-128/get-position-feedback-from-a-standard-hobby-servo-3279/">Trossen Robotics</a> so I won&#8217;t go into that too much.</p><p>Here&#8217;s a video of what I cooked up using the newly modified servos and an arduino board.</p><p><object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param
name="src" value="http://www.youtube.com/v/uKjHtPmyEqU" /><embed
type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/uKjHtPmyEqU"></embed></object></p><p>You can see that as I twist the horn of one servo, the other rotates to match it and mirrors the movement very closely. To do this the value from the feedback pot is read using the analogRead() function. As the output of the feedback line only reaches around 2 Volts at maximum (and goes down to around 0.2V at the other end of travel) the AREF pin of the arduino must have a voltage just above this applied to get good A/D resolution.</p><p>To scale the A/D readings I connected a simple voltage divider between GND, +5V and the AREF pin. A note here is that when I measured the maximum output from the feedback pot without the servo being connected to the arduino I measured 1.2V for one and 1.3V for the other and made my divider to output around 1.37V. However, when I connected the ground from the servos to the ground of the arduino board, the voltage seen at the outputs moved closer to 2V, which messed up my readings and meant that the A/D converter was reporting a value of 1023 (max) at about a quarter of a rotation of the servo. This was down to the fact that I was using a separate power supply for the servos which was obviously mismatched slightly from the arduino board voltage. So make sure you hook everything together before you measure the servo voltage and work out which resistors to use in your divider. Incidentally, I used values of 5.1Kohms and 4.7Kohms, worked out using <a
title="Voltage divider calculator" href="http://www.raltron.com/cust/tools/voltage_divider.asp">this calculator</a>.</p><p>The code I used on the arduino was largely based around the example on the Trossen Robotics page. It&#8217;s available to download below.</p><p><a
title="Servo feedback arduino demo" href="http://www.accomplished.org/wp-content/uploads/2010/01/TwinServos.zip">Download the Arduino Code</a></p> ]]></content:encoded> <wfw:commentRss>http://www.accomplished.org/2010/01/10/servo-feedback-mod/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>PIR Sensor Mod</title><link>http://www.accomplished.org/2010/01/01/pir-sensor-mod/</link> <comments>http://www.accomplished.org/2010/01/01/pir-sensor-mod/#comments</comments> <pubDate>Fri, 01 Jan 2010 23:55:21 +0000</pubDate> <dc:creator>Owen</dc:creator> <category><![CDATA[Electronics]]></category> <category><![CDATA[mod]]></category> <category><![CDATA[PIR]]></category> <category><![CDATA[sensor]]></category> <guid
isPermaLink="false">http://www.accomplished.org/?p=58</guid> <description><![CDATA[I needed a PIR sensor for a halloween project and not having a Maplin near by I decided to modify an £8.99 Security Floodlight from Argos. One thing you should note is that the default &#8216;switch-on&#8217; time is around 1 minute. I didn&#8217;t need to change this for my application, but it may be an [...]]]></description> <content:encoded><![CDATA[<p>I needed a PIR sensor for a halloween project and not having a Maplin near by I decided to modify an £8.99 <a
href="http://www.argos.co.uk/static/Product/partNumber/7018105.htm" target="_blank">Security Floodlight from Argos</a>. One thing you should note is that the default &#8216;switch-on&#8217; time is around 1 minute. I didn&#8217;t need to change this for my application, but it may be an issue if you only need a short high-pulse when something is detected.</p><p><a
href="http://www.accomplished.org/images/projects/argos_pir/argos_001.jpg" rel="lightbox[58]"><img
class="alignnone" title="PIR sensor box" src="http://www.accomplished.org/images/projects/argos_pir/argos_001.jpg" alt="PIR sensor box" width="480" height="372" /></a></p><p><span
id="more-58"></span><a
href="http://www.accomplished.org/images/projects/argos_pir/argos_002.jpg" rel="lightbox[58]"><img
class="alignnone" title="Security light back" src="http://www.accomplished.org/images/projects/argos_pir/argos_002.jpg" alt="Security light back" width="480" height="360" /></a></p><p>Here I&#8217;d already removed the guts. You can either cut all the wires, or do what I did and use a small screwdriver to lift the metal springs in the terminal block that are holding the wires in. After that remove the central screw as shown below to seperate the PIR section from the light.</p><p><a
href="http://www.accomplished.org/images/projects/argos_pir/argos_003.jpg" rel="lightbox[58]"><img
class="alignnone" title="Removing PIR sensor" src="http://www.accomplished.org/images/projects/argos_pir/argos_003.jpg" alt="Removing PIR sensor" width="480" height="360" /></a></p><p>To seperate the rotating section of the PIR from the container housing the electronics just needs a good firm pull. The two sections are held together by a couple of plastic clips which should pop out easily.</p><p><a
href="http://www.accomplished.org/images/projects/argos_pir/argos_004.jpg" rel="lightbox[58]"><img
class="alignnone" title="Separated sensor" src="http://www.accomplished.org/images/projects/argos_pir/argos_004.jpg" alt="Separated sensor" width="480" height="360" /></a></p><p>My PIR housing seemed to have glue in the seam between the two halves, so I cut a shallow channel around it until the two halves were easily seperated. The case was also held together with retaining clips as well as glue, so make sure you don&#8217;t cut through these, it&#8217;ll make putting it back together much easier.</p><p><a
href="http://www.accomplished.org/images/projects/argos_pir/argos_005.jpg" rel="lightbox[58]"><img
class="alignnone" title="Opening the sensor housing" src="http://www.accomplished.org/images/projects/argos_pir/argos_005.jpg" alt="Opening the sensor housing" width="480" height="360" /></a></p><p>Here&#8217;s what the insides look like when you finally get the sensor housing open.</p><p><a
href="http://www.accomplished.org/images/projects/argos_pir/argos_006.jpg" rel="lightbox[58]"><img
class="alignnone" title="Sensor guts" src="http://www.accomplished.org/images/projects/argos_pir/argos_006.jpg" alt="Sensor guts" width="480" height="360" /></a></p><p>The important bit here is the relay. It&#8217;s part number is 812H-1A-C made by Song Chun. You can see the datasheet <a
href="http://www.songchuan.com/PPDF/812.PDF" target="_blank">here</a>.</p><p>What you can see from the datasheet is that the live wire is connected to one side of the relay output contacts and the white wire that goes to the halogen light is on the other side of the contact.</p><p>To allow the PIR to function as a general purpose switch we need to desolder the live wire from the relay and reconnect it so that it powers the circuit, then add another wire to the relay.</p><p><a
href="http://www.accomplished.org/images/projects/argos_pir/argos_007.jpg" rel="lightbox[58]"><img
class="alignnone" title="Relay on the sensor board" src="http://www.accomplished.org/images/projects/argos_pir/argos_007.jpg" alt="Relay on the sensor board" width="480" height="360" /></a></p><p>Below you can see where you should be cutting and desoldering.</p><p><a
href="http://www.accomplished.org/images/projects/argos_pir/argos_008.jpg" rel="lightbox[58]"><img
class="alignnone" title="Sensor PCB" src="http://www.accomplished.org/images/projects/argos_pir/argos_008.jpg" alt="Sensor PCB" width="480" height="360" /></a></p><p>And here&#8217;s the slightly messy, but effective result. Make sure you test the cut track for continuity with a multimeter, you really don&#8217;t want any mains voltages getting onto the output side of your relay.</p><p><a
href="http://www.accomplished.org/images/projects/argos_pir/argos_009.jpg" rel="lightbox[58]"><img
class="alignnone" title="Modified PCB" src="http://www.accomplished.org/images/projects/argos_pir/argos_009.jpg" alt="Modified PCB" width="480" height="360" /></a></p><p>In the next shot you can just about see where I&#8217;ve resoldered the live wire onto the leg of the resistor so it can continue to power the detector circuit. I wrapped it round the leg to make the join a bit stronger. I&#8217;ve recycled some ground wire from a piece of flex and soldered that into the hole that the live wire was removed from.</p><p>After you&#8217;re done soldering, you might want to hook everything up and make sure it&#8217;s all working. I hooked up the new relay connections to a multimeter to test that it was turning on and off as it should, and also that there weren&#8217;t any stray mains voltages that could cause issues later&#8230;such as death.</p><p><a
href="http://www.accomplished.org/images/projects/argos_pir/argos_010.jpg" rel="lightbox[58]"><img
class="alignnone" title="New wire positions" src="http://www.accomplished.org/images/projects/argos_pir/argos_010.jpg" alt="New wire positions" width="480" height="360" /></a></p><p>Once everything&#8217;s checked and working you can repackage it in the PIR housing. I put the original terminal block back in to hook up the mains wires and then added a couple of terminal posts through the holes on the front. These were attached to the relay wires and will now allow me to switch things on and off under control of the PIR sensor.</p><p><a
href="http://www.accomplished.org/images/projects/argos_pir/argos_011.jpg" rel="lightbox[58]"><img
class="alignnone" title="PIR sensor mod completed" src="http://www.accomplished.org/images/projects/argos_pir/argos_011.jpg" alt="PIR sensor mod completed" width="480" height="360" /></a></p> ]]></content:encoded> <wfw:commentRss>http://www.accomplished.org/2010/01/01/pir-sensor-mod/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
