<?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-1199441768185395350</id><updated>2011-12-29T11:14:01.117+01:00</updated><category term='LEGO'/><category term='micro'/><title type='text'>Lego Mindstorms NXT, Robots and Other Blurbs ....</title><subtitle type='html'>To "lego" or not to "lego"
that is the question.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ramacco.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ramacco.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ramacco</name><uri>http://www.blogger.com/profile/06487311494934969536</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_gD8THJoVMls/SVdVKGTF7RI/AAAAAAAAABA/MURkw0ub_eM/S220/figure.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1199441768185395350.post-7569046625891895380</id><published>2010-11-12T18:43:00.000+01:00</published><updated>2010-11-12T18:43:19.237+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LEGO'/><title type='text'>Mindsensors' Numeric Pad</title><content type='html'>Last week I received the new Numeric Pad from Mindsensors to test. It has 10 digits (0...9) a "*" and a "#" key. The keyboard can be operated without actually pushing buttons. They sense the presence of your finger. Great ! To give some feedback that the key was pressed, I added a 'beep' to the software. &lt;br /&gt;&lt;br /&gt;To give it a spin I created 2 contraptions. The first was a simple calculator. It consists of an NXT and the keypad. Nothing fancy, but it does work.&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="264"&gt;&lt;param name="movie" value="http://www.youtube.com/v/7-366TG2Jpw?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/7-366TG2Jpw?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="264"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;The second is a gate that is locked with a code. If you enter the correct code the gate opens, if not it stays closed. I used the colorsensor to show the state : Blue = Initializing / Red = don't drive / Green = drive&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="264"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Lns2D2CCqu0?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/Lns2D2CCqu0?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="264"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1199441768185395350-7569046625891895380?l=ramacco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramacco.blogspot.com/feeds/7569046625891895380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ramacco.blogspot.com/2010/11/mindsensors-numeric-pad.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/7569046625891895380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/7569046625891895380'/><link rel='alternate' type='text/html' href='http://ramacco.blogspot.com/2010/11/mindsensors-numeric-pad.html' title='Mindsensors&apos; Numeric Pad'/><author><name>Ramacco</name><uri>http://www.blogger.com/profile/06487311494934969536</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_gD8THJoVMls/SVdVKGTF7RI/AAAAAAAAABA/MURkw0ub_eM/S220/figure.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1199441768185395350.post-2233771445679478</id><published>2010-07-29T11:55:00.002+02:00</published><updated>2010-08-04T09:55:14.122+02:00</updated><title type='text'>Nissan Patrol - WIP</title><content type='html'>&lt;a href="http://lh4.ggpht.com/_gD8THJoVMls/TFEr8y6XfQI/AAAAAAAAAP0/j-XSAXueU34/s1600-h/NissanPatrol_1280%5B9%5D.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="NissanPatrol_1280" border="0" alt="NissanPatrol_1280" align="right" src="http://lh3.ggpht.com/_gD8THJoVMls/TFEr9dEIVbI/AAAAAAAAAP4/poD_i0hdMwg/NissanPatrol_1280_thumb%5B5%5D.jpg?imgmax=800" width="244" height="146"&gt;&lt;/a&gt; Inspired by Sariel and ATR, I wanted to build my own scale model of an off-road jeep. I chose the Nissan Patrol 4x4 (model 1980) and want to build it on scale 1:13. This has proven hard work with many changes and restarts to make something that actually works and fits in the limited space, but I think I am making good progress. The chassis, steering mechanism and drive train are ready. &lt;br /&gt;&lt;br /&gt;Here is a video of the tests I have done so far : &lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="264"&gt;&lt;param name="movie" value="http://www.youtube.com/v/b5x-GHTZalY&amp;amp;hl=en_US&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/b5x-GHTZalY&amp;amp;hl=en_US&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="264"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;I hope it will be good enough to participate in a TruckTrial :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1199441768185395350-2233771445679478?l=ramacco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramacco.blogspot.com/feeds/2233771445679478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ramacco.blogspot.com/2010/07/nissan-patrol-nxtfied-wip.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/2233771445679478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/2233771445679478'/><link rel='alternate' type='text/html' href='http://ramacco.blogspot.com/2010/07/nissan-patrol-nxtfied-wip.html' title='Nissan Patrol - WIP'/><author><name>Ramacco</name><uri>http://www.blogger.com/profile/06487311494934969536</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_gD8THJoVMls/SVdVKGTF7RI/AAAAAAAAABA/MURkw0ub_eM/S220/figure.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_gD8THJoVMls/TFEr9dEIVbI/AAAAAAAAAP4/poD_i0hdMwg/s72-c/NissanPatrol_1280_thumb%5B5%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1199441768185395350.post-5596592270276534722</id><published>2010-05-16T21:32:00.002+02:00</published><updated>2010-07-25T12:35:13.081+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LEGO'/><title type='text'>Brickmania 2010</title><content type='html'>Today I visited Brickmania, an event organized by the Belgian Lego Users Group in Wetteren (Belgium). The event itself was relative small in size, but that doesn't mean it wasn't fun or interesting. During my visit I made following video&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/rHlgDIOAxBM&amp;hl=nl_NL&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/rHlgDIOAxBM&amp;hl=nl_NL&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1199441768185395350-5596592270276534722?l=ramacco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramacco.blogspot.com/feeds/5596592270276534722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ramacco.blogspot.com/2010/05/brickmania-2010.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/5596592270276534722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/5596592270276534722'/><link rel='alternate' type='text/html' href='http://ramacco.blogspot.com/2010/05/brickmania-2010.html' title='Brickmania 2010'/><author><name>Ramacco</name><uri>http://www.blogger.com/profile/06487311494934969536</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_gD8THJoVMls/SVdVKGTF7RI/AAAAAAAAABA/MURkw0ub_eM/S220/figure.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1199441768185395350.post-2737169073219542290</id><published>2010-04-30T21:37:00.009+02:00</published><updated>2010-07-25T12:34:40.013+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LEGO'/><title type='text'>1 NXT, 5 Motors</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_gD8THJoVMls/S9sw_2v30uI/AAAAAAAAAMo/ipnM5FyZk9s/s1600/NXTMMXw300.bmp" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/_gD8THJoVMls/S9sw_2v30uI/AAAAAAAAAMo/ipnM5FyZk9s/s200/NXTMMXw300.bmp" tt="true" width="186" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Mindsensors is developing a new multiplexer which allows to connect 2 extra engines to the NXT. It is a complex device that has its own built-in controller and needs a seperate power supply. How does it work ? You connect it to any of the NXT sensor ports for the communication, connect 1 or 2 engines to the multipler and hook up the batterypack with 6AA batteries. To control the engines you need software that can be downloaded from the Mindsensors website, including some test programs. Controlling the engines is pretty similar to controlling the standard engines because the microcontroller on the multiplexer handles the intelligent part. It reads the motor encoders and therefore allows you to accurately control the number of rotations, time, speed of any of the engines. Furthermore you can still connect a sensor to the port, since the multiplexer has a pass-through connector that allows you to add an I²C connector to that same port. Pretty neat !&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Here is a little video that was meant as a teaser &lt;br&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;object height="240" width="426"&gt;&lt;param name="movie" value="http://www.youtube.com/v/fh1x7sxOrUU&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;rel=0&amp;amp;color1=0x5d1719&amp;amp;color2=0xcd311b"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;object width="425" height="264"&gt;&lt;param name="movie" value="http://www.youtube.com/v/fh1x7sxOrUU&amp;amp;hl=en_US&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/fh1x7sxOrUU&amp;amp;hl=en_US&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="264"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/object&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1199441768185395350-2737169073219542290?l=ramacco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramacco.blogspot.com/feeds/2737169073219542290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ramacco.blogspot.com/2010/04/1-nxt-5-engines.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/2737169073219542290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/2737169073219542290'/><link rel='alternate' type='text/html' href='http://ramacco.blogspot.com/2010/04/1-nxt-5-engines.html' title='1 NXT, 5 Motors'/><author><name>Ramacco</name><uri>http://www.blogger.com/profile/06487311494934969536</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_gD8THJoVMls/SVdVKGTF7RI/AAAAAAAAABA/MURkw0ub_eM/S220/figure.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_gD8THJoVMls/S9sw_2v30uI/AAAAAAAAAMo/ipnM5FyZk9s/s72-c/NXTMMXw300.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1199441768185395350.post-7210545004730491969</id><published>2010-02-28T18:46:00.006+01:00</published><updated>2010-02-28T19:19:34.134+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='micro'/><title type='text'>Ground control to Major Tom</title><content type='html'>&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;a href="http://3.bp.blogspot.com/_u9nQZ_DdxVE/S4qzBxXrxII/AAAAAAAAABQ/fpjEtx0OMgY/s1600-h/bluesmirf.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 270px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5443359942644581506" border="0" alt="" src="http://3.bp.blogspot.com/_u9nQZ_DdxVE/S4qzBxXrxII/AAAAAAAAABQ/fpjEtx0OMgY/s400/bluesmirf.jpg" /&gt;&lt;/a&gt; &lt;span style="font-family:arial;"&gt;Debugging microcontrollers has always been a challenge for us, mere mortals. You can of course buy an in-circuit debugger, but this will cost you a few hundred bucks. Given that most microcontrollers have a serial connection (USART) built-in, a cheaper solution is to build a cheap, simple RS232 interface to your computer. Two problems :1) modern laptops don't have an RS232 connector anymore. 2) We build robots and they move around making a cable a bit of a nuisance, so we wanted to have a wireless connection to our PC. Several options exist : Wifi, Zigbee/Xbee, FM, ... but we decided to build a bluetooth connection using a &lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=582"&gt;BlueSmirf module (Sparkfun). &lt;/a&gt;This modules has a serial interface at TTL level and can be directly interfaced with the microcontroller and emulates a virtual COM port on the PC where you can read/write to it using a terminal program.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;/div&gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;The hardware implementation was straigtforward : connect the +5V, Ground, connect RX to TX, TX to RX and you are good to go. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;The pairing was straightforward : let your PC search for new Bluetooth devices, enter the password and Windows will do the rest. All you now need is a terminal program (e.g. Hyperterminal or Putty), choose the correct virtual COM port, set the baudrate and other settings correctly. That's all. Sadly enough that leaves you with a blank screen. One more step ...&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;The last part is the hardest : write the code for your microcontroller. Luckily there are very good examples to be found. Like &lt;/span&gt;&lt;a href="http://wiring.org.co/learning/tutorials/bluetooth/"&gt;&lt;span style="font-family:arial;"&gt;this one&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; for the Arduino. I decided to use a Microchip PIC (18F4550) and write the code in MPLAB C18 (the student version). C18 has a library to interface with the hardware USART module, making it easy to write programs. Reading can even be done via an interrupt routine or simply by polling the input queue. An afternoon of searching, trying and coding and ...&lt;em&gt; tada&lt;/em&gt; ... I could send messages from my PIC to PC and vice versa. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;One drawback is that I need to power-on the PIC (with BlueSmirf) first, then PuTTY on the PC. At that moment the PIC can send messages to the PC. To allow the PC to send messages to the PIC I need to reset the PIC after PuTTY has started. Not too much of a problem, but something to keep in mind. Some other wireless systems are less sensitive to the order in which the programs are started.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:Arial;"&gt;&lt;em&gt;Anyway, not bad for an afternoon of fooling around, even if I say so myself !&lt;/em&gt;&lt;/span&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/1199441768185395350-7210545004730491969?l=ramacco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramacco.blogspot.com/feeds/7210545004730491969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ramacco.blogspot.com/2010/02/ground-control-to-major-tom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/7210545004730491969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/7210545004730491969'/><link rel='alternate' type='text/html' href='http://ramacco.blogspot.com/2010/02/ground-control-to-major-tom.html' title='Ground control to Major Tom'/><author><name>BlueHaze</name><uri>http://www.blogger.com/profile/00762777266218573782</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://3.bp.blogspot.com/_u9nQZ_DdxVE/S4qzBxXrxII/AAAAAAAAABQ/fpjEtx0OMgY/s72-c/bluesmirf.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1199441768185395350.post-9219070366616419848</id><published>2010-02-21T18:50:00.007+01:00</published><updated>2010-03-14T20:38:18.097+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LEGO'/><title type='text'>Lego Crane Truck 8258 NXTfied</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_gD8THJoVMls/S4FwYBZaEJI/AAAAAAAAAH0/Wm3I5Cd-rrI/s1600-h/8258NXTfied.jpg" imageanchor="1" style="clear: right; cssfloat: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" ct="true" height="175" src="http://2.bp.blogspot.com/_gD8THJoVMls/S4FwYBZaEJI/AAAAAAAAAH0/Wm3I5Cd-rrI/s200/8258NXTfied.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;Remember the truck I got for&lt;a href="http://ramacco.blogspot.com/2009/12/thanks-santa.html"&gt; Christmas&lt;/a&gt; ? Remember that I wanted to automate it ? Well, the job is done, the movie made and the pictures taken. The brain of the truck is a NXT which controls the driving and steering motor directly, but also controls the 3 PowerFunction engines I used for the Crane. Instead of using the standard remote control of the PF engines, the NXT uses a HiTechnic IRLink to control speed and direction of the engines. The entire truck is controlled from my mobile phone via Bluetooth. The software for this was written by &lt;a href="http://forums.nxtasy.org/index.php?showtopic=1839"&gt;Alexander Demin&lt;/a&gt;. We made some changes to the portion that runs on the NXT to allow the commands from the phone to be interpreted correctly.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.brickshelf.com/cgi-bin/gallery.cgi?f=424480"&gt;Here are some pictures&lt;/a&gt; and here is a video of the truck in action.&lt;br /&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/6v_-Oi_OSGw&amp;hl=en_GB&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/6v_-Oi_OSGw&amp;hl=en_GB&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1199441768185395350-9219070366616419848?l=ramacco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramacco.blogspot.com/feeds/9219070366616419848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ramacco.blogspot.com/2010/02/lego-crane-truck-8258-nxtfied.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/9219070366616419848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/9219070366616419848'/><link rel='alternate' type='text/html' href='http://ramacco.blogspot.com/2010/02/lego-crane-truck-8258-nxtfied.html' title='Lego Crane Truck 8258 NXTfied'/><author><name>Ramacco</name><uri>http://www.blogger.com/profile/06487311494934969536</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_gD8THJoVMls/SVdVKGTF7RI/AAAAAAAAABA/MURkw0ub_eM/S220/figure.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_gD8THJoVMls/S4FwYBZaEJI/AAAAAAAAAH0/Wm3I5Cd-rrI/s72-c/8258NXTfied.jpg' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1199441768185395350.post-9051629252384873894</id><published>2010-01-09T19:16:00.009+01:00</published><updated>2010-01-09T20:05:11.855+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='micro'/><title type='text'>WOLL-Y : Wake On LAN Appliance</title><content type='html'>&lt;em&gt;Sorry, &lt;strong&gt;No LEGO this time&lt;/strong&gt;, Guys &amp;amp; Gals…&lt;/em&gt;&lt;br /&gt;&lt;a href="http://wiki.robotmc.org/index.php?title=WOLL-Y_:_Wake_On_LAN_Appliance" target="_blank"&gt;&lt;img style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; MARGIN-LEFT: 0px; BORDER-TOP: 0px; MARGIN-RIGHT: 0px; BORDER-RIGHT: 0px" title="Wolly_proto" border="0" alt="Wolly_proto" align="left" src="http://lh4.ggpht.com/_u9nQZ_DdxVE/S0jIDK1PCBI/AAAAAAAAAA8/-0hZYrn3FxU/Wolly_proto%5B5%5D.jpg?imgmax=800" width="240" height="154" /&gt;&lt;/a&gt; A friend of mine had decided to build his own DVD/Hard disk recorder based on a PC with Linux and a TV card. This turns out to be a very cost-effective and future-proof solution that allowed to add many features. However it had also one disadvantage : the PC had to be switched on before the recording would start. Not very power friendly. Some experimenting showed that it was possible to turn on the PC using a the 'Wake-On-LAN' feature in the BIOS. Having one PC switch on another was obviously nonsense, so the idea grew to develop a power-friendly, microcontroller based little appliance that could send a 'Wake-On-LAN' signal to the PC at predefined times.&lt;br /&gt;&lt;br /&gt;The appliance we built is based on a microcontroller (PIC 18F458) with an extra Ethernet interface. Via this interface the device will receive commands from a host computer. These commands allow the user to specify at which times which computer has to be turned on, sort of an alarm clock with repetitive alarms. WOLL-Y will then issue so called '&lt;a href="http://en.wikipedia.org/wiki/Wake-on-LAN" target="_blank"&gt;Wake-On-Lan&lt;/a&gt;' Magic packets at the preset times and send them to the desired computer (identified via its MAC address). To allow WOLLY to determine the time it has a battery backed up real time clock. All configuration is stored in non-volatile RAM (either EEPROM or battery backed up RAM). To allow monitoring of the health state of WOLLY, the device has a status led and will send broadcast UDP packets at preset intervals containing its basic settings.&lt;br /&gt;&lt;br /&gt;The PC user interface is written in &lt;a href="http://qt.nokia.com/" target="_blank"&gt;Qt4&lt;/a&gt; and automatically finds WOLLY on the LAN (by looking for the packets WOLLY broadcasts) and then allows to read the current config and add/remove or change entries in the table.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wiki.robotmc.org/index.php?title=WOLL-Y_:_Wake_On_LAN_Appliance" target="_blank"&gt;&lt;img style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: block; FLOAT: none; MARGIN-LEFT: auto; BORDER-TOP: 0px; MARGIN-RIGHT: auto; BORDER-RIGHT: 0px" title="Wolly User Interface" border="0" alt="Wolly User Interface" src="http://lh6.ggpht.com/_u9nQZ_DdxVE/S0jIELY1UxI/AAAAAAAAABA/-cbH-fwwgks/Wolly_ui%5B6%5D.jpg?imgmax=800" width="463" height="480" /&gt;&lt;/a&gt;&lt;br /&gt;More detailed information, the circuit, the PC software and firmware can be found &lt;a href="http://wiki.robotmc.org/index.php?title=WOLL-Y_:_Wake_On_LAN_Appliance"&gt;[HERE]&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1199441768185395350-9051629252384873894?l=ramacco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramacco.blogspot.com/feeds/9051629252384873894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ramacco.blogspot.com/2010/01/woll-y-wake-on-lan-appliance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/9051629252384873894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/9051629252384873894'/><link rel='alternate' type='text/html' href='http://ramacco.blogspot.com/2010/01/woll-y-wake-on-lan-appliance.html' title='WOLL-Y : Wake On LAN Appliance'/><author><name>BlueHaze</name><uri>http://www.blogger.com/profile/00762777266218573782</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://lh4.ggpht.com/_u9nQZ_DdxVE/S0jIDK1PCBI/AAAAAAAAAA8/-0hZYrn3FxU/s72-c/Wolly_proto%5B5%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1199441768185395350.post-1344923537985254069</id><published>2009-12-30T14:47:00.004+01:00</published><updated>2010-01-09T19:37:47.660+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LEGO'/><title type='text'>Thanks, Santa !</title><content type='html'>After a period of turkey dinners and unwrapping gifts, there is finally time for a new challenge. Don’t misunderstand me, I don’t hate opening presents at all, and certainly not when the presents turn out to be Lego! Shrewdly I started mentioning that I fancy the &lt;a href="http://shop.lego.com/product/Default.aspx?p=8258&amp;amp;LangId=2057"&gt;new Lego Technic Crane Truck (8258)&lt;/a&gt; several months ago. On December 25th, when I opened my present, there it was! &lt;br /&gt;&lt;br /&gt;So I started building the box and in the mean time I also discovered the technical functions of the crane and how they work. Pretty cool, I thought. I took some pictures of the original truck.&amp;nbsp; &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_gD8THJoVMls/SztaznxN7uI/AAAAAAAAAHU/-XkOS9p7KPA/s1600-h/PICT4830%5B12%5D.jpg"&gt;&lt;img alt="PICT4830" border="0" height="240" src="http://lh5.ggpht.com/_gD8THJoVMls/Szta0VR8yxI/AAAAAAAAAHY/myqOSnSDnRE/PICT4830_thumb%5B6%5D.jpg?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="PICT4830" width="320" /&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/_gD8THJoVMls/Szta16M2xaI/AAAAAAAAAHc/-ryWYCbKcSE/s1600-h/PICT4831%5B7%5D.jpg"&gt;&lt;img alt="PICT4831" border="0" height="240" src="http://lh4.ggpht.com/_gD8THJoVMls/Szta2hXq6nI/AAAAAAAAAHg/v3owZgUBi24/PICT4831_thumb%5B3%5D.jpg?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="PICT4831" width="320" /&gt;&lt;/a&gt;&lt;a href="http://lh4.ggpht.com/_gD8THJoVMls/Szta392JYUI/AAAAAAAAAHk/JcSJtQkN5cM/s1600-h/PICT4829%5B14%5D.jpg"&gt;&lt;img alt="PICT4829" border="0" height="240" src="http://lh3.ggpht.com/_gD8THJoVMls/Szta4n9xH1I/AAAAAAAAAHo/Q67l-kvZZ_g/PICT4829_thumb%5B8%5D.jpg?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="PICT4829" width="320" /&gt;&lt;/a&gt; &lt;a href="http://lh3.ggpht.com/_gD8THJoVMls/Szta6BKLOYI/AAAAAAAAAHs/pzxg7VK_HiQ/s1600-h/PICT4828%5B13%5D.jpg"&gt;&lt;img alt="PICT4828" border="0" height="240" src="http://lh4.ggpht.com/_gD8THJoVMls/Szta6joGKlI/AAAAAAAAAHw/7HH-12j3USs/PICT4828_thumb%5B5%5D.jpg?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; margin-right: auto;" title="PICT4828" width="320" /&gt;&lt;/a&gt; &lt;br /&gt;The only thing I don’t like is that there is only one motor inside. But wait a minute !!! Somewhere in the house, there should be a NXT lying about. Perhaps I can use that one ? &lt;br /&gt;&lt;br /&gt;&lt;em&gt;Stay tuned !&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1199441768185395350-1344923537985254069?l=ramacco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramacco.blogspot.com/feeds/1344923537985254069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ramacco.blogspot.com/2009/12/thanks-santa.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/1344923537985254069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/1344923537985254069'/><link rel='alternate' type='text/html' href='http://ramacco.blogspot.com/2009/12/thanks-santa.html' title='Thanks, Santa !'/><author><name>Ramacco</name><uri>http://www.blogger.com/profile/06487311494934969536</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_gD8THJoVMls/SVdVKGTF7RI/AAAAAAAAABA/MURkw0ub_eM/S220/figure.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_gD8THJoVMls/Szta0VR8yxI/AAAAAAAAAHY/myqOSnSDnRE/s72-c/PICT4830_thumb%5B6%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1199441768185395350.post-382516658751752906</id><published>2009-12-29T21:36:00.006+01:00</published><updated>2010-01-09T19:40:19.843+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LEGO'/><title type='text'>Mindsensors’ PowerMeter as Morse Decoder</title><content type='html'>After finishing the multimeter project and seeing some &lt;a href="http://lh6.ggpht.com/_gD8THJoVMls/SzpoRu9lt1I/AAAAAAAAAGY/3nGK4SvgU1M/s1600-h/images%5B3%5D.jpg"&gt;&lt;img align="right" alt="images" border="0" height="91" src="http://lh3.ggpht.com/_gD8THJoVMls/SzpoSBbU_1I/AAAAAAAAAGc/FRqdzSM_4ag/images_thumb%5B1%5D.jpg?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;" title="images" width="129" /&gt;&lt;/a&gt; other creations from &lt;a href="http://www.youtube.com/watch?v=hYekbg95FQU" target="_blank"&gt;Xander S.&lt;/a&gt;&lt;span style="color: red;"&gt;&lt;/span&gt; and&lt;span style="color: red;"&gt; &lt;a href="http://www.youtube.com/watch?v=QgS6P3-u89g" target="_blank"&gt;Andy M.,&lt;/a&gt;&lt;/span&gt; I thought we had used the &lt;a href="http://www.mindsensors.com/index.php?module=pagemaster&amp;amp;PAGE_user_op=view_page&amp;amp;PAGE_id=125" target="_blank"&gt;Mindsensors’ PowerMeter&lt;/a&gt;&lt;span style="color: red;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt; to its limits : reading voltage/current, logging it or displaying it graphically. However, during a walk on the beach, it dawned on me: this is not ‘just’ a power meter, it is&lt;span style="color: maroon;"&gt;&amp;nbsp;&lt;strong&gt;&lt;em&gt;the sensor of all sensors, the must-have for all Robotics and Electronics fanatics&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;. With the PowerMeter extending the NXT with a special sensor becomes a no-brainer. Most electronic sensors work by varying voltage or current. The PowerMeter is actually a generic&amp;nbsp; &lt;strong&gt;&lt;span style="color: maroon;"&gt;A/D converter for the NXT &lt;/span&gt;&lt;/strong&gt;which allows you to quickly and safely interface your home-made sensor to the NXT. It is even a bit more than that, since it has a built-in timer you can use as well and in this example we will. Measuring distance, temperature, humidity, … all becomes easy with the PowerMeter.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_gD8THJoVMls/SzpoS8ia4UI/AAAAAAAAAGg/x5e5yBrEeg0/s1600-h/lightsensor10.png"&gt;&lt;img align="left" alt="lightsensor" border="0" height="230" src="http://lh4.ggpht.com/_gD8THJoVMls/SzpoTMUBlLI/AAAAAAAAAGk/SgDgGu8iYUE/lightsensor_thumb8.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;" title="lightsensor" width="175" /&gt;&lt;/a&gt; Once I realized this, I was up for a new challenge. To keep the electronics simple, I made a light sensor for the PowerMeter with a photodiode and a resistor. As transmitter I use a simple flashlight. The circuit shown here is not very critical. In fact I left out C2 and R4. I first used the multimeter program from the previous project and learned that -depending on the surrounding light- the ‘dark’ value was 1350 mV, the ‘light’ value was 20 mV. I decided to use 20% of the dark value as threshold between light and dark.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Instead of using the RobotC drivers, which I created for my previous&amp;nbsp; PowerMeter project, I wanted to use &lt;a href="http://lejos.sourceforge.net/" target="_blank"&gt;LeJOS&lt;/a&gt;&lt;strong&gt;&lt;span style="color: red;"&gt;&lt;/span&gt;&lt;/strong&gt; for this one. LeJOS is a Java Virtual Machine for the NXT. Java promises cross-platform portability ("Write Once, Run Anywhere") and this is&amp;nbsp;partially true. LeJOS allows to create programs in Java that run entirely on the NXT, partly on the NXT and partly on the PC or completely on the PC. This means that instead of needing different programming environments if you want to communicate between NXT and PC, all can be done from the same environment. However, there is a catch. Some parts of LeJOS are very sophisticated, while other parts are very basic.&amp;nbsp; Most notably, LeJOS has no IDE. It is all command line based and even the firmware for the NXT has this same basic look-and-feel. Most of this is not a real issue and you can use your preferred development environment. For me that is &lt;strong&gt;&lt;span style="color: red;"&gt;&lt;a href="http://www.eclipse.org/" target="_blank"&gt;Eclipse&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;First I created a new Java class ‘PowerMeter’ that contains all &lt;a href="http://lh6.ggpht.com/_gD8THJoVMls/SzpoTiGxItI/AAAAAAAAAGo/oAXGC2ORbPs/s1600-h/MorseCode9.jpg"&gt;&lt;img align="right" alt="MorseCode" border="0" height="267" src="http://lh6.ggpht.com/_gD8THJoVMls/SzpoUO7zSoI/AAAAAAAAAGs/sjZNvm1UOos/MorseCode_thumb5.jpg?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;" title="MorseCode" width="185" /&gt;&lt;/a&gt; the code to interface with the sensor. This class is the basis for all other programs.&amp;nbsp; I must admit that interfacing with I²C turned out to be very simple in LeJOS. Then I rewrote the multimeter program in Java as proof-of-concept. Now was the time for the real work. Several hours, crashes and lots of coffee later, the Morse decoder was born. The usage is simple. First you learn the NXT what a ‘short flash’ and a ‘long flash’ is. Then the NXT starts waiting and every time a short pulse is received it takes is as a DOT, a long pulse as a DASH. Once a full character is received – &lt;em&gt;the end of a character is denoted a dark period equal to 3 short pulses in time&lt;/em&gt; - the character is decoded using a simple lookup table.&lt;br /&gt;&lt;br /&gt;&lt;div class="wlWriterEditableSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:6029a1a2-1dcf-43ce-b15c-a608e06253f3" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div id="a6c818ac-c62b-4508-b177-947b0e2039b6" style="display: inline; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div&gt;&lt;embed height="355" src="http://www.youtube.com/v/Jgm2_2JqAbU&amp;amp;hl=en&amp;amp;fs=1&amp;amp;hl=en" type="application/x-shockwave-flash" width="425"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;The code is available &lt;span style="color: red;"&gt;&lt;a href="http://www.robotmc.org/documents/PowerMeter_Lejos.zip"&gt;here&lt;/a&gt;&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1199441768185395350-382516658751752906?l=ramacco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramacco.blogspot.com/feeds/382516658751752906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ramacco.blogspot.com/2009/12/mindsensors-powermeter-as-morse-decoder.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/382516658751752906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/382516658751752906'/><link rel='alternate' type='text/html' href='http://ramacco.blogspot.com/2009/12/mindsensors-powermeter-as-morse-decoder.html' title='Mindsensors’ PowerMeter as Morse Decoder'/><author><name>Ramacco</name><uri>http://www.blogger.com/profile/06487311494934969536</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_gD8THJoVMls/SVdVKGTF7RI/AAAAAAAAABA/MURkw0ub_eM/S220/figure.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_gD8THJoVMls/SzpoSBbU_1I/AAAAAAAAAGc/FRqdzSM_4ag/s72-c/images_thumb%5B1%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1199441768185395350.post-2373193661402645944</id><published>2009-12-22T17:45:00.010+01:00</published><updated>2010-01-09T19:40:39.075+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LEGO'/><title type='text'>Mindsensors' NXT PowerMeter</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_gD8THJoVMls/SzD0Z9GYKDI/AAAAAAAAAFk/PpfXI_5lWAQ/s1600-h/powermeterw350_1.jpg" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" ps="true" src="http://2.bp.blogspot.com/_gD8THJoVMls/SzD0Z9GYKDI/AAAAAAAAAFk/PpfXI_5lWAQ/s200/powermeterw350_1.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://www.mindsensors.com/"&gt;Mindsensors&lt;/a&gt; currently has a new sensor in beta.&amp;nbsp;&amp;nbsp;It is a sensor which is a bit out of the ordinary. It is not to make robots or automated devices, but it is more a tool to help in electronics.&amp;nbsp;It allows to measure current and voltage used either by the NXT brick itself (using the provided probes) or an external circuit (without using the probes). The firmware of the sensor is not completely finished yet which means&amp;nbsp;some of the features are not available yet. However, even in its current state it is a marvel&amp;nbsp;! It can measure up to 13.5 volts and&amp;nbsp;3 amps.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;I decided to start slowly and created a simple circuit with a 9V battery, one fixed resistor of 50 ohm and one variable resistor of 1K. Since the battery is a rechargeable battery I measure around 7-8V, which is normal and the current depends on the variable resistor. After trying the provided NXC program written by Deepak, I decided to convert it into a&lt;a href="http://www.robotc.net/"&gt; RobotC&lt;/a&gt; library.&amp;nbsp; I used the same naming convention as Deepak's NXC library. Once I got it working, I added all routines to read all registers of the NXT PowerMeter, so that the library is ready for future expansion (meaning when Mindsensors adds features to the firmware)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial;"&gt;Finally I wrote a program that turns the NXT into a simple multimeter. It shows the device ID, vendor ID, firmware version of the PowerMeter along with the measured current and voltage. Using Ohm's Law it is easy to calculate the resistance from this. The NXT shows those 3 values but by pressing the buttons you can change which one is shown in a big font. The other 2 are shown in small fonts. It also displays the internal timer. The PowerMeter has an internal timer in msec which can be reset.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial;"&gt;The video is available on &lt;a href="http://www.youtube.com/watch?v=3l4_jx4v4SQ"&gt;YouTube&lt;/a&gt;, the software on the &lt;a href="http://www.mindsensors.com/index.php?module=pagemaster&amp;amp;PAGE_user_op=view_page&amp;amp;PAGE_id=125"&gt;Mindsensors website&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;object height="344" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/3l4_jx4v4SQ&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/3l4_jx4v4SQ&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1199441768185395350-2373193661402645944?l=ramacco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramacco.blogspot.com/feeds/2373193661402645944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ramacco.blogspot.com/2009/12/mindsensors-nxt-powermeter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/2373193661402645944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/2373193661402645944'/><link rel='alternate' type='text/html' href='http://ramacco.blogspot.com/2009/12/mindsensors-nxt-powermeter.html' title='Mindsensors&apos; NXT PowerMeter'/><author><name>Ramacco</name><uri>http://www.blogger.com/profile/06487311494934969536</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_gD8THJoVMls/SVdVKGTF7RI/AAAAAAAAABA/MURkw0ub_eM/S220/figure.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_gD8THJoVMls/SzD0Z9GYKDI/AAAAAAAAAFk/PpfXI_5lWAQ/s72-c/powermeterw350_1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1199441768185395350.post-1586114352286319727</id><published>2009-12-22T12:17:00.007+01:00</published><updated>2010-01-09T19:40:53.333+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LEGO'/><title type='text'>CommLib + GCC + QT4 = NXT Remote control</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_gD8THJoVMls/SzCfnyDkanI/AAAAAAAAAFU/n5m9acCAeS0/s1600-h/nxtRemote.png" imageanchor="1" style="clear: right; cssfloat: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" ps="true" src="http://2.bp.blogspot.com/_gD8THJoVMls/SzCfnyDkanI/AAAAAAAAAFU/n5m9acCAeS0/s320/nxtRemote.png" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: arial, helvetica, sans-serif;"&gt;By coincidence I stumbled on &lt;a href="http://www.norgesgade14.dk/bluetoothlibrary.php"&gt;Anders' Mindstorms website&lt;/a&gt; where a library was available to communicate between the PC and NXT via Bluetooth. There was a testprogram available so I decided to give it a spin. I downloaded the &lt;a href="http://www.mingw.org/"&gt;MinGW framework&lt;/a&gt;&amp;nbsp; &lt;em&gt;-GCC/G++ compiler for Windows -&lt;/em&gt;made a simple testprogram based on his example. &lt;/span&gt;&lt;span style="font-family: arial, helvetica, sans-serif;"&gt;After changing the code to the correct COM port, the example worked instantaneously. However it used an ugly console window.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial, helvetica, sans-serif;"&gt;So I decided to push my luck a bit and make a graphical userinterface for it. Graphical as in a GUI ? Yep. But coding a windows UI from scratch is not for those with a weak heart, so I needed a framework that would handle the nitty-gritty details. Several exist and I used a few of them : wxWidgets, Qt and &lt;em&gt;-yes even-&lt;/em&gt; the MFC.&amp;nbsp; Over time I became a fan of &lt;a href="http://qt.nokia.com/products"&gt;&lt;strong&gt;QT&lt;/strong&gt;&lt;/a&gt;. This is a crossplatform application platform which includes a GUI (amongst others) and works on Windows, Linux, Mac, Windows CE, Symbian, .... . It was created by TrollTech and the first version was released in 1991. A few years ago, Nokia bought the company. The frameworks remained open-source.&amp;nbsp; In the old days I used it only on Linux, because the version for Windows was a commercial license. However, since version 4 it is now also free of charge on Windows. Maybe it has nothing to do with the version as such, maybe it is like this since Nokia bought TrollTech. &lt;em&gt;Not sure ...&lt;/em&gt;&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;One of the neat things of Qt is that it is a very consistent framework.&amp;nbsp; At first glance it looks scary, but in fact it is very neat, clean and straightforward. The key to understanding it is &lt;strong&gt;'signals'&lt;/strong&gt; and &lt;strong&gt;'slots'&lt;/strong&gt;. An object can generate signals and other objects can intercept those signals by connecting one of their methods to a so-called slot. When the first object generates a signal, the framework will call all routines that are connected to it.&amp;nbsp; This mechanism is used throughout the entire framework (not just for the GUI, but also for system routines) and once you understand it, it makes all the rest a walk in the park. A lot of examples are provided to guide you through the maze from simple to complex. Amazing how easy it is to use.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Here is a simple example : A pushbutton that calls one of my methods when clicked&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-color: #fbfbfb; border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; border-right: #cecece 1px solid; border-top: #cecece 1px solid; min-height: 40px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 650px;"&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 9px; margin: 0em; width: 100%;"&gt;1:     QPushButton *leftFwd = &lt;span style="color: blue;"&gt;new&lt;/span&gt; QPushButton(&lt;span style="color: blue;"&gt;this&lt;/span&gt;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 9px; margin: 0em; width: 100%;"&gt;2:     leftFwd-&amp;gt;setIconSize (QSize (60,60)) ;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 9px; margin: 0em; width: 100%;"&gt;3:     leftFwd-&amp;gt;setIcon (QIcon("&lt;span style="color: darkred;"&gt;images/leftForward.png&lt;/span&gt;")) ;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 9px; margin: 0em; width: 100%;"&gt;4:     leftFwd-&amp;gt;setGeometry (10, 40, 60, 60) ;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 9px; margin: 0em; width: 100%;"&gt;5:     connect(leftFwd, SIGNAL(clicked()), &lt;span style="color: blue;"&gt;this&lt;/span&gt;, SLOT(leftForwardEvent()));&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;On line 5 it reads : connect the signal ‘clicked()’ of the object ‘leftFwd’ to the slot ‘leftForwardEvent()’ of ‘this’ object. &lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&lt;em&gt;Anyhow...&lt;/em&gt; To cut a long story short. After a day of coding and tweaking I ended up with a simple graphical UI for my robot&amp;nbsp; that works pretty neat !&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial;"&gt;The source code can be found &lt;a href="http://www.robotmc.org/documents/nxtRemote_Qt4.zip"&gt;here&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1199441768185395350-1586114352286319727?l=ramacco.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramacco.blogspot.com/feeds/1586114352286319727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ramacco.blogspot.com/2009/12/commlib-gcc-qt4-nxt-remote-control.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/1586114352286319727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1199441768185395350/posts/default/1586114352286319727'/><link rel='alternate' type='text/html' href='http://ramacco.blogspot.com/2009/12/commlib-gcc-qt4-nxt-remote-control.html' title='CommLib + GCC + QT4 = NXT Remote control'/><author><name>Ramacco</name><uri>http://www.blogger.com/profile/06487311494934969536</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://3.bp.blogspot.com/_gD8THJoVMls/SVdVKGTF7RI/AAAAAAAAABA/MURkw0ub_eM/S220/figure.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_gD8THJoVMls/SzCfnyDkanI/AAAAAAAAAFU/n5m9acCAeS0/s72-c/nxtRemote.png' height='72' width='72'/><thr:total>4</thr:total></entry></feed>
