tag:blogger.com,1999:blog-79735501043397214972024-03-13T01:34:02.137+00:00MyBigIdeasRandom posts about stuff I doLeo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.comBlogger23125tag:blogger.com,1999:blog-7973550104339721497.post-8588537068693921982020-03-12T21:55:00.000+00:002020-10-19T21:14:55.568+01:00PiWars 2020: Collision warning!A major cause of the disasters that International Rescue get called out to are caused by collisions. Whether its a fuel tanker hitting a rock slide, or an experimental jet crashing into the ground, it usually results in a large explosion (regardless of how explosive the objects involved actually are). So when running autonomously how do we avoid Thunderbird 2 running into things? (Obviously in a manually controlled environment nothing is going to stop us crashing !).<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpfgLV0_KRMsnBu1Q1BJK5Vxhz1fVKgXnKqq66jyBRNT9MmuwoBgPlf1u-LWkSDREM3xdGS9pwLBQaOXZKMdjCxNJF9PtpAaPzxL79zw0IVy7_yv41oyA_9qDhpbGfUIk04tbJ9s0e9ks/s1600/boom.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="300" data-original-width="512" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpfgLV0_KRMsnBu1Q1BJK5Vxhz1fVKgXnKqq66jyBRNT9MmuwoBgPlf1u-LWkSDREM3xdGS9pwLBQaOXZKMdjCxNJF9PtpAaPzxL79zw0IVy7_yv41oyA_9qDhpbGfUIk04tbJ9s0e9ks/s320/boom.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Boom!</td></tr>
</tbody></table>
The answer is to add sensors that are capable of detecting how close it is to an object. Generally these are referred to as 'distance sensors', which come in a variety of form factors and types, and tend to work by 'firing' something outwards, waiting for it to bounce off a surface, return to the sensor and then measuring the travel time to determine how far away it is. This process is similar to working out how far away an object is by <a href="https://www.bbc.co.uk/bitesize/guides/z8d2mp3/revision/3" target="_blank">making a loud sound and listening for the echo</a>.<br />
<br />
Popular choices are ultrasonic sensors, which uses sound waves to determine distance, Time-of-Flight sensors, which use lasers, and some camera based systems (which use magic... or possibly maths).<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlAs2hnl5d6mqjq6NWcGZAyUPItfGbKBjrlsFL_WeyZe3iP2wNgeU_azbUSi2Hs9lzMUstezGkmIzHUa3pa2sxL7SkOIOnPdNkhwpnGUrI_agIf72ZVaWQp3ZHXWwbSGtME870t0_TQNA/s1600/Sensors2.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="225" data-original-width="800" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlAs2hnl5d6mqjq6NWcGZAyUPItfGbKBjrlsFL_WeyZe3iP2wNgeU_azbUSi2Hs9lzMUstezGkmIzHUa3pa2sxL7SkOIOnPdNkhwpnGUrI_agIf72ZVaWQp3ZHXWwbSGtME870t0_TQNA/s400/Sensors2.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sensors!</td></tr>
</tbody></table>
<br />My requirements for Thunderbird 2 are that the distance sensors are small enough to be hidden behind the 'air intakes' for the jet engines, and that multiple sensors can be used at the same time. This rules out the ultra sonic sensors, as the sound waves they fire out could get picked up by multiple sensors, giving an invalid reading, as well as the camera based systems. Instead I'll be using several <a href="https://www.st.com/en/imaging-and-photonics-solutions/vl53l1x.html" target="_blank">VL53L1X </a>Time-of-Flight sensors.<br />
<br />
There are a number of different models of the VL53L1X sensors, all built around the same core module, and which one you select depends on your requirements. In this case I wanted a module that had a small physical size, and exposed all the control pins.<br />
<br />
The VL53L1X sensor communicate via <a href="https://en.wikipedia.org/wiki/I%C2%B2C" target="_blank">I2C</a>. This is a protocol that allows multiple devices to be connected to the same physical bus (i.e. The communication pins are all connected together), which greatly simplifies the wiring as it allows you to chain multiple I2C devices together instead of needing each one to be directly connected to the Raspberry Pi.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyoccKHvmD2IAU9u8cgIRcnJa3Sdnsvg1fwKmAV7LbXt8k79FFhCdqn4yQrvhpPkAs2tm429v1dBsmVXEonrG2FhFBhdxY3S1Xu4TDoBCSrHe7oNYYKUm9KScDG2ZPh6XgecsO7waVXbA/s1600/I2CExample.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1269" data-original-width="1425" height="355" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyoccKHvmD2IAU9u8cgIRcnJa3Sdnsvg1fwKmAV7LbXt8k79FFhCdqn4yQrvhpPkAs2tm429v1dBsmVXEonrG2FhFBhdxY3S1Xu4TDoBCSrHe7oNYYKUm9KScDG2ZPh6XgecsO7waVXbA/s400/I2CExample.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">All connected to the same I2C bus.</td></tr>
</tbody></table>
<br />
To talk to an I2C device you need to know its address, similar to how you specify a house on a street by its number. According to the VL53L1X <a href="https://www.st.com/resource/en/datasheet/vl53l1x.pdf" target="_blank">datasheet</a> its default address is 0x52 (82 in decimal), which we use to make sure our post (the commands) reach the correct house.<br />
<br />
Unfortunately if all the sensors share the same I2C address then the postman is going to get very confused about where these messages should be delivered to. Luckily this particular sensor allows its I2C address to be changed, by sending a command. This could be considered a bit of a chicken or the egg issue, how do you tell a sensor to changes its address when you can't send a message until the addresses have been changed?<br />
<br />
Luckily the designers of the VL53L1X sensor did consider this and provide an extra PIN, called XSHUT, that can be connected to a GPIO which turns on or off the sensor. Allowing us to turn on one at a time, reconfigure it,s address and move to the next. Now not all ToF sensor models expose this PIN, so this is another item we need to check for,<br />
<br />
After a bit of searching around, and measuring of space, I found one produced by <a href="https://www.pololu.com/product/3415" target="_blank">Pololu</a> that looked like it would meet all the criteria. Purchasing one to double check the fit, always a sensible idea before you commit, before getting all 4.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDSRd7PKS_8XwXxX4guEmJsFaSlsuQE9cBXEAwBTzbvWJQ5wqEwX-2ecDMFTTQZbIhDNeRumS9YV2345k9o4vH32COyJNW6mwdalstr-LnCJfUZI60lv0q2EzSGyQzdkpJMDWxCV-22sg/s1600/IMG_20191217_204445.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="637" data-original-width="1024" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDSRd7PKS_8XwXxX4guEmJsFaSlsuQE9cBXEAwBTzbvWJQ5wqEwX-2ecDMFTTQZbIhDNeRumS9YV2345k9o4vH32COyJNW6mwdalstr-LnCJfUZI60lv0q2EzSGyQzdkpJMDWxCV-22sg/s400/IMG_20191217_204445.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">It fits!</td></tr>
</tbody></table>
I initially connected the sensors via jumpers leads, but quickly decided this was too bulky and inflexible to fit inside the case, especially as I had four to connect up! Taking advantage of the ability to chain I2C devices I switched to ribbon cable, a thinner and more flexible cable, along with some 1x7 connectors. This worked at first, but when I came to chain two I managed to get the cable a little twisted, mis-wired the connector, and managed to produce a 'burning' smell from a sensor... Ooops!<br />
To avoid this in future I purchased some multi coloured ribbon cable, making it much easier to work out where each cable goes (Even later on I found the roll of rainbow colour ribbon cable I'd bought a year or two earlier...<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzhR6KpB_NqTHuzAqR9HehdyV2uXgD35zkRqU5ZEM4V708Af1_Cp5iFX-_O9tmDgtwy35Emd2hD25WWYhH2dmyjUqMx8NGgQVKRD3MX32bHDCyEQW1MTzk9WxDqxX_2llpZgKDhUlx8Nw/s1600/Ribbon.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="555" data-original-width="1024" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzhR6KpB_NqTHuzAqR9HehdyV2uXgD35zkRqU5ZEM4V708Af1_Cp5iFX-_O9tmDgtwy35Emd2hD25WWYhH2dmyjUqMx8NGgQVKRD3MX32bHDCyEQW1MTzk9WxDqxX_2llpZgKDhUlx8Nw/s400/Ribbon.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Two sensors in a nice, neat, rainbow coloured line.</td></tr>
</tbody></table>
Repeating the setup on the other side I know have a full set of four sensors, two pointing forwards and one pointing to either side. This allows Thunderbird 2 to detect walls in front, and either side, in theory allowing it to safely navigate through the maze and the lava palava course.<br />
<br />
Now all it needs is someway of actually moving! Which I plan on covering next time!<br />
<br />
Leo<br />
<br />Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-33101490816163588802020-02-20T21:40:00.001+00:002020-02-20T21:40:15.658+00:00PiWars 2020: Brains<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpIHz-4Ccw1zeJolFU3RGp7jpKiRCMisgLAMjVpWIPRVraqLi_SLBe3oqgeJj4wvtnv2fu328Y3Ut3YzzTndDh1hSMr2eOwBWO9jnUcO_AnZxsZjpI3CzxEy1-ysd604uXj8ljPqcsxSI/s1600/Brains.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="172" data-original-width="317" height="108" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpIHz-4Ccw1zeJolFU3RGp7jpKiRCMisgLAMjVpWIPRVraqLi_SLBe3oqgeJj4wvtnv2fu328Y3Ut3YzzTndDh1hSMr2eOwBWO9jnUcO_AnZxsZjpI3CzxEy1-ysd604uXj8ljPqcsxSI/s200/Brains.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Mr X and Mr Hackenbacker</td></tr>
</tbody></table>
With the chassis cut to size its time to start thinking about brains. No, neither Mr X. or Mr <span style="background-color: white; color: #222222; font-family: sans-serif; font-size: 14px;">Hackenbacker, nor the type of brains that the targets in the Zombie Apocalypse challenge would be interested in snacking on. </span><br />
<span style="background-color: white; color: #222222; font-family: sans-serif; font-size: 14px;"></span><br />
<span style="background-color: white; color: #222222; font-family: sans-serif; font-size: 14px;"></span>
<span style="background-color: white; color: #222222; font-family: sans-serif; font-size: 14px;">Instead the brains of a PiWars robot has to be a Raspberry Pi, and in this case a Raspberry Pi 3A. Its combination of smaller size, whilst maintaining the power of its full sized brethren, makes it a go-to solution for many of the PiWars competitors.</span><br />
<span style="background-color: white;"><span style="color: #222222; font-family: sans-serif;"><span style="font-size: 14px;"><br /></span></span></span>
<span style="background-color: white;"><span style="color: #222222; font-family: sans-serif;"><span style="font-size: 14px;">Why not a shiny new Raspberry Pi 4 I hear you ask? Well for one a full sized Raspberry Pi takes up too much space in the cockpit, it would fit but then the battery wouldn't. Its also unlikely that any processing I need to do for the challenges would noticeably benefit from the increased performance, whereas the increased power draw, and heat produced, could have a detrimental affect on the robot. The additional i2c buses might be of use, but unless a 4A is suddenly announced I'll be sticking with the 3A.</span></span></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjY9Ox3Ryf-Xx02ihIFsZ96BKliG5wDpGCyM8OOiWQQFt_cHFS_m4QerGF-r_23VQ3DxiSzL3q3M3LnVtYaf-MJEhNIwUpGWBNuNp0iUtKWjHbfYPJEyGygjQ8nXoO7EE8FQ9M2-sS2RU/s1600/TB2s.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="731" data-original-width="1280" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjY9Ox3Ryf-Xx02ihIFsZ96BKliG5wDpGCyM8OOiWQQFt_cHFS_m4QerGF-r_23VQ3DxiSzL3q3M3LnVtYaf-MJEhNIwUpGWBNuNp0iUtKWjHbfYPJEyGygjQ8nXoO7EE8FQ9M2-sS2RU/s320/TB2s.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Too big on the left, fits on the right (Battery hidden out of sight)</td></tr>
</tbody></table>
<span style="background-color: white;"><span style="color: #222222; font-family: sans-serif;"><span style="font-size: 14px;">Now a brain is of limited use without inputs to process and outputs to control. For the manual challenges the input will be a Bluetooth connected PS4 controller, an upgrade for this year as my, more traditional, PS3 controllers are starting to show their age with the joysticks being a little unreliable.</span></span></span><br />
<span style="background-color: white;"><span style="color: #222222; font-family: sans-serif;"><span style="font-size: 14px;"><br /></span></span></span>
<span style="background-color: white;"><span style="color: #222222; font-family: sans-serif;"><span style="font-size: 14px;">For the autonomous challenges the main inputs will be a Raspberry Pi camera, and a set of 4 VL53L1X Time of Flight (ToF) sensors positioned around Thunderbird 2. The camera, when combined with <a href="https://opencv.org/" target="_blank">opencv</a>, will be used to take pictures and perform either object, or more simply, colour recognition to aid in navigation. The ToF sensors, which work by firing lasers, will be used to detect how close Thunderbird 2 is to a wall or object.</span></span></span><br />
<span style="background-color: white;"><span style="color: #222222; font-family: sans-serif;"><span style="font-size: 14px;"><br /></span></span></span>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikazZLGt9hHRr8I9cay9yraFMSAayaP3FM44sWVMvqXlQ823a-Z8D8i8lZX-lO6iPbuGKzHKVO_mEefAD_X02fRf6Uk39OOqIk5GZi_QW4XisVCIyVQMwc8jvYEnzQpyVJs4UfUoZmU-A/s1600/Sensors.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="258" data-original-width="581" height="142" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikazZLGt9hHRr8I9cay9yraFMSAayaP3FM44sWVMvqXlQ823a-Z8D8i8lZX-lO6iPbuGKzHKVO_mEefAD_X02fRf6Uk39OOqIk5GZi_QW4XisVCIyVQMwc8jvYEnzQpyVJs4UfUoZmU-A/s320/Sensors.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">RPi Camera and ToF sensor </td></tr>
</tbody></table>
<span style="background-color: white;"><span style="color: #222222; font-family: sans-serif;"><span style="font-size: 14px;">The camera will be positioned above the cockpit so it can look ahead, but might get moved to more suitable locations as required for the various challenges. The ToF sensors will be aimed forwards and to the sides, which I'm hoping will help in navigating the 'Escape route' and 'Lava Palava' courses, allowing Thunderbird 2 to maintain a set distance away from a wall, and to detect when its about to drive into one.</span></span></span><br />
<br />
The obvious output will be the motors that drive Thunderbird 2 around, with the less obvious being the gun for Zombie Apocalypse and, if I manage to get to it in time, a mechanism for capturing barrels in 'Eco Disaster'. I also hope to have an actual GUI this year that will be displayed on a wrist mounted Raspberry Pi (Fitting in with the newer 'Thunderbirds Are Go' way of remotely controlling one of the Thunderbirds).<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6ijHY1GwAWC0357040h3Gd8ZFv5A5uQTC0WYLqnNanjQqgmiPA5xkLkbJPwjm2WKnPMMN7fm5x4jstgq3tQV69K9Cx6gRAjbQeo9cB6jRYnv95p4QdoPK721qJalz0Nz8p1aM0x-E89Y/s1600/motors.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="688" data-original-width="1280" height="172" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6ijHY1GwAWC0357040h3Gd8ZFv5A5uQTC0WYLqnNanjQqgmiPA5xkLkbJPwjm2WKnPMMN7fm5x4jstgq3tQV69K9Cx6gRAjbQeo9cB6jRYnv95p4QdoPK721qJalz0Nz8p1aM0x-E89Y/s320/motors.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Motors!</td></tr>
</tbody></table>
Connecting everything up is liable to be a python program or two, hopefully reusing some of last year's code, but most likely a whole bunch of new stuff. I'm currently feeling drawn to having dedicated python processes to monitor different aspects, say a dedicated process for dealing with the ToF sensors, feeding the results to the main controlling application that then decides if its interested in the information or not.<br />
<br />
Of course I'll be going into more detail on these items in future blog postings, unless I completely run out of time and abandon them!<br />
<br />
LeoLeo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-7896042359303948812020-01-23T20:57:00.001+00:002020-01-23T20:57:22.543+00:00PiWars 2020: Making the cutBefore I can best plan out how to convert the Thunderbird 2 toy into a successful PiWars competing robot I need to open it up and see what I'm working with. Happily the toy opens up quite nicely, just a case of removing every screw you can see on the underside of the chassis and popping the two halves apart. Most of the internal items also unscrew easily with the notable exception of the tail. Whilst it looks to just be held in place by 2 screws either side, it appears that the manufacturer also glued it into place for extra strength, and by the time I realised this I'd snapped off one of the supports...<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPxLq_teIDyudVfqhqii99CjkSu3FN3_-4j_RFbQE86TfUiJB2OvUeoRCsDVcl4ep0thqer5lpkzAUZL0Dh6cj-BqqV5Xh9Jf_X0vIy-UrP7tHX2jIcu2Fa-GH1CEX07uOu8R7Y8t0OFc/s1600/TB2-CaseOpen.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1044" data-original-width="1600" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPxLq_teIDyudVfqhqii99CjkSu3FN3_-4j_RFbQE86TfUiJB2OvUeoRCsDVcl4ep0thqer5lpkzAUZL0Dh6cj-BqqV5Xh9Jf_X0vIy-UrP7tHX2jIcu2Fa-GH1CEX07uOu8R7Y8t0OFc/s400/TB2-CaseOpen.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Opening up the chassis</td></tr>
</tbody></table>
The pod themselves open up nicely too, just remove a couple of screws and pop it apart. Remove a few more screws and the launching mechanism for Thunderbird 4 comes out as well.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiPIiahf3scpczvzgl-LpYfp25cfe7Ba5TgT3plieRGGCN9kGeplj236He9NhIgB0wnDmugCRoJsk_5D_LMsIa3V9Co-xYP6oxszs8_8xpu48BjNztPDPCgish9rWVjMX7lYAleM8nZHg/s1600/TB2-PodOpen.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="777" data-original-width="1600" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiPIiahf3scpczvzgl-LpYfp25cfe7Ba5TgT3plieRGGCN9kGeplj236He9NhIgB0wnDmugCRoJsk_5D_LMsIa3V9Co-xYP6oxszs8_8xpu48BjNztPDPCgish9rWVjMX7lYAleM8nZHg/s400/TB2-PodOpen.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">And opening up a Pod.</td></tr>
</tbody></table>
<br />
In terms of usable space the main two areas of interest are the inside of the cockpit and pod. These can both house a full size Raspberry Pi, barely in the case of the cockpit, and with room to spare in the pod. As my plans are to swap out the pods for different challenges this means the controlling Raspberry Pi must be housed in the cockpit (to comply with the rules of PiWars), leaving the Pod to house the motors and any additional hardware required to complete the challenges.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGG0f7I2U-AImY5udenEj6YiA6_FEA8lMrREqCk2OXZE04dcsanXmYaDw22_Lzl8RpPByEOMR7I4F1-hciCp3b1NogfO36_Ubr5dWdNaLanpwmN8TIQqHk4t7gHpM-zdgJNGcGmrupoeI/s1600/TB2-SpaceOptions.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1065" data-original-width="1600" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGG0f7I2U-AImY5udenEj6YiA6_FEA8lMrREqCk2OXZE04dcsanXmYaDw22_Lzl8RpPByEOMR7I4F1-hciCp3b1NogfO36_Ubr5dWdNaLanpwmN8TIQqHk4t7gHpM-zdgJNGcGmrupoeI/s400/TB2-SpaceOptions.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Tight squeeze on the left, roomy on the right.</td></tr>
</tbody></table>
With the toy opened up what's the next step? Well, those who read through my PiWars application details in the last posting may have spotted the line at the end stating that the Thunderbird 2 model is too long and needs cutting down to size...<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWbuLCsQ6mJm8fqikncRphov_gdKTjulHTEfE9BZ0QNsU__DHO0XCoNvkif9T8Q2KUGsBNYv5E5oYwrL42rFjVGeriitYZuXJS7ede6a2cSj9O7Sfztzg7To3EihYO6V0inU1dJZhtq_8/s1600/IMG_20190729_205907.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="797" data-original-width="1600" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWbuLCsQ6mJm8fqikncRphov_gdKTjulHTEfE9BZ0QNsU__DHO0XCoNvkif9T8Q2KUGsBNYv5E5oYwrL42rFjVGeriitYZuXJS7ede6a2cSj9O7Sfztzg7To3EihYO6V0inU1dJZhtq_8/s400/IMG_20190729_205907.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">So the length limit is 300mm...</td></tr>
</tbody></table>
Last year, in PiWars 2019, I made an effort to keep Wall-E looking like the original toy, which turned out to be a challenging task, but at the end I was happy with my decision (Apart from maybe the gear box failures!). With Thunderbird 2 that just isn't going to be an option, so with the cockpit ear marked for holding a Raspberry Pi then its the tail that will have to be chopped off. I had hoped to keep the battery compartment, which is towards the rear, but the vast majority of that also fell outside the 300mm length limit.<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibGqHTz2OkbtGZmTw8_dQcaDm-oZ5E15to4FpZRUE33EsmqRmM5Qw4COOfFdXLFx1DqUMqFJXPegF3OLkLaqpLEG1TC-9eOINnHseS85Lld0JA2RFxABbx5E0mCGP96xDUOn_cY0Q6c0M/s1600/Cutter.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1298" data-original-width="1280" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibGqHTz2OkbtGZmTw8_dQcaDm-oZ5E15to4FpZRUE33EsmqRmM5Qw4COOfFdXLFx1DqUMqFJXPegF3OLkLaqpLEG1TC-9eOINnHseS85Lld0JA2RFxABbx5E0mCGP96xDUOn_cY0Q6c0M/s200/Cutter.jpg" width="196" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Big and cutty</td></tr>
</tbody></table>
But how to remove it? As I have recently started attending a MakerLab, I've gained access to a variety of big cutting tools and I decided to give one of those a go. After all a mains powered, table mounted bandsaw thingie should have no trouble cutting through toy grade plastic...<br />
Well technically it had little trouble cutting through Thunderbird 2, however it generated so much heat that the plastic melted back together again afterwards! Requiring a bit of wiggling and hacking at until the tail could be broken away, plus a bunch of post processing to tidy up the cut.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8pJCGr1_UHdYlOfT8R9daFlCQQ_LMg5mdhJcSgRlH0yNggNH-2HUjRqw7xlw8Rdg3vGF8gryC72_pojsPZ6-CJidjf5Yv_8HKjDCZlUduFSbTb94pNgEbmRkIHxphdmqiBm2jGaT2Fac/s1600/TB2-RearTidy.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="279" data-original-width="1600" height="107" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8pJCGr1_UHdYlOfT8R9daFlCQQ_LMg5mdhJcSgRlH0yNggNH-2HUjRqw7xlw8Rdg3vGF8gryC72_pojsPZ6-CJidjf5Yv_8HKjDCZlUduFSbTb94pNgEbmRkIHxphdmqiBm2jGaT2Fac/s640/TB2-RearTidy.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Transitioning from scruffy to nice and smooth.</td></tr>
</tbody></table>
The tail section has quite a lot of weight to it, so now its been removed Thunderbird 2 gets a little front heavy, and will get even more so when the battery and Raspberry Pi are installed. So the plan is to install counter weights to balance things out. Where I can I hope to reconnect the tail section as an 'attachment' for some of the challenges, and Mike has helpfully confirmed its okay for the attachment section to be on the back. Hopefully a few magnets will be strong enough to hold it in place, whilst also allowing for easy removal. However this isn't strictly necessary and will be in the 'nice to have' list of features.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAaDyTy6y95aY1hTbErbZIrKtnxNwujiKep3Sn7a6uNcvsiGI6Kz_qOErTxD5eYFrNwalT3jDOlePPn05jw8FP7TQ6KzSyQcjt_hcXidStOrhQFyqhDvy8TJ5GPBspTCWJN9hIudVWK5s/s1600/TB-fullsize.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="908" data-original-width="1280" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAaDyTy6y95aY1hTbErbZIrKtnxNwujiKep3Sn7a6uNcvsiGI6Kz_qOErTxD5eYFrNwalT3jDOlePPn05jw8FP7TQ6KzSyQcjt_hcXidStOrhQFyqhDvy8TJ5GPBspTCWJN9hIudVWK5s/s400/TB-fullsize.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Thunderbird 2 - Compact edition</td></tr>
</tbody></table>
With the chassis cut down to size the next step will be installing the brains!<br />
<br />
LeoLeo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-3685184530596621942020-01-14T21:17:00.001+00:002020-01-14T21:17:39.693+00:00PiWars 2020 : Calling International Rescue!<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNXs7woR9i6WzzdM2f56AsmyVDS7ROD3523BZ4ExSnARiAhp3wSJV-sD_ADRoOLmLxUaUjGTHRamJ6_v2rrpg_QHMevWcOE6_teCZpqJlgJWV2rrOceNs-8hJuu6hjh_oVMv1sQcI4724/s1600/WallE1.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1600" data-original-width="1201" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNXs7woR9i6WzzdM2f56AsmyVDS7ROD3523BZ4ExSnARiAhp3wSJV-sD_ADRoOLmLxUaUjGTHRamJ6_v2rrpg_QHMevWcOE6_teCZpqJlgJWV2rrOceNs-8hJuu6hjh_oVMv1sQcI4724/s200/WallE1.jpg" width="150" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Wall-E from PiWars 2019</td></tr>
</tbody></table>
Its a New Year and a new <a href="https://piwars.org/" target="_blank">PiWars</a>. PiWars 2020 is coming in March and once again I've managed to get selected as a competitor! After the success of last years' Space themed event (My entry being the lovable robot Wall-E) Mike and Tim decided to repeat it for 2020, this time going for a 'disaster' theme, either natural or man-made, with a leaning towards disaster related movies.<br />
<br clear="all" />
I can come up with a lot of ideas for disaster themed robots, one with a volcano on it, or a bursting dam (pumping water back behind the dam so it can burst again), or just an alien robot come down to Earth to destroy and invade.<br />
<br />
All fun projects, but there was a toy conversion I've had on the back burner for a while and this seemed an appropriate time to use it. After checking that 'rescue' themed robots were included in the 'disaster' category I submitted my application for Thunderbird 2. After all, where there's a disaster International Rescue won't be far behind!<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhok4d_3D_yyld_C4ky9wZIZCogg0SQ8p7Ck05stB-75Lz0_cF15U7CUN9E9BT_2pOduHw9o1vw8T9fJRWSZbPDy-FKog6dvWZgyWrH9gJFIjJrbyOu1IaR4ldA2z4WGHiEqewtMXEZE9A/s1600/TB2-1.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1134" data-original-width="1600" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhok4d_3D_yyld_C4ky9wZIZCogg0SQ8p7Ck05stB-75Lz0_cF15U7CUN9E9BT_2pOduHw9o1vw8T9fJRWSZbPDy-FKog6dvWZgyWrH9gJFIjJrbyOu1IaR4ldA2z4WGHiEqewtMXEZE9A/s400/TB2-1.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Thunderbird 2!</td></tr>
</tbody></table>
<br />
As this is the 5th time I've entered PIWars you'd think I'd have a good handle on what to do. However, in reality, I'm still making a lot of this stuff up as I go along. But.... as long as I write down my ideas it becomes 'planning' which is a much more responsible sounding word.<br />
<br />
So what sort of ideas did I write down? Mmmm rather a lot! Here's a copy of my application (Might also be of interest to anyone wondering what to put in a future Pi Wars application)<br />
<br />
<div style="background-color: grey; border: black solid 1px; color: white;">
<code>
Robot will be built around the Thunderbird 2 Supersize toy
(From 2015).<br />
<br />
The main chassis will contain a RPi 3A+ as the main controller, as
well as a battery, camera and multiple ToF sensors (One under each air
intake on the front, plus one on either side). Other
sensors/components may be added as the build progresses..<br />
<br />
Actual propulsion will be contained inside the Pod (As this is the
only section that touches the ground) and it is planned that the Pod
will be swapped out for the various challenges. Initially the RPi 3A+
will be connected physically to the motor driver inside the Pod (e.g.
via i2c), but if development goes well this will change to a wireless
communication (NFC, bluetooth, WiFi, something else?). Ideally I’d
want to get to the point where the Pod can just be swapped out, the
RPi 3A+ automatically detects this (via NFC) and the software updates
as appropriate.<br />
<br />
<br />
Current plans for Pods are<br />
<br />
Pod 1: This will be the standard Pod that will be used in the majority
of challenges. Current plan is that it’ll contain a twin set of
tracks, that come through the floor of the pod, which also includes
some limited vertical movement. So for the obstacle course the
‘bottom’ of TB2 can be raised by 1 or 2 cms to clear obstacles,
ramps etc. It may also contain a line following sensor for the ‘Lava
palaver’ challenge, if that doesn’t end up being carried in the
main chassis.<br />
<br />
Pod 2: This pod will be targeted at the ‘Zombie Apocalypse’
challenge. It will have a much simpler motor mechanism to free up
space inside the pod (prob. Just a couple of wheels to allow movement
over flat terrain). This extra space will be used to house a rotating
turret to fire foam darts at the targets. Expectations are that this
will rotate left and right to allow more precise targeting, compared
to moving the entire robot, as well as some limited up and down
movement to fire up and down. A laser will be installed to improve
aiming.<br />
<br />
Pod 3: This pod will be targeted at the ‘Eco-Disaster’ challenge.
Again this will have a simpler motor mechanism, probably a match for
Pod 2, but this time the space will contain a gripper arm that will be
deployed out the front of the Pod (The main TB2 chassis will be raised
to accommodate this). This will have to be fairly long, as TB2’s
nose can’t clear the barrel height, and will be used to grip and
capture the barrels. Holding them in place as they are delivered to
the target areas. Expectation is to use an IR beam, or physical
button, in the gripper to detect when it should close. As well as a
second camera that will be used to verify the colour of the barrel
(This will be streamed to the RPI 3A+ over WiFi for processing).<br />
<br />
If time permits, and it turns out to be practical, a mask will come
out the top of the Pod and hold a third camera that points downwards
(With a wide lens) to better detect barrels in all directions, instead
of having to rotate around until one crosses the LoS of the front
mounted camera (Or this may end up coming out of the top of the TB2
cockpit for ease of connecting up)<br />
<br />
This camera mask mechanism may also be used for the ’Minesweeper’
challenge, to detect which square is lit up.<br />
<br />
Control will be done via a simple UI accessed via VNC or web page from
a wrist mounted device (vaguely matching how remote control of TB2 is
done in the newer ‘Thunderbirds Are Go’ series). This is liable to
be another RPi with a touch screen display.<br />
<br />
Note: As the TB2 model is too long, the engines and tail have been cut
off to meet the max length in the rules. Outside of the challenges
this will prob. Be attached via magnets for appearances sake.
</code></div>
<br />
Will I complete all these tasks? Well I've never managed it before! But only time will tell...<br />
<br />
Leo
Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-28006697550004602822019-03-15T23:43:00.000+00:002019-03-15T23:44:01.618+00:00PiWars: Planning for the Autonomous challengesIn previous PiWars I've not done so great on the autonomous side of things, so this year I'm looking to do better (Which, of course, I also said last time). For the 2019 competition there are three autonomous challenges, <a href="https://piwars.org/2019-competition/challenges/nebula/" target="_blank">The Hubble Telescope Nebula Challenge</a>, <a href="https://piwars.org/2019-competition/challenges/maze/" target="_blank">The Canyons of Mars</a> and <a href="https://piwars.org/2019-competition/challenges/blast-off/" target="_blank">Blast Off: the Straight-ish Line Speed Test</a>.<br />
<br />
Of these challenges the only one I've attempted before at PiWars is 'Blast Off', utilising a line following sensor to stay on course. The challenge is a little trickier this time as its no longer a straight run, I'm guessing so the competing robots can't just zoom straight ahead, but actually have to track and follow the line (Or detect the walls).<br />
<br />
Reading through the challenges Wall-E will need to be able to detect when he's close to a wall, check for colours (four colours for the Nebula, green alien faces for Mars) and track a line on the floor. So in theory a combination of a camera (With OpenCV for processing) and a distance sensor should be able to cover these combinations.<br />
<br />
For the camera I'll be going with one that connects to the Raspberry Pi's camera port. This should ensure maximum performance and compatibility, along with enabling all the hardware image processing that the Raspberry Pi supports.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtRE7In7L3hat1RWQrHDmdZkO03U-e07DDOH1MaSfst71xPVYRxILNu35IhJghbxcESxz68-bdDG7r6ZH7BocWY1TZbQc3qMXNwadGnHY5zPoyao3xJH0K24BAjIg_l_vIrv0NshmoICM/s1600/IMG_20190315_232704.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="500" data-original-width="1600" height="98" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtRE7In7L3hat1RWQrHDmdZkO03U-e07DDOH1MaSfst71xPVYRxILNu35IhJghbxcESxz68-bdDG7r6ZH7BocWY1TZbQc3qMXNwadGnHY5zPoyao3xJH0K24BAjIg_l_vIrv0NshmoICM/s320/IMG_20190315_232704.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A tiny camera!</td></tr>
</tbody></table>
<br />
For distance sensors the choice tends to be between ultrasonic and laser based modules. With the former being sound based, and less likely to be affected by the strong sunlight that often lights up the PiWars courses, and the later being light based and generally more accurate. Whilst I already own both, and the accuracy for these challenges doesn't have to be that precise, the ultrasonic sensors do require a lot of space to install.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNl3-KkLn5xiZ1UcoW-lIABRZtyi3rX1FjNL3CQ3mRhJtJpKOfYVP5zzBmNZ5tX_OnXlw1RIKCkFBdL9LN9xLInKhywlY1DmgyGcv-m_JyQV41_m7g3yqFgfEs9kqFohQIdOb3T5ROvYU/s1600/HC-SR04.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="371" data-original-width="579" height="128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNl3-KkLn5xiZ1UcoW-lIABRZtyi3rX1FjNL3CQ3mRhJtJpKOfYVP5zzBmNZ5tX_OnXlw1RIKCkFBdL9LN9xLInKhywlY1DmgyGcv-m_JyQV41_m7g3yqFgfEs9kqFohQIdOb3T5ROvYU/s200/HC-SR04.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A little too bulky.</td></tr>
</tbody></table>
As one of my aims is keeping modifications to Wall-E's chassis to a minimum I've decided to go with a laser based sensor, specifically the <a href="https://shop.pimoroni.com/products/vl53l1x-breakout" target="_blank">VL53L1X </a>ToF sensor from Pimoroni. Its designed to work with a Raspberry Pi, so I don't have to worry about voltage conversions, and is compact enough to fit into one of the side pods in Wall-E's base.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhbTWjbEmN1OpC0rF-lsiONTAUGGQ-7V3OlBHF1sEREAjs9ZChi8MuzyW_Rxs7RKUbY8akC3kF-ZVvqJczFz_1j3ESI8_dUWtEW7ThJi96IiY9X5xq4ymAwNh-ezccQYE_GKaFlFKr9C4/s1600/IMG_20190315_232438.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1600" data-original-width="1415" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhbTWjbEmN1OpC0rF-lsiONTAUGGQ-7V3OlBHF1sEREAjs9ZChi8MuzyW_Rxs7RKUbY8akC3kF-ZVvqJczFz_1j3ESI8_dUWtEW7ThJi96IiY9X5xq4ymAwNh-ezccQYE_GKaFlFKr9C4/s200/IMG_20190315_232438.jpg" width="176" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Much smaller!</td></tr>
</tbody></table>
Whilst a laser conjures images of a straight line of light, the ToF sensor actually have a field of view of over 20 degrees. So when I first lined up and installed the laser in Wall-E I was constantly getting short distances reported, due to the laser light reflecting off the underside of Wall-E. This, of course, meant moving the laser down lower, so Wall-E ended up with an extra hole in his front. Perhaps I should have done a little more testing of positions before drilling holes, but it was kind of an awkward location to get to from outside.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6syM7mQnWl7zsU_NVAFn4ZV59yLYYXK150-65bQDJjDOFDcGPWuteOMblR-qk3pXuLa4v2JhMdCIHnUHZVc9sNz8z98NV8KZ_wudnKXBRU7-n1HyUmNUBIGIE1SJAXvkq31569bIl62c/s1600/IMG_20190125_203828.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1205" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6syM7mQnWl7zsU_NVAFn4ZV59yLYYXK150-65bQDJjDOFDcGPWuteOMblR-qk3pXuLa4v2JhMdCIHnUHZVc9sNz8z98NV8KZ_wudnKXBRU7-n1HyUmNUBIGIE1SJAXvkq31569bIl62c/s320/IMG_20190125_203828.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The laser sensor installed low and out of sight.</td></tr>
</tbody></table>
Whilst the sensor and camera are installed and connected they won't do anything without some software to control them, which we'll get to next time!<br />
<br />
Leo<br />
<br />
<br />
<br />Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-18753079657603345712019-03-14T21:34:00.001+00:002019-03-14T21:34:31.192+00:00PiWars: Driving Wall-EEvery robot competing in PiWars needs to have a Raspberry Pi as its brain. These days there's a whole range to choose from, ranging from the small and compact PiZero, all the way up to the most powerful 3B+. As some of the autonomous challenges require performing some simple image processing I wanted a Raspberry Pi model with a decent amount of CPU, which rules out the PiZero, but at the same time there's limited space inside the Wall-E chassis so I'd benefit from the smaller form factors.<br />
Happily an updated version of the <a href="https://www.raspberrypi.org/blog/new-product-raspberry-pi-3-model-a/" target="_blank">Raspberry Pi A+</a> was released at the end of 2018. This has the newer CPU, WiFi and Bluetooth of the Raspberry Pi 3 B+, but in a smaller package. Of course this does come with some sacrifices, only half the memory, a slightly lower top CPU speed and no Ethernet port. But the pros definitely out way the cons.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjasPSfnYXpmdvlukMGwk19tlwv6utgJNv_aGlawTiQo0T26rb3v3WKJNB8-jY5W5lzu59TSblPDQZqNu19Wqep-WmQPer7Ql8iBiVFXNdOiC51a1Aa4lrAT6Yut-9iCgaO-e73Pe4yRHA/s1600/3A2-1-500x332.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="255" data-original-width="304" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjasPSfnYXpmdvlukMGwk19tlwv6utgJNv_aGlawTiQo0T26rb3v3WKJNB8-jY5W5lzu59TSblPDQZqNu19Wqep-WmQPer7Ql8iBiVFXNdOiC51a1Aa4lrAT6Yut-9iCgaO-e73Pe4yRHA/s1600/3A2-1-500x332.jpg" /></a></div>
<br />
With the brain sorted the next item to think about is driving the motors, as every challenge in PiWars requires the robot to move. I've collected a number of motor drivers over the years, but one I've yet to get around to trying is the <a href="https://www.piborg.org/motor-control-1135/thunderborg" target="_blank">PiBorg Thunderborg</a>. This motor controller can easily drive two motors, can be powered from a wide range of voltages and also produces a 5V output to power the Raspberry Pi itself. This helps keep down number of other components I need to fit into the case.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG1RrfDxEwVoKdy2VyQpGKJWoO2c_gPvGudg0kAV53kca2GTIJJk7Sh0O-5Nz2XroQuppHIjRwS25yQpRU866WZfU0SK3jcz_R406db6PQw0aDpfnSl4nDYfCh5Mo-LlprP0-GJsyLbBU/s1600/DSC_0003-1024x780.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="487" data-original-width="640" height="243" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG1RrfDxEwVoKdy2VyQpGKJWoO2c_gPvGudg0kAV53kca2GTIJJk7Sh0O-5Nz2XroQuppHIjRwS25yQpRU866WZfU0SK3jcz_R406db6PQw0aDpfnSl4nDYfCh5Mo-LlprP0-GJsyLbBU/s320/DSC_0003-1024x780.jpg" width="320" /></a></div>
<br />
With these two components selected I placed them in Wall-E's chassis in a variety of positions, trying to determine where they should go. I wanted to minimise the impact they may have on other items I would add later, but not place them in some strange positions that they would be complicated to mount. So after a few attempts it looked like the best place for the Raspberry Pi is where the original PCB was, with the motor controller fitting between it and the motors.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX8X7S5WUy4TJ6eBdp5eIG15uBi7FikUaTEs3Ru0kDJrr0db0wEgLtpNqkmANfOBW2Mpnn5W3xV1enEtGy-e9qhVtprSgdu4Lt5_EphQ1wMRluiZR3n287lS8waA6YWovWgiG1qu6HvAI/s1600/IMG_20190108_212307.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1600" data-original-width="1592" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX8X7S5WUy4TJ6eBdp5eIG15uBi7FikUaTEs3Ru0kDJrr0db0wEgLtpNqkmANfOBW2Mpnn5W3xV1enEtGy-e9qhVtprSgdu4Lt5_EphQ1wMRluiZR3n287lS8waA6YWovWgiG1qu6HvAI/s320/IMG_20190108_212307.jpg" width="317" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Squeezing components into Wall-E's chassis</td></tr>
</tbody></table>
Unsurprisingly the original screw holes aren't in the correct position for the new components, so a couple of mounting plates are needed. In theory I could just use a piece of wood or thick cardboard, but, as I have access to a 3D printer, I was able to design and print out custom mounting plates for very little cost.<br />
<br />
<div style="text-align: left;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOXik5HsVn_t7prPvAqtY8YeXCrbqxSD2Yeo4-AZSVfEYqZowP2hOWp8hoe0_hzBkoZyjmqQZHzPzhawp99QTWaMIXDHWHQYFFXVluRc-VVJJW69uqN_w9QAebaRwI8at-a4ORwRbqmhs/s1600/Mounts.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="278" data-original-width="800" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOXik5HsVn_t7prPvAqtY8YeXCrbqxSD2Yeo4-AZSVfEYqZowP2hOWp8hoe0_hzBkoZyjmqQZHzPzhawp99QTWaMIXDHWHQYFFXVluRc-VVJJW69uqN_w9QAebaRwI8at-a4ORwRbqmhs/s640/Mounts.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Initial Raspberry Pi and motor mounts designs</td></tr>
</tbody></table>
<div style="text-align: right;">
</div>
The final component to add to the mix is a portable power source, AKA a battery. Once more I'll be going with a LiPo battery for its energy density, providing a lot of power for very little space. The choice for the battery itself was rather simple, I measured the space I had left inside the chassis and looked for a battery to fit it.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3vbopK5Zgv7vSC1lk83V2_mumS55SzbyehxvRLMPUpuFXaKJupFAyovN7LJcbfocPeT4gGtvM0qiZ0eaNcYIDEcMtOJ27ih3yUzpHcWJrkygq_YSgkCu6eZ01a1izk-Oszh-XKhKf4o/s1600/Battery.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="273" data-original-width="800" height="108" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP3vbopK5Zgv7vSC1lk83V2_mumS55SzbyehxvRLMPUpuFXaKJupFAyovN7LJcbfocPeT4gGtvM0qiZ0eaNcYIDEcMtOJ27ih3yUzpHcWJrkygq_YSgkCu6eZ01a1izk-Oszh-XKhKf4o/s320/Battery.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">It fits!</td></tr>
</tbody></table>
Putting all this together, slapping on a little bit of python, and I was able to take Wall-E out for a spin. As one of the new challenges involves 'uneven terrain' I wanted to see how he handled over a non-smooth surface. Turns out he's a little top heavy, but already he's reached the point where he could tackle the manually controlled challenges. (Not necessarily do well, but at least enter), and we can always make improvements.<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqZLAdgaBNPKh_2ruUR_r9woeA5y8Sub4SrLadRdFYxt6XakHikU5fbIi895qqNKDodGTsP0Z2djjHWMSLNFCIiQqUooOlA6e0yXU_4Je4VNP49odesocQ_ClIInlGcQuUztVFFAbTTw4/s1600/VID_20190216_150022%257E2.mp4" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="900" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqZLAdgaBNPKh_2ruUR_r9woeA5y8Sub4SrLadRdFYxt6XakHikU5fbIi895qqNKDodGTsP0Z2djjHWMSLNFCIiQqUooOlA6e0yXU_4Je4VNP49odesocQ_ClIInlGcQuUztVFFAbTTw4/s400/VID_20190216_150022%257E2.mp4" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Going out for a drive.</td></tr>
</tbody></table>
<div>
<br />Leo</div>
</div>
Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-74313935690406629962019-03-12T22:26:00.002+00:002019-03-12T22:26:16.414+00:00PiWars - Opening up Wall-E and making him move.With the Wall-E toy selected as my PiWars entry the next step was to open it up and discover how much space I had to work with. Luckily for me Wall-E is relatively easy to dismantle, with no glue or clips locking the chassis into place and most of the screws easily accessible. The exceptions were the four screws on the back, partly covered by the battery compartment and requiring a triangular screw bit to undo, as well as the screws that hold the axles in place.<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3pSWEDkckKfxHNCmf8ClNDZp1FDUmY-cW6_62FJm7s2JS5-u3a0BWvPhzG9Ri72k2rvhLUrYCn7qO1ZiKvBXUJTAMxKfGlWuiYTeyKPJb83WX1R9MiCtQp96B-DCnnwz9M492PrzGyjg/s1600/IMG_20190312_200115.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1267" data-original-width="1437" height="175" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3pSWEDkckKfxHNCmf8ClNDZp1FDUmY-cW6_62FJm7s2JS5-u3a0BWvPhzG9Ri72k2rvhLUrYCn7qO1ZiKvBXUJTAMxKfGlWuiYTeyKPJb83WX1R9MiCtQp96B-DCnnwz9M492PrzGyjg/s200/IMG_20190312_200115.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Triangular screws!</td></tr>
</tbody></table>
The first time I removed the tracks it was with a lot of physical force, pulling on the tracks hard until they came free. I didn't realise at the time but they only came loose after the plastic gear on the axle had cracked, allowing the axle to move within the gearbox. When I finally tried to work out how to remove the axles properly I turned back to the various Wall-E conversions documented on the internet until I found the answer. The axles are held in place by a screw that is hidden underneath the 'B&L' logo and, armed with this knowledge, it only took a few seconds with a drill to finally uncover and remove them.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4kzIMY6k_uqeKBKFK5hHMB0EdD-LYgleVYGjcuRltux7tIAIJntDlSTHxDiLHg-yZ0Z_u2UwZNJMKPQURehxslPAaCoAQ5DVIje87bgreX9Bqnz8vgOeI2Lqdqib6FwkOIKWdt6sS6II/s1600/IMG_20190312_200643.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1576" data-original-width="1600" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4kzIMY6k_uqeKBKFK5hHMB0EdD-LYgleVYGjcuRltux7tIAIJntDlSTHxDiLHg-yZ0Z_u2UwZNJMKPQURehxslPAaCoAQ5DVIje87bgreX9Bqnz8vgOeI2Lqdqib6FwkOIKWdt6sS6II/s200/IMG_20190312_200643.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Hidden screw!</td></tr>
</tbody></table>
With the tracks, base and back unscrewed the main body can be pulled up and away. This took a little force the first time, but came away cleanly. The insides have wires running from the top half to the base, so these have to be disconnected to free the two sections. As I didn't know if I'd be needing these connections again in future I tried to unplug them where possible, and if I needed to cut a cable I'd trim it close to the PCB to ensure I had the longest length of wire remaining to work with in future.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivpUCkepie4QVVUtX3W73KHf9-6IDkUc-PMtpEGzVQj6GHRFo38RGpsOPRUMTcrHCWwz4mELQoNGlol49b5CY8QHY6H0EDpK0RDogGZDRScr7aorHgS9bOGg5K-uhbkndVTMTmEo2qoXU/s1600/IMG_20180918_214338.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1580" data-original-width="1600" height="315" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivpUCkepie4QVVUtX3W73KHf9-6IDkUc-PMtpEGzVQj6GHRFo38RGpsOPRUMTcrHCWwz4mELQoNGlol49b5CY8QHY6H0EDpK0RDogGZDRScr7aorHgS9bOGg5K-uhbkndVTMTmEo2qoXU/s320/IMG_20180918_214338.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Original PCB and green gearbox!</td></tr>
</tbody></table>
At this stage my focus is in validating that Wall-E could be driven sufficiently well to attempt the challenges, so the section with the arms and head was put to one side for future considerations.<br />
<br />
The original Wall-E gearbox uses a single motor that allows it to drive forwards or reverse with a turn. Obviously this limited amount of control is insufficient to get through the PiWars challenges, so that needed to be replaced. Along with the gearbox I also removed the existing PCB as it didn't look very reusable, plus the competition requires a Raspberry Pi to be the brains. The speaker, however, I kept as I wanted Wall-E to be able to talk.<br />
<br />
Considering ways of making Wall-E move I wanted to keep the weight low to increase stability, so I tried to find a motor that would fit in the side areas of the base. Hunting around I managed to find such a motor, but just couldn't get the axle and shaft to line up. It took quite a bit of time, and various iterations of potential gearboxes, before I finally came to the conclusion it was a lost cause and switched to mounting the motor directly above the axle.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgNrN7E0GHxaDUqS3_DgicZL74Nht8IcPc84Yblv1vTJP9InkowWJ3PPOPA5cI1eZBHGo8gWuk5XRnwIdwrOVeoBaoKaviaE-He9HRFPWkqRSXUO8L4o3Y0Zi-_f7m4RVULe17jTh3Rxc/s1600/IMG_20181222_214214.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1008" data-original-width="1600" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgNrN7E0GHxaDUqS3_DgicZL74Nht8IcPc84Yblv1vTJP9InkowWJ3PPOPA5cI1eZBHGo8gWuk5XRnwIdwrOVeoBaoKaviaE-He9HRFPWkqRSXUO8L4o3Y0Zi-_f7m4RVULe17jTh3Rxc/s320/IMG_20181222_214214.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">It fits, but doesn't line up.</td></tr>
</tbody></table>
It took a bit of hunting around on the internet to find a way of transferring power from the motor shaft to the axle in a compact enough form to fit but eventually, after trying out a variety of gears, I purchased a set of bevel gears off ebay that got the job done. To get them to mesh correctly I designed a gear box in Fusion 360, based on measurements from the original, that I could create on my 3D printer. It took numerous iterations and tweaks but I finally produced a 3D printed gearbox to hold everything in place.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaqqSJqQMiA5gkLAqe4FMv2TeWdiJSEVX2cDqINbDid-nohTTk7alDhWDlvGmT5AnIV-VZCt6qkNxmTiYfSNFQizEz5gIcN1BAIFEw_Ob1g-W2tX1ynFtft1mG6PcY5yM7PQ3N_kC7dwk/s1600/IMG_20181223_122214.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="433" data-original-width="1600" height="107" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaqqSJqQMiA5gkLAqe4FMv2TeWdiJSEVX2cDqINbDid-nohTTk7alDhWDlvGmT5AnIV-VZCt6qkNxmTiYfSNFQizEz5gIcN1BAIFEw_Ob1g-W2tX1ynFtft1mG6PcY5yM7PQ3N_kC7dwk/s400/IMG_20181223_122214.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Some of the iterations!</td></tr>
</tbody></table>
With one gearbox completed and installed it was time to see if Wall-E would move. Now in theory I could have thrown together a motor driver, RPi Zero and a few lines of python to drive the motor, but it was much quicker, and easier, to just wedge a battery into the base and connect the motor directly to it. So that is what I did, making sure the track was moving freely before placing everything on the floor and watching it spin in circles.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtQO-U2M7TSgMujt6d4XrbCDUc5baRHeghlA0HUzNdcS0VT-AHQkQg36qAXobnE9awVKTvgaMO-FF1rgTeMltKp89K8D50BsZt4cYMAsNxOvTlDSfcvd7AvnNGqwXW9VFC1FiM4KrrpGY/s1600/VID_20181231_181231.mp4" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtQO-U2M7TSgMujt6d4XrbCDUc5baRHeghlA0HUzNdcS0VT-AHQkQg36qAXobnE9awVKTvgaMO-FF1rgTeMltKp89K8D50BsZt4cYMAsNxOvTlDSfcvd7AvnNGqwXW9VFC1FiM4KrrpGY/s320/VID_20181231_181231.mp4" width="320" /></a></div>
<br />
Now that I had proof this was a viable approach I printed out the second gearbox (which ended up requiring some slight modifications, as the base wasn't an exact mirror) and moved on to driving the motors in a more controlled way.<br />
<br />
LeoLeo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-49424075629780076152019-03-06T22:05:00.000+00:002019-03-06T22:05:15.786+00:00PiWars 2019 - An adventure in spaaaaaace!<a href="https://piwars.org/" target="_blank">PiWars</a> 2019, the Raspberry Pi robotics challenge competition, is returning at the end of this month and, after a years break, I'll be returning as a competitor. Alas I'm a tad behind on my blogging this time around, I did start writing this entry in 2018 but never quite finished it!<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMfSDDLZn4XCPLtOlmVcDoTCHot72SeG80OSBFwxJsjlUNTIbDGVEQ1do3yvNWZSjzbpKLr4U-ibKNk_cIhqHraa0xb587rPG7xjFgkYNaFGHBvX49VZUr26ckNrk4WVNlelDNOAL_OA4/s1600/LRV.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="445" data-original-width="494" height="178" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMfSDDLZn4XCPLtOlmVcDoTCHot72SeG80OSBFwxJsjlUNTIbDGVEQ1do3yvNWZSjzbpKLr4U-ibKNk_cIhqHraa0xb587rPG7xjFgkYNaFGHBvX49VZUr26ckNrk4WVNlelDNOAL_OA4/s200/LRV.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Too small!</td></tr>
</tbody></table>
PiWars 2019 is based around a space theme, to celebrate 50 years of space exploration, and as such I was looking at robot designs that fit into this theme. My initial thoughts were to do another 3D printed robot chassis, this time based around NASA's <a href="https://en.wikipedia.org/wiki/Lunar_Roving_Vehicle" target="_blank">Lunar Roving Vehicle</a>. But after reviewing images of it, and reading through the <a href="https://www.hq.nasa.gov/alsj/lrvhand.html" target="_blank">manual</a>, I came to the conclusion that the LRV's design is too minimal to successfully incorporate the Raspberry Pi, motor driver and sensors. At least at the scale needed to conform to the competition's size restrictions.<br />
<br />
<br clear="all" />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: auto; margin-right: auto; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEict6ASNz6IeM4JoSAX71mvWO5f7j-upv_4JfgP9bCpXpxdLDChHxWdD5VmDq_X3Bc9Dyb4PAzEq3sVZ2tY87n-3XnxW47gmTIjt3IulQewh1ltbybvoCPrm4KcX0mvevzOVzpAP36hT4E/s1600/TB2.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="566" data-original-width="800" height="141" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEict6ASNz6IeM4JoSAX71mvWO5f7j-upv_4JfgP9bCpXpxdLDChHxWdD5VmDq_X3Bc9Dyb4PAzEq3sVZ2tY87n-3XnxW47gmTIjt3IulQewh1ltbybvoCPrm4KcX0mvevzOVzpAP36hT4E/s200/TB2.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Too large!</td></tr>
</tbody></table>
My first forays into Raspberry Pi based robots was around modifying toys, and I have built up a collection over the years that I've been planning on converting. Amongst these were a couple that met the space theme criteria.<br />
One was far too long and the other I initially thought was too wide, but, after double checking the rules, I realised that the accepted width is actually slightly larger than an A4 sheet and my choice was made!<br />
<br clear="all" />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQPg5ujqWknlOQ31uIXAvJ_cQbaGOGXeDffm7irW8yMWZWNgTf8aH4hhpL-ZOZJFERDR98oqVgcgycXTYRL5hBIkVk1ZT7xTqDg_TysgP3PQpwmfXkh_-sMR26vEfpBd6ug2Ifa9evJ6M/s1600/WallE.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="692" data-original-width="640" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQPg5ujqWknlOQ31uIXAvJ_cQbaGOGXeDffm7irW8yMWZWNgTf8aH4hhpL-ZOZJFERDR98oqVgcgycXTYRL5hBIkVk1ZT7xTqDg_TysgP3PQpwmfXkh_-sMR26vEfpBd6ug2Ifa9evJ6M/s320/WallE.jpg" width="294" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Just right!</td></tr>
</tbody></table>
So for PiWars 2019 I will be converting a Wall-E toy, specifically the 10" U-Command Wall-E, removing the existing electronics and replacing them with a Raspberry Pi, plus any sensors required to complete the courses. A quick search on the internet finds numerous projects that involve modifying this Wall-E toy, which can provide much in the way in inspiration, as well as knowledge on how to open up and dismantle the toy without irreversible damaging it.<br />
<br />
The initial list of requirements I came up with are as follows<br />
<dl>
<dt><b>Built around a Raspberry Pi 3A+</b>.</dt>
<dd>This provides the built-in WiFi/Bluetooth and CPU power of the 3B, but in a smaller package that will help maximise the available space inside Wall-E.</dd><dd><br /></dd>
<b>Minimise</b><b> external changes to the chassis</b><dd>Quite a few of the existing Wall-E conversions found online make large, visible changes to the body. Such as cutting away the motor housings to install servos. Ideally I'd like an end result where you have to look closely to spot the modifications</dd><dd><br /></dd>
<dt><b>Install a laser ToF sensor</b></dt>
<dd>Several challenges require detecting how far away from a wall a robot is. A laser sensor will provide this ability in the smallest package.</dd><dd><br /></dd>
<dt><b>Install a Raspberry Pi camera</b></dt>
<dd>A number of the autonomous challenges require some level of visual processing. So the installation of a camera is a must. Ideally this will be in Wall-E's head, but failing that on the front of the body.</dd><dd><br /></dd>
<dt><b>Install an LCD/OLED to replace the battery usage</b></dt>
<dd>Having a UI on the robot is often useful for launching challenge specific scripts and check on his status, without having to carry around a laptop. To keep this in theme I'd want to replace the battery level screen for this. </dd>
</dl>
The first step is, of course, opening up Wall-E and working out how to fit everything inside. Which I will cover in my next update!.<br />
<br />
LeoLeo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-42221447680258619582018-03-09T19:26:00.000+00:002018-04-06T13:43:39.688+01:00Adding vision to your AIY Project in 4 easy steps (and 1 tricky one)Back in May 2017 the <a href="https://www.raspberrypi.org/magpi/issues/57/">The MagPi</a> came with a Google Voice HAT, and instructions, that would turn a Raspberry Pi into a Google Assistant. Initially triggered by a button press, but soon updated to voice activated, allowing you to ask it questions and give it commands in a similar manner to a Google Home or Amazon Echo device.<br />
<br />
After having put together the kit and playing with it for a while I decided to look at adding a camera to the device and connect it up to Google's Vision APIs. This was something that was covered in the Raspberry Pi Blog back in <a href="https://www.raspberrypi.org/blog/raspberry-pi-cloud-vision-google-io/">2016</a>, but it looks like the APIs have changed slightly since then. So after a bit of hunting around and testing here are the steps I took to setup and extend the base Google AIY package to include vision support.<br />
<h2>
Install Google AIY image</h2>
Follow the instructions on the offical <a href="https://aiyprojects.withgoogle.com/voice#assembly-guide-1-get-the-voice-kit-sd-image">Google Voice Kit</a> page (Assuming you haven't already gone through these steps). For reference the software image I used was <a href="https://dl.google.com/dl/aiyprojects/vision/aiyprojects-2018-01-03.img.xz">aiyprojects-2018-01-03.img.xz</a>.<br />
<br />
You'll need to complete the 'Custom Voice User Interface' section of the instructions to enable the cloud speech APIs as well (This should end with a cloud_speech.json file in the home directory of the Raspberry Pi).<br />
<h2>
Configure Camera</h2>
<div>
Follow the official instructions on how to setup and connect the <a href="https://www.raspberrypi.org/documentation/configuration/camera.md">Raspberry Pi Camera</a>.</div>
<div>
If you're reading through these instructions before following them (which of course you should be!) its almost certainly worth connecting the camera cable to the Raspberry Pi first, so it can be fed through the slot on the Google Voice Kit HAT.</div>
<br />
The cardboard case included in the kit has a convenient hole for the camera lens to poke through, with the flaps holding the camera in place without needing to tape or screw it into place. Almost as if it was meant to have a camera installed in it!<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz11FvinxEbON3OspBemWXjGTYL1tFTvrVDfs3Rj71cfnkQO-JdlANvEd0p2c5_pO-8v-q7C9mVdHAV8QMqLdUbpOfkiVckjTyu6FFZQ0HfpgEsp-yu3l4xaQt70Ju1ZDB-dStHFUHPMg/s1600/IMG_20180212_212538.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="" border="0" data-original-height="1213" data-original-width="1600" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz11FvinxEbON3OspBemWXjGTYL1tFTvrVDfs3Rj71cfnkQO-JdlANvEd0p2c5_pO-8v-q7C9mVdHAV8QMqLdUbpOfkiVckjTyu6FFZQ0HfpgEsp-yu3l4xaQt70Ju1ZDB-dStHFUHPMg/s320/IMG_20180212_212538.jpg" title="The camera is held in place between the two pieces of cardboard." width="320" /></a></td><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj471LgZlNNhVJC0_jaTz6yZdsqT2KJuuWUMRnqjoop3l-psG-STrFXDXD6o04fCp2Kmy5sjRmtnCGzXnb-wZ_vGICOL7NZvi_TNvSkCOqkDsZi_WKRx2rvpOjOFj46UpRZQTfke_LjOOE/s1600/IMG_20180212_212227.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1600" data-original-width="1373" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj471LgZlNNhVJC0_jaTz6yZdsqT2KJuuWUMRnqjoop3l-psG-STrFXDXD6o04fCp2Kmy5sjRmtnCGzXnb-wZ_vGICOL7NZvi_TNvSkCOqkDsZi_WKRx2rvpOjOFj46UpRZQTfke_LjOOE/s320/IMG_20180212_212227.jpg" width="274" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The camera is held in place between the two pieces of cardboard.</td><td class="tr-caption" style="text-align: center;">The lens of the camera pokes through the hole.</td></tr>
</tbody></table>
<br />
Every time we run 'raspistill' to take a photo the camera performs various calibration tasks, setting up the hardware, working out the light level etc. Which usually takes 5 or more seconds to complete.<br />
<br />
To avoid having this delay every time we ask the Raspberry Pi to identify an object we want raspistill to be constantly running in the background, ready to take a photo at any time. Luckily raspistill already supports this with the '-s' option.<br />
<br />
<pre style="background-color: grey; border: black solid 1px; color: white;"><code><b style="color: black;">raspistill -rot 180 -o /tmp/aiyimage.jpg -s -t 0 -w 640 -h 480</b></code></pre>
<br />
We want this to execute every time the RPi starts up, so edit crontab using 'crontab -e' and add the following line to the end of the file.<br />
<br />
<pre style="background-color: grey; border: black solid 1px; color: white;"><code><b style="color: black;">@reboot raspistill -rot 180 -o /tmp/aiyimage.jpg -s -t 0 -w 640 -h 480 &</b></code></pre>
<br />
<div>
To test the above command is working reboot the RaspberryPi and then run<br />
<br />
<pre style="background-color: grey; border: black solid 1px; color: white;"><code><b style="color: black;">kill -s SIGUSR1 `pidof raspistill`</b></code></pre>
<br />
If all has gone well then the Raspberry Pi will take a picture and store it at '/tmp/aiyimage.jpg'.</div>
<h2>
Enable Vision API in Google account</h2>
This is, potentially, the tricky step as it requires having a credit card to enable billing on your Google account, as well as the service being available in your country.<br />
Just follow the instructions at <a href="https://cloud.google.com/vision/docs/before-you-begin">https://cloud.google.com/vision/docs/before-you-begin</a> making sure you enable the API on the correct project (aiyproject if you followed the Google Voice setup instructions above).<br />
<h2>
Install Vision API Python libraries</h2>
To utilise the Google Vision APIs we need to install the python libraries (as detailed at <a href="https://cloud.google.com/vision/docs/reference/libraries#client-libraries-install-python">https://cloud.google.com/vision/docs/reference/libraries#client-libraries-install-python</a>). However the Google application runs within a <a href="https://docs.python.org/3/tutorial/venv.html">Python Virtual Environment</a> to keep its selection of python libraries separate from any others installed on the Raspberry Pi. This means we have to take the extra step of entering the virtual environment before installation. This can easily be achieved by launching the 'Start dev terminal' shortcut from the Desktop, or by running '~/bin/AIY-projects-shell.sh' from a normal terminal (e.g. if connecting via SSH).<br />
<br />
Once inside the Virtual environment run the following to install the libraries<br />
<br />
<pre style="background-color: grey; border: black solid 1px; color: white;"><code><b style="color: black;">pip3 install google-cloud-vision</b></code></pre>
<h2>
Using the Vision APIs</h2>
<div>
I've written two scripts that exercise the Vision APIs, '<a href="https://raw.githubusercontent.com/LeoWhite/RaspberryPi/master/AIY/whatisthat.py" target="_blank">whatisthat.py</a>' which calls the Vision APIs themselves, and '<a href="https://raw.githubusercontent.com/LeoWhite/RaspberryPi/master/AIY/cloudspeech_whatisthat.py" target="_blank">cloudspeech_whatisthat.py</a>' that talks to the Voice APIs. The scripts should be places in the /home/pi/AIY-projects-python/src/examples/voice folder, and can be easily fetched using the 'wget' command.</div>
<div>
<br />
<pre style="background-color: grey; border: black solid 1px; color: white;"><code><b style="color: black;">cd /home/pi/AIY-projects-python/src/examples/voice
wget https://raw.githubusercontent.com/LeoWhite/RaspberryPi/master/AIY/cloudspeech_whatisthat.py
wget https://raw.githubusercontent.com/LeoWhite/RaspberryPi/master/AIY/whatisthat.py</b></code></pre>
<div>
<br />
Launch the cloudspeech_whatisthat.py script from inside the 'dev environment' (In the same way as you'd launch the regular cloudspeech_demo.py demo)<br />
<br />
<pre style="background-color: grey; border: black solid 1px; color: white;"><code><b style="color: black;">src/examples/voice/cloudspeech_whatisthat.py</b></code></pre>
<br />
Then all you have to do is point the camera at something, press the button and say one of the following voice commands.<br />
<br />
<table border="1">
<tbody>
<tr><th>Command</th><th>Action</th></tr>
<tr><td style="font-weight: bold;">What is that?</td><td>Requests a list of labels from Google and reads out any over 80% confidence.</td></tr>
<tr><td style="font-weight: bold;">What logo is that?</td><td>Requests Google to identify the logo in the picture</td></tr>
<tr><td style="font-weight: bold;">What does that say?</td><td>Reads out any text detected in the picture</td></tr>
</tbody></table>
</div>
<br />
<h2>
Example of use.</h2>
</div>
<div>
Below is a short demonstration video of the scripts in action. I've demonstrated this at a couple of Raspberry Jams and got interest from both kids and adults. The kids especially were trying different items for it to identify, one even taking his shoe off see what it would say ('blue trainer' being the result).</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/XFa6tJlwDHc/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/XFa6tJlwDHc?feature=player_embedded" width="320"></iframe></div>
<div>
I do have an idea or two of what I can do with this script, nothing especially useful, but something that is a little more interactive. Hopefully, with the help of this guide, other people will come up with fun and interesting projects!</div>
<div>
<br /></div>
<div>
Leo</div>
<div>
<br /></div>
Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com10tag:blogger.com,1999:blog-7973550104339721497.post-72551730307385498872017-06-07T08:31:00.000+01:002017-06-07T08:31:36.661+01:00Basic Bluetooth Network using Raspbian JessieRecently I wanted to setup a Bluetooth network to allow several Raspberry Pis to communicate amongst themselves and, as I'd not done this before, tried to search for articles on how to achieve this. I managed to find many, many articles covering this subject, unfortunately they tended to be either out of date (e.g. using Raspbian Wheezy + BlueZ 4.x), incomplete (starting from X do Y, without explaining how to achieve X) or just plain confusing.<br />
<br />
After some further research, plus plenty of trial and error, I eventually got a bluetooth network up and running, connecting together one Raspberry Pi 3 with four Raspberry Pi Zero Ws, and decided to document the steps I took for my own reference, as well as for anyone else who would like to achieve the same.<br />
<br />
To setup the Bluetooth network we need to allocate one Raspberry Pi to act as the central hub, responsible for allocating IP addresses, IP forwarding (if needed), along with one or more client Raspberry Pis to connect to it.<br />
<br />
<h2>
Setting up the Hub</h2>
<div>
<ul>
<li>Download the latest <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian </a>image (Here I am using 2017-04-10-raspbian-jessie-lite.zip) and write to an SD Card.</li>
<li>Boot the Raspberry Pi, login and run the 'raspi-config' application.</li>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>pi@raspberrypi:~$ <b style="color: black;">sudo raspi-config</b></code></pre>
</div>
<div>
<ul>
<li>Select option 2 to change the hostname, setting it to 'hub'.</li>
<li>Select 'Finish', followed by 'Yes' to reboot.</li>
<li>Wait for the Raspberry Pi to reboot and log in again.</li>
<li>Setup a network connection. Depending on your setup this can be either by plugging in an Ethernet cable or by setting up a <a href="https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md">Wireless connection</a>.</li>
<li>Install the packages required for setting up the bluetooth network.</li>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>pi@hub:</code>~$ <b style="color: black;">sudo apt-get install bluez-test-scripts bridge-utils dnsmasq python-dbus</b></pre>
<div>
<ul>
<li>Next we need to add the network interface we'll be using for Bluetooth. Edit the <b>/etc/network/interfaces</b> file and add the following to it.</li>
</ul>
</div>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>auto pan0
iface pan0 inet static
address 172.168.10.1
netmask 255.255.255.0
bridge-ports none
bridge-fd 0</code></pre>
<div>
<ul>
<li>And then we need to configure dnsmasq to listen on the pan0 interface and assign IP addresses in the correct range. Edit the <b>/etc/dnsmasq.conf</b> file and add the following</li>
</ul>
</div>
<div>
<ul>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>domain-needed
bogus-priv
no-resolv
no-poll
server=8.8.8.8
local=/localnet/
interface=pan0
no-hosts
expand-hosts
domain=local
# Enable DHCP for the 172.168.200.X range
dhcp-range=172.168.10.10,172.168.10.50,12h</code></pre>
<div>
<ul>
<li>To setup the bluetooth network we'll be using one of the BlueZ test scripts (installed as part of the bluez-test-scripts package earlier), however the test script exits after 16 minutes, so we need to copy and edit the script.</li>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>pi@hub:~$ <b style="color: black;">sudo cp /usr/share/doc/bluez-test-scripts/examples/bluezutils.py /usr/local/sbin/</b>
pi@hub:~$ <b style="color: black;">sudo cp /usr/share/doc/bluez-test-scripts/examples/test-nap /usr/local/sbin/</b>
pi@hub:~$ <b style="color: black;">sudo chmod +x /usr/local/sbin/test-nap</b></code></pre>
</div>
<div>
<ul>
<li>To keep the script running edit <b>/usr/local/sbin/test-nap</b> and change the lines :-</li>
</ul>
</div>
<div>
<ul>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>try:
time.sleep(1000)</code></pre>
<div>
<ul>
<li>to</li>
</ul>
</div>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>try:
while True:
time.sleep(1000)</code></pre>
</div>
<div>
<ul>
<li>We want the script to run at startup and one of the easiest ways is using the <a href="https://en.wikipedia.org/wiki/Cron">crontab</a> file. Edit your crontab by running<b> crontab -e</b> and add the following line to the end.</li>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>@reboot sudo nohup /usr/local/sbin/test-nap pan0 &</code></pre>
</div>
<div>
<ul>
<li>Reboot once more (<b>sudo reboot</b>), log in and check that the pan0 interface exists, and the test-nap script is running.</li>
</ul>
</div>
</div>
</div>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>
pi@hub:~$ <b style="color: black;">ifconfig pan0</b>
pan0 Link encap:Ethernet HWaddr da:87:54:2c:f8:66
inet addr:172.168.10.1 Bcast:172.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::d887:54ff:fe2c:f866/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:9090 (8.8 KiB)
pi@hub:~$ <b style="color: black;">ps ax | grep test-nap</b>
438 ? S 0:00 sudo nohup /usr/local/sbin/test-nap pan0
470 ? S 0:00 /usr/bin/python /usr/local/sbin/test-nap pan0
851 ttyS0 S+ 0:00 grep --color=auto test-nap</code></pre>
<div>
<ul>
<li>If everything is running as expected we just need to take a note of the Bluetooth MAC so we can tell the clients who they need to contact. We can find this by running '<b>hciconfig dev</b>'.</li>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>
pi@hub:~$ <b style="color: black;">hciconfig dev</b>
hci0: Type: BR/EDR Bus: UART
BD Address: <b style="color: red;">B8:27:EB:25:A0:AE</b> ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:731 acl:0 sco:0 events:44 errors:0
TX bytes:1784 acl:0 sco:0 commands:44 errors:0
</code></pre>
</div>
<div>
<h2>
Setting up a client</h2>
<div>
<ul>
<li>Download the latest <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian </a>image (Here I am using 2017-04-10-raspbian-jessie-lite.zip) and write to an SD Card.</li>
<li>Boot the Raspberry Pi, login and run the 'raspi-config' application.</li>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>pi@raspberrypi:~$ <b style="color: black;">sudo raspi-config</b></code></pre>
</div>
<div>
<ul>
<li>Select option 2 to change the hostname, change it to 'client0'.</li>
<li>Select 'Finish', followed by 'Yes' to reboot.</li>
<li>Wait for the Raspberry to reboot and log in again.</li>
<li>Setup a network connection. Depending on your setup this can be either by plugging in an Ethernet cable or by setting up a<a href="https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md"> Wireless connection</a>.</li>
<li>Install the packages required for setting up the bluetooth network.</li>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>pi@client0: <b style="color: black;">sudo apt-get install python-dbus</b></code></pre>
<div>
<ul>
<li>Download a helper script for establishing the bluetooth network.</li>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>pi@client0:~ $ <b style="color: black;">wget https://raw.githubusercontent.com/mk-fg/fgtk/master/bt-pan</b>
pi@client0:~ $ <b style="color: black;">sudo mv bt-pan /usr/local/sbin/</b>
pi@client0:~ $ <b style="color: black;">sudo chmod +x /usr/local/sbin/bt-pan</b></code></pre>
<div>
<div>
<ul><span style="font-family: "arial";"><span style="font-family: inherit; font-size: 14.6667px; white-space: pre-wrap;">
<li><span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">Again we want to run this script at startup, so run <b>crontab -e</b> and add the following, replacing the MAC Address with that of your bluetooth dongle.</span></span></li>
</span></span></ul>
</div>
<div>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>@reboot sudo noup /usr/local/sbin/bt-pan client B8:27:EB:25:A0:AE &</code></pre>
<h2>
</h2>
<h2>
<span style="font-family: "arial";"><span style="font-family: inherit; font-size: 14.6667px; white-space: pre-wrap;"><span style="font-size: 14.6667px; white-space: pre-wrap;">Pair client to hub</span></span></span></h2>
Before the network can be established a bluetooth connection first needs to be setup between the client device and the hub. This is achieved by making use of the 'bluetoothctl' application.<br />
<ul>
<li>First setup the client so it can be discovered by running the commands in bold below.</li>
</ul>
</div>
<div>
<div>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>pi@client0:~ $ <b style="color: black;">sudo bluetoothctl</b>
[NEW] Controller B8:27:EB:5B:CB:74 client0 [default]
[bluetooth]# <b style="color: black;">power on</b>
Changing power on succeeded
[bluetooth]# <b style="color: black;">discoverable on</b>
Changing discoverable on succeeded
[CHG] Controller B8:27:EB:5B:CB:74 Discoverable: yes</code></pre>
<ul>
<li>Then scan for, and connect to it, from the hub (again using the commands in bold). Once its found we want to pair and trust the client to allow it to auto connect in future,</li>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>
pi@hub:~$ <b style="color: black;">sudo bluetoothctl</b>
[NEW] Controller B8:27:EB:25:A0:AE hub [default]
[bluetooth]# <b style="color: black;">power on</b>
Changing power on succeeded
[bluetooth]# <b style="color: black;">agent on</b>
Agent registered
[bluetooth]# <b style="color: black;">scan on</b>
Discovery started
[CHG] Controller B8:27:EB:25:A0:AE Discovering: yes
[NEW] Device B8:27:EB:5B:CB:74 client0
[bluetooth]# <b style="color: black;">pair B8:27:EB:5B:CB:74</b>
Attempting to pair with B8:27:EB:5B:CB:74
[CHG] Device B8:27:EB:5B:CB:74 Connected: yes
[CHG] Device B8:27:EB:5B:CB:74 UUIDs:
0000110c-0000-1000-8000-00805f9b34fb
0000110e-0000-1000-8000-00805f9b34fb
00001200-0000-1000-8000-00805f9b34fb
00001800-0000-1000-8000-00805f9b34fb
00001801-0000-1000-8000-00805f9b34fb
[CHG] Device B8:27:EB:5B:CB:74 Paired: yes
Pairing successful
[bluetooth]# <b style="color: black;">trust B8:27:EB:5B:CB:74</b>
[CHG] Device B8:27:EB:5B:CB:74 Trusted: yes
Changing B8:27:EB:5B:CB:74 trust succeeded
[CHG] Device B8:27:EB:5B:CB:74 Connected: no
[bluetooth]#
</code></pre>
<ul>
<li>With the client paired and trusted we can exit out of the bluetoothctl app on both the hub and client by using the <b>quit </b>command.</li>
<li>To check that the Bluetooth network is working reboot the client device (<b>sudo reboot</b>), log in and check if the bnep0 interface now exists and has been assigned an IP address.</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>
pi@client0:~ $ <b style="color: black;">ifconfig bnep0</b>
bnep0 Link encap:Ethernet HWaddr b8:27:eb:5b:cb:74
inet addr:172.168.10.45 Bcast:172.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:fe5b:cb74/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:60 errors:0 dropped:0 overruns:0 frame:0
TX packets:53 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000</code></pre>
<ul>
<li>To confirm the connection has been established attempt to connect to the hub from the client.</li>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>
pi@client0:~ $ <b style="color: black;">ping 172.168.10.1</b>
PING 172.168.10.1 (172.168.10.1) 56(84) bytes of data.
64 bytes from 172.168.10.1: icmp_seq=1 ttl=64 time=190 ms
64 bytes from 172.168.10.1: icmp_seq=2 ttl=64 time=33.7 ms
--- 172.168.10.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 33.782/112.324/190.867/78.543 ms</code>
</pre>
<br />
If all has gone well you now have a working Bluetooth network, which you can now extend with multiple clients.<br />
<h2>
Optional extras</h2>
<h3>
Setup static IP for a client</h3>
Sometimes its useful for a client to always be assigned the same IP address when it establishes the network connection and, luckily, this is easy to achieve.<br />
<ul>
<li>First look up the client's bluetooth address using the '<b>hciconfig dev</b>' command used earlier.</li>
<li>Then, on the hub, edit the <b>/etc/dnsmasq.conf</b> file and add the following entry, replacing the MAC with that of your client device.</li>
</ul>
<div>
<pre style="border: 1px solid black; color: white;"><code>dhcp-host=B8:27:EB:5B:CB:74,172.168.10.101,client0</code></pre>
<div>
<ul></ul>
</div>
</div>
<ul>
<li>Once the file has been updated we need to restart the dnsmasq service so the changes take effect.</li>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>pi@hub:~$ <b style="color: black;">sudo service dnsmasq restart</b></code></pre>
<ul>
<li>Now the next time the client requests an IP address it will receive the one listed in the file, and additional entries can be added for every client in the Bluetooth network.</li>
</ul>
<h3>
Enable IP port forwarding</h3>
<div>
<span style="font-family: "arial";"><span style="font-size: 14.6667px; white-space: pre-wrap;">If your 'hub' Raspberry Pi has a Wireless or Ethernet network connection you can choose to share it with the client Raspberry Pis, in theory allowing them to access the internet via bluetooth.</span></span></div>
<div>
<ul>
<li>To configure the 'hub' to forward its network connection first edit the <b>/etc/sysctl.conf</b> file and uncomment line 28 to read :-</li>
</ul>
</div>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>net.ipv4.ip_forward=1</code></pre>
<div>
<div>
<ul>
<li>Next edit the <b>/etc/rc.local</b> file and add, the following. Updating 'eth0' to match your upstream network interface (e.g. wlan0).</li>
</ul>
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>
# Enable port forwarding. Change eth0 to match the primary network connection name
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables --table nat -A POSTROUTING -o eth0 -j MASQUERADE</code></pre>
</div>
<ul>
<li>Finally reboot (<b>sudo reboot)</b>, and you should now be able to access this shared network connection from any of the client Raspberry Pis.</li>
</ul>
<h2>
Wrap up</h2>
</div>
<div>
Hopefully this set of instructions are relatively clear and cover all the steps needed to get a basic Bluetooth network up and running (Either using a Raspberry Pi with built in Bluetooth, or an older model with a USB bluetooth adaptor). More work would be needed to make this a robust solution (i.e. the client only tries to establish a connection when it first starts up) but its a solid base to build upon. In theory it should also work on none Raspberry Pi based hardware that is also running Debian Jessie or equivalent, but I've not tried myself.</div>
<div>
<br /></div>
<div>
Whilst a bluetooth network is not as fast as a Wifi one (in my tests 200KB/s vs 1500KB/s) it uses slightly less power to run. On a PiZero W transferring files over WiFi seemed to pull about 0.1A more than when using Bluetooth, of course WiFi was also about 8 times faster. Not a huge difference, but if you are running the Raspberry Pi off battery, e.g. running a remote sensor, and are only transferring smaller amounts of data then this could add up to make a difference to the run time of the Pi.</div>
<div>
<br /></div>
<div>
Leo</div>
<div>
<br /></div>
<div>
<br /></div>
Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-53601190791478699972017-04-13T16:05:00.001+01:002017-04-13T16:05:28.887+01:00Pi Wars 2017 - EpilogueAt the start of April was <a href="http://piwars.org/">Pi Wars</a> 3.0, the third instalment of the Raspberry Pi robot challenge event, taking place up at the Cambridge Computer Laboratory once again. There were quite a few differences this time tho, the main one being that the event was held over two days instead of just one. The Saturday being for School teams, and the Sunday for the beginners, intermediate and pros/veterans.<br />
<br />
Other changes were the introduction of two new challenges, Slightly Deranged Golf and Minimal Maze. Both proved tough new additions, with the smaller robots struggling with the 'grass' on the golf course, and the larger robots struggling to grab the golf ball when it ends up on the edges of the course. Whereas not many robots managed to successfully navigate the Minimal Maze at all, it being an autonomous challenge.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7_0hYkmW1Bdelkd6YEV6mD7ta0yL-tU5oRxRGeokbfwb1Bmb7XfwTQ2eRB_RQ9Y6T3HdjxJmpcCMHwJ9K2Lv08_p0L3fx7-JNWZZGch3GFO_tcGM8h_mRlwX1TrWTwloNQdhA13nAD8/s1600/DeRangedGolf.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="145" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7_0hYkmW1Bdelkd6YEV6mD7ta0yL-tU5oRxRGeokbfwb1Bmb7XfwTQ2eRB_RQ9Y6T3HdjxJmpcCMHwJ9K2Lv08_p0L3fx7-JNWZZGch3GFO_tcGM8h_mRlwX1TrWTwloNQdhA13nAD8/s320/DeRangedGolf.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Slightly Deranged Golf</td></tr>
</tbody></table>
<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJXq4AgVCTpSEhr56B5qqcRSFoCOmrPn6QMq9-us0KZiiUWDPrNUVqU2BryBNHp4z9UWgF5Yrb28wSiYwiH6i-1Q2gWbyUb2MN4MqURv7Rjpbweg-ZaULt9pxSfu_tYFdr-vKSXVKI5PQ/s1600/MinimalMaze.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="145" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJXq4AgVCTpSEhr56B5qqcRSFoCOmrPn6QMq9-us0KZiiUWDPrNUVqU2BryBNHp4z9UWgF5Yrb28wSiYwiH6i-1Q2gWbyUb2MN4MqURv7Rjpbweg-ZaULt9pxSfu_tYFdr-vKSXVKI5PQ/s320/MinimalMaze.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Minimal Maze</td></tr>
</tbody></table>
The obstacle course also got an upgrade, doubling in size with several new obstacles to get around. Whilst the sharks were lacking in lasers quite a few robots ended up falling afoul of them, coming off the raised platform to end up sleeping with the sharks (At least until being rescued). The pebbles and scrunched up paper also being a surprisingly difficult obstacle to overcome, especially for those robots with low ground clearance.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii7pVRcbdpxrS9-quG3Bm4ocRifeqOxd3wEgrI4AgzTlRd0uiS52S-kDsa32IrYqHxqxkH8Kexc7XqQbIZOkbwt2p81nAlDApTgqkMRsfxotrKjAauvW6r3aEWSzCHp7TJsWlaKfsqcag/s1600/ObstacleCourse.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii7pVRcbdpxrS9-quG3Bm4ocRifeqOxd3wEgrI4AgzTlRd0uiS52S-kDsa32IrYqHxqxkH8Kexc7XqQbIZOkbwt2p81nAlDApTgqkMRsfxotrKjAauvW6r3aEWSzCHp7TJsWlaKfsqcag/s320/ObstacleCourse.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Obstacle course</td></tr>
</tbody></table>
I decided to attend both days and, as I was only competing on the Sunday, volunteered to help out on the Saturday. Vaguely expecting to be given a clipboard and stopwatch to manage one of the courses for a few hours I was instead given the task of judging the Technical Merit category. Luckily, instead of having to chase down all the teams myself, it was decided that this year it would make more sense for the judges to be in one spot and the teams to instead go visit them.<br />
<br />
To keep things streamlined I was joined by both the Artistic Merit judge (Hannah) and the Funniest Robot robot judge (Jim) at a table up in the 'quiet area' where we could all view each team's robot as it arrived and not make each team repeat the same answers three times! Over the two hours we saw 19 different robots, slightly less than expected, which ranged from the relatively basic (an ice cream tub with wheels) all the way up to the complicated (robot arm attachments, musical robots, motion controlled robots). The teams them selves varied quite a bit as well, with a couple where the adults did most of the talking, to those where the kids explained every single detail of their robot, usually accompanied by extreme amounts of enthusiasm.<br />
<br />
With the judging out of the way it was time for a late lunch and then a look around the rest of the area, browse the shops and stalls, visit the 'show and tell' type areas and watch a few of the robots tackling the challenges.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: 1em; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilXjw9fnB3RhgF5gESyBJoM3RFAlu77tl9wbJtbYZksIEWLKppLsvQb-AQXzXceSHOaar-sP8p7WNMn3LVwUpgxPAbDOPCYjOh9EMZE-rgwTaW1n0M93zF2VYfmuCo0bqOFketlQyVIrk/s1600/P3310006.JPG" imageanchor="1" style="margin-bottom: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilXjw9fnB3RhgF5gESyBJoM3RFAlu77tl9wbJtbYZksIEWLKppLsvQb-AQXzXceSHOaar-sP8p7WNMn3LVwUpgxPAbDOPCYjOh9EMZE-rgwTaW1n0M93zF2VYfmuCo0bqOFketlQyVIrk/s320/P3310006.JPG" width="213" /></a></td><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwHn8FqPj9bq_vb13y5JTLJHGOS1K4NwS8WFGpc47C6IbQXi41A32PLhcLjJddrhmXuqHtc-zwQbS3MVnbn4cwKi2yZkACSA6PLwMPw_xvU_fE4rDvGvpdT9k0NYQ2ReaLlWOt03BP_mk/s1600/P3310009.JPG" imageanchor="1" style="margin-bottom: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwHn8FqPj9bq_vb13y5JTLJHGOS1K4NwS8WFGpc47C6IbQXi41A32PLhcLjJddrhmXuqHtc-zwQbS3MVnbn4cwKi2yZkACSA6PLwMPw_xvU_fE4rDvGvpdT9k0NYQ2ReaLlWOt03BP_mk/s320/P3310009.JPG" width="213" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">View over the stalls and golf.</td><td class="tr-caption" style="text-align: center;">Views over the obstacle course and show and tell.</td></tr>
</tbody></table>
<br />
Eventually I drifted over to the Pi Noon area, along with a growing crowd, to watch (and recorde) the finals (including the quarter and semi finals). Pi Noon had a few minor changes for this year, instead of a single balloon to pop each robot was adorned with three balloons, with the winner being the robot which popped the most (or all ) of the balloons in three minutes<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/O8EWmhiokuw/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/O8EWmhiokuw?feature=player_embedded" width="320"></iframe></div>
With Pi Noon complete it was on to the prize giving before a bunch of us headed out to dinner until late.<br />
<br />
Sunday started at around 3am, as several people ran through the corridor of the Travel Lodge I was staying at, and I would be competing with my robot 'PiSquared' in the Pros/Veterans category . At the previous Pi Wars events I had dressed up, so this year I did so again turning up as a Fallout 4 'Vault Dweller', complete with Vault Boy bobble head for my robot and a Raspberry Pi powered PipBoy. The PipBoy was actually part of my 'robot' solution, forming a Bluetooth network that tied together the Pi Zeros connected to the motor drivers and the sensors, allowing them to communicate amongst themselves.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit_Ijzf53bPASUOBGrIeh8j7-wF119UDUHbBaYQIGa8xTPijr9MMu0CZoosua5mbnn9uKjX-u9mmXZPlcSd_Omw9FfihkreYj4zLy8JLlTD5WgA2QLU__blhwPAO9dBR1_ahYau356gRE/s1600/IMG_1802_sm.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit_Ijzf53bPASUOBGrIeh8j7-wF119UDUHbBaYQIGa8xTPijr9MMu0CZoosua5mbnn9uKjX-u9mmXZPlcSd_Omw9FfihkreYj4zLy8JLlTD5WgA2QLU__blhwPAO9dBR1_ahYau356gRE/s320/IMG_1802_sm.jpg" width="240" /></a></td><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUbXAcIeo_YDcJM3gyt3QlaNzyoZd-qTb8habI2qFwdC-2U_u4ViBpry-blfTxWKm0ZzZp0QsF672-TpLOAA2y1CYb5Ias6FtDP8APQh3IV5G1RO5QimwC3JM7bog6iBTRk8jTG6RrImE/s1600/IMG_20170402_162809.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="251" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUbXAcIeo_YDcJM3gyt3QlaNzyoZd-qTb8habI2qFwdC-2U_u4ViBpry-blfTxWKm0ZzZp0QsF672-TpLOAA2y1CYb5Ias6FtDP8APQh3IV5G1RO5QimwC3JM7bog6iBTRk8jTG6RrImE/s320/IMG_20170402_162809.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Why do I subject myself to this?!</td><td class="tr-caption" style="text-align: center;">The Cambridge Computer Laboratory seems to be missing from the map.</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhITcQtkWZMo_kYH4H5hKgYFglPd5ns9VjQ36x3GihvYEEx_OXY-cZesf3-v3g9ps02TEFX4FwOXCgVc32p3nJhSWL654Fup_YP8U_WXHlGKhLYv_i0UpJzBo6H4TvuRVUCOxMejUpP5iE/s1600/IMG_20170319_200321.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhITcQtkWZMo_kYH4H5hKgYFglPd5ns9VjQ36x3GihvYEEx_OXY-cZesf3-v3g9ps02TEFX4FwOXCgVc32p3nJhSWL654Fup_YP8U_WXHlGKhLYv_i0UpJzBo6H4TvuRVUCOxMejUpP5iE/s320/IMG_20170319_200321.jpg" width="255" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">PiSquared!</td></tr>
</tbody></table>
My first event was Pi Noon, so no time for warm ups, just straight into the action. Last Pi Wars I made it to the finals, this time I didn't even make it into the first round, losing all three of my balloons to one of my opponents.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/TBxPUqBMGVA/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/TBxPUqBMGVA?feature=player_embedded" width="320"></iframe></div>
<br />
Next up was the Obstacle Course, which turned out to be my best event of the day, completing it in just under 1 1/2 minutes to finish 2nd in my group and third overall. My first attempt around the sharks had PiSquared falling into the pit, but I was able to reverse out, limit my max speed down to 25% and making it around the pit on my second try. Unfortunately I didn't manage to get a video of my attempt, instead finding I had a short recording of me setting up the camera...<br />
<br />
As soon as the Obstacle Course was completed it was over to skittles, with a couple of practice runs showing that the servo controller hoop mechanism just wasn't coping with moving the wooden ball around, slipping off the servo, so I changed over to just pushing the ball. This didn't go all that well as the hoop mechanism was now catching on the ball, stopping me from getting a clean hit, and I ended up with a total score of 2 skittles knocked down!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/KimAIKJQzFk/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/KimAIKJQzFk?feature=player_embedded" width="320"></iframe></div>
<br />
I ended up skipping the next two challenges, Line following and the Minimal Maze, as I just didn't have the sensors working well enough to compete. This left me with an hour or so break to grab lunch and recharge batteries... Unfortunately the battery I was charging decided to give up the ghost, getting rather hot and swelling to a large size. Luckily I had been charging it in a fireproof bag and I took it outside to cool down for the next few hours (Of course if it hadn't been in the bag I may have seen it start to expand and stopped it earlier).<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis_bkrxWndUTR0VLNG5rYaiu6CpR8MvJYya7ozHZobFQX0lZPziLkMemik3Fh0x4pf9-UacQPjCzmeYgy0sQ0uSeBSnjzKoQQqkkUVivDr6gn_SybVtYukhEZWt_-Dp7oGQJ3IJHPWzT4/s1600/IMG_20170405_183945.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="307" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis_bkrxWndUTR0VLNG5rYaiu6CpR8MvJYya7ozHZobFQX0lZPziLkMemik3Fh0x4pf9-UacQPjCzmeYgy0sQ0uSeBSnjzKoQQqkkUVivDr6gn_SybVtYukhEZWt_-Dp7oGQJ3IJHPWzT4/s320/IMG_20170405_183945.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">At least it didn't catch fire!</td></tr>
</tbody></table>
Golf was up next and this time I completely forgot the camera! The little cage attachment I had created worked mostly okay. The ball did escape when heading down the initial incline, and the size of my robot made it a little hard to recapture on the bend, but I got the ball around the course on both attempts. The first time getting it in the hole, and in the second attempt it rolled behind the windmill.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAVGpFzmJnlQN0vxYkYhYcj4B7TKDkOWeyj_kjHQmLJYlvu0Oi7kY7mvFv2-_xnI92aVdRFGD3JrvsOhY0_By4BU92kowvL0hS5ccuYBH_P8l1bc6f_Voa_KCgzdaXb6DxZWgE3TkWasc/s1600/IMG_20170401_113531.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAVGpFzmJnlQN0vxYkYhYcj4B7TKDkOWeyj_kjHQmLJYlvu0Oi7kY7mvFv2-_xnI92aVdRFGD3JrvsOhY0_By4BU92kowvL0hS5ccuYBH_P8l1bc6f_Voa_KCgzdaXb6DxZWgE3TkWasc/s320/IMG_20170401_113531.jpg" width="297" /></a></div>
<br />
The final event for me (As there would be no more Pi Noon battles) was the straight line speed test. This year the challenge was autonomous only, as opposed to either in previous attempts. So I sent PiSquared trundling down the track, requiring several rescues to reach the end. I even manage to repeat my PiWars 2014 trick of finishing a run with one less wheel than I started with... I suspect that run didn't count in the end.<br />
<br />
With all my challenges completed I packed up most of my stuff and headed on down to watch the rest of Pi Noon. This time remembering my camera and tripod! Sunday didn't seem quite as busy as Saturday, despite there being an extra 16 teams competing. I guess the overall team size was higher on the Saturday, with lots of school kids and parents around.<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/KjmvbBDchDA/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/KjmvbBDchDA?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
So how did I get on? Well not so great in the end... My best result was in the Obstacle course, but this was balanced out by doing rather poorly in the skittles. My worst event was, technically, the line following and minimal maze as I ended up not even attempting them :( For the other events I was kinda middling and, despite getting into the Pi Noon finals last time, this year I got knocked out in the first round!<br />
<br />
So what happened? To a degree I think this was down to my inexperience in 3D design, having only previously designed very simple components I had a lot to learn, and plenty of trial and error, to design the robot chassis, interchangeable front wing, rear wing and other accessories. Added to this was the sheer amount of time it took to print, the main chassis itself coming in at just over 20 hours, the rear wing 5 hours and the front wing 2+ hours. My 3D printer was running almost constantly for the month leading up to Pi Wars itself and I still had stuff being printed as I was packing up ready to leave.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5VOQ4sD8s4GrpH67NabXTBXfZWh2SxQy4XzSBvzhLhUIEuli63jx380Atg_elj43cQwOoBQLByfgEi74uzeGb8r74Ivfor-FuyTbtmuzL-S6l1LBKgmA0Hav42BcdS6WM01UwZkIUAt4/s1600/IMG_20170411_222741.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5VOQ4sD8s4GrpH67NabXTBXfZWh2SxQy4XzSBvzhLhUIEuli63jx380Atg_elj43cQwOoBQLByfgEi74uzeGb8r74Ivfor-FuyTbtmuzL-S6l1LBKgmA0Hav42BcdS6WM01UwZkIUAt4/s200/IMG_20170411_222741.jpg" width="200" /></a></td><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1JT8TDu5gXSwrLEC6C0euSwqs8FEKWZHlJpOeK9GeqE3RsDcZr4lnf0mgTh7Cyj5u0VlDooJ71e3vU9J57ipDNuNBhUlSlNUrO64alXHFR_xE_vPjIpDdsbXib6oHKCfuIdTEJ35m6BQ/s1600/IMG_20170411_222639.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="123" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1JT8TDu5gXSwrLEC6C0euSwqs8FEKWZHlJpOeK9GeqE3RsDcZr4lnf0mgTh7Cyj5u0VlDooJ71e3vU9J57ipDNuNBhUlSlNUrO64alXHFR_xE_vPjIpDdsbXib6oHKCfuIdTEJ35m6BQ/s200/IMG_20170411_222639.jpg" width="200" /></a></td><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6cZSLEm2WAfyWP-W46JXpQpSw5l8H4sfPWXlBzMemnIq0oPvtBvBPIWVdjaCL1dZDV63pcKm0gYnZQfLzbFOUIA1qBOdnoHYVzGcKSVUmcrGCVIdMCQfuB2IXIR02NRBk88U2yB4sW0g/s1600/IMG_20170411_222525.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="58" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6cZSLEm2WAfyWP-W46JXpQpSw5l8H4sfPWXlBzMemnIq0oPvtBvBPIWVdjaCL1dZDV63pcKm0gYnZQfLzbFOUIA1qBOdnoHYVzGcKSVUmcrGCVIdMCQfuB2IXIR02NRBk88U2yB4sW0g/s200/IMG_20170411_222525.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Normal and PiNoon wings</td><td class="tr-caption" style="text-align: center;">Golf and skittles attachments.</td><td class="tr-caption" style="text-align: center;">Distance and line sensors.</td></tr>
</tbody></table>
<br />
With all the time spent on getting the hardware ready it left very little time to actually work on the software, the main reason I didn't try the line following and minimal maze challenges. So how to improve? Well having a second printer up and running would have helped, and I started using the 'cut' functionality of my slicer to only print out the part of the model I'm currently working on. There were several accessories that I had the parts for but not the time to assemble and test (I had several plans for skittles, one involving a drill, another a mallet), which if completed would made my robot more competitive.<br />
<br />
Being a totally new design there was quite a lot of work and time spent before having something that could actually move around, so if there was a Pi Wars 2018, and I was competing, then I'd be looking at doing an improved/finished version of this design. I do want to finish getting the sensors and so on working, hopefully getting stuff to a stage where I can release the STLs and software for other people to use. Possible even have it slightly improved for the Egham Raspberry Jam later this month.<br />
<br />
Other than that there are several projects that I've had on hold whilst working on Pi Wars that I'd like to get back to, as well as some blog posts I need to write (Like how I finally got a bluetooth network up and running!).<br />
<br />
Leo<br />
<br />
<br />
<br />Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-25070370082393306972017-03-24T21:23:00.001+00:002017-03-24T21:23:07.673+00:00Pi Wars 2017 - Scaling things upWhilst the robot I posted about in my last blog entry is reasonably compact and contains most of the components I'll be needing for the PiWars 2017 challenges, in practice it feels a little bit sluggish and under powered, and not something I'd be confident entering into the Pi Noon challenge. So I decided what was need was a slightly bigger robot.<br />
<br />
Now as the robot is 3D printed I can just scale it up to the size I want yes? Well, unless you have a fully working replicator, its not quite that easy. The plastic parts scale up nicely the motors and other electronics don't. The weight increases, so you need bigger motors, then bigger, however the batteries, and possibly a higher rated motor controller. Then you need to make all these bigger components fit on the robot and suddenly it feels like you have less space than you did before!<br />
<br />
I stripped all the parts from my PiWars 2015 entry and went through several revisions of the scaled up chassis, trying to work out how to make everything fix together. Eventually I did a spot of rewiring on the controller, cut off some pins and finally came up with the following.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY2O7DN6g-7bWC4DtirxI70JzRpMMxVjM5r1aYn8h0LA2CDVGHvf7WKiV13z-huavk-4EWDKAC9HNZy57zXc4uM6MKY9bR4yjTUxlHaYke_fYrn_XpRvtn8KR0joC5UlhDNEj1QKwsCbw/s1600/IMG_20170319_200505.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiY2O7DN6g-7bWC4DtirxI70JzRpMMxVjM5r1aYn8h0LA2CDVGHvf7WKiV13z-huavk-4EWDKAC9HNZy57zXc4uM6MKY9bR4yjTUxlHaYke_fYrn_XpRvtn8KR0joC5UlhDNEj1QKwsCbw/s400/IMG_20170319_200505.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Old vs New</td></tr>
</tbody></table>
<br />
The new Pi Squared chassis is considerably larger than the previous variant, as well as gaining a rear wing, just fitting inside the maximum dimensions allowed for PiWars. The front wing is now removable, allowing the chassis a bit more space on my 3D printer, and can be swapped out for the various different challenges, although the only one I have prepped so far is for Pi Noon.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi33BGtFf8GvFH4LyvzrUGK7zVsuANiDzdkhLLYvxz1JH0f6uC9ntxlSvhxDLtk2p0Bc6lMR3Xm_hr7FMkWocQoZGmGXrZ2B9LOiVN7gyg153jbwY87gSzNoWrbmTeNkMf5YPJuQgoCmjw/s1600/IMG_20170324_080658.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi33BGtFf8GvFH4LyvzrUGK7zVsuANiDzdkhLLYvxz1JH0f6uC9ntxlSvhxDLtk2p0Bc6lMR3Xm_hr7FMkWocQoZGmGXrZ2B9LOiVN7gyg153jbwY87gSzNoWrbmTeNkMf5YPJuQgoCmjw/s320/IMG_20170324_080658.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Removable front wings</td></tr>
</tbody></table>
The downside to the increased size is it takes a lot longer to print. The chassis takes just over 20 hours to print, the rear wing 5 and the front wing another 2...So my printer has been running almost constantly for the past week!<br />
<div>
<br /></div>
<div>
The control method is my usual PS3 controller, with a simple python script driving the motors, making use of pygame and the GPIOZero library to keep everything simple. In fact the entire code is rather small.</div>
<div>
<br /></div>
<br />
<pre style="background-color: grey; border: black solid 1px; color: white;"><code>import pygame
import os
import time
import gpiozero
os.environ["SDL_VIDEODRIVER"] = "dummy"
pygame.init()
pygame.display.set_mode((1,1))
# Wait for a joystick
while pygame.joystick.get_count() == 0:
print 'waiting for joystick count = %i' % pygame.joystick.get_count()
time.sleep(1)
pygame.joystick.quit()
pygame.joystick.init()
j = pygame.joystick.Joystick(0)
j.init()
print 'Initialized Joystick : %s' % j.get_name()
from gpiozero import OutputDevice
from gpiozero import Robot
EN1 = OutputDevice(17)
EN2 = OutputDevice(6)
EN1.on()
EN2.on()
r = Robot(left=(27,5), right=(13,4))
try:
# Only allow axis and button events
pygame.event.set_allowed([pygame.JOYAXISMOTION, pygame.JOYBUTTONDOWN])
left = 0.0
right = 0.0
while True:
time.sleep(0.1)
events = pygame.event.get()
for event in events:
UpdateMotors = 0
if event.type == pygame.JOYAXISMOTION:
left = j.get_axis(1)
right = j.get_axis(3)
r.value = (left, right)
except KeyboardInterrupt:
# Turn off the motors
j.quit()
</code></pre>
<div>
<br />
Finally here's a quick view of the new and improved Pi Squared running around.<br />
<div class="separator" style="clear: both; text-align: center;">
<br /><iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/yx2ONqIAIoM/0.jpg" src="https://www.youtube.com/embed/yx2ONqIAIoM?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
With only a week left until PiWars I still have a lot to do, sensors to attach, code to write, practising driving.. So its going to be a busy weekend and evenings for the rest of the month!<br />
<br />
Leo</div>
Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com3tag:blogger.com,1999:blog-7973550104339721497.post-13951109837907062402017-03-01T23:00:00.002+00:002017-03-01T23:00:34.741+00:00Pi Wars 2017- How to build robot?Having considered the various challenges that will be present at Pi Wars 2017 next step is to give some thought on what type of robot I'll be needing to tackle them. Now the sensible approach would be to use my Pi Wars 2015 entry as a starting point, after all its a fairly solid base, improve on the returning challenges (e.g. the line following) and add additional functionality to handle the new challenges.<br />
<br />
Of course that isn't the approach I'll be taking, although it will be the backup plan, instead I'm looking at starting afresh and putting together a new robot for Pi Wars 2017. To a degree this is because I have new ideas and new components I want to try out, as well as the fact that my Pi Wars 2015 entry didn't turn out to be all that interesting.<br />
<br />
There are various components you need to put together a robot and, fortunately, in the run up to PiWars 2017 the MagPi Magazine has run a few articles, starting in <a href="https://www.raspberrypi.org/magpi/issues/51/">Issue 51</a>, on how to build a remote controlled robot suitable for Pi Wars.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-M9Su3wm2cOJQJuujtCXz5b4FqS1TRQZe-n3pGmeZ8emDeye12tjy-w670Rai7V9iCtSKnJKGwxBtAJPdKzAIJ-jq0zwCjlIQRGy3gKnI615J8Bm1A0C26HvHaTVusLJOKzfvU37O3DE/s1600/IMG_20170123_203451.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-M9Su3wm2cOJQJuujtCXz5b4FqS1TRQZe-n3pGmeZ8emDeye12tjy-w670Rai7V9iCtSKnJKGwxBtAJPdKzAIJ-jq0zwCjlIQRGy3gKnI615J8Bm1A0C26HvHaTVusLJOKzfvU37O3DE/s200/IMG_20170123_203451.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Lots of wheels and motors.</td></tr>
</tbody></table>
So what do we need? Well I will be going for a wheeled robot once more, either a two or four wheeled variety, and I'll be aiming to reuse some of the motors and wheels from previous robots. At last PiWars I took a selection of wheels but ended up not swapping them out for specific events as the motor connections were a little fragile, so that's an area I want to improve this year.<br />
<br />
As far as the motors go I want to investigate using stepper motors to try and get a bit more precision in some of the autonomous challenges. I have a set of four from a 3D printer, as well as a couple of larger ones salvaged from an old Laser printer.<br />
<br clear="all" />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRAq_hzd9gIjgkV3wVxlmTXaqDgwMnOQvlyJMCGbJaSoMHWviofbGilQsBCBkBU4ZjwkU2YVYZURjcbLZS8Bswu4nsgImGBsm8hlkIkj4dkBYIpR7mO3HvqMV4ysY06OXadL2kCl2RCL8/s1600/IMG_20170228_191654.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRAq_hzd9gIjgkV3wVxlmTXaqDgwMnOQvlyJMCGbJaSoMHWviofbGilQsBCBkBU4ZjwkU2YVYZURjcbLZS8Bswu4nsgImGBsm8hlkIkj4dkBYIpR7mO3HvqMV4ysY06OXadL2kCl2RCL8/s200/IMG_20170228_191654.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Motor drivers</td></tr>
</tbody></table>
<br />
Next up is the motor controller. Here I have a choice of reusing the motor driver from last year as well as using some of the other's I've purchased over the years. The final choice is liable to be determined by the motors/wheels I end up using, and indeed I may need more than one motor driver, especially if I want something to propel the skittle or golf ball at a high speed.
<br />
<br clear="all" />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwoKI8GO2qb0ZbKu8Pzck8LORmXebeDiTBc-ZcWyBez8NWBVZgXxqSDII8FudzVCHAqmkNO83ApUl3ZAkgk0RZ4a0wEtu5fbfsvCk2BWNC68qkaLT23HKlYRWaT8iQ6AuLzDGk2k1OhUw/s1600/IMG_20170301_220001.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="178" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwoKI8GO2qb0ZbKu8Pzck8LORmXebeDiTBc-ZcWyBez8NWBVZgXxqSDII8FudzVCHAqmkNO83ApUl3ZAkgk0RZ4a0wEtu5fbfsvCk2BWNC68qkaLT23HKlYRWaT8iQ6AuLzDGk2k1OhUw/s200/IMG_20170301_220001.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Batteries!</td></tr>
</tbody></table>
A robot won't move without power, and once more I'll be going with Lithium Polymer ones for their high power in a small package. I've not yet had one explode on me... however there have been a few sparks, so you need to be careful handling these.<br />
<br />
<br clear="all" />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3tc8M9v548KwKBBQj1K-ALycJCMOSLi1YAQWUyncXYlmEa0vTvCOed3UA7W97iyhte0WJzH65K83vMy5Nrgz7y1DhTqUFhTGDtajJRGVfP0PKDdR4cDBZ1ukN2Fd9muNA17A9AzCwEvU/s1600/IMG_20170301_221705.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="154" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3tc8M9v548KwKBBQj1K-ALycJCMOSLi1YAQWUyncXYlmEa0vTvCOed3UA7W97iyhte0WJzH65K83vMy5Nrgz7y1DhTqUFhTGDtajJRGVfP0PKDdR4cDBZ1ukN2Fd9muNA17A9AzCwEvU/s200/IMG_20170301_221705.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Pis!</td></tr>
</tbody></table>
<br />
<br />
Next is the brains of the robot, last time I used a Raspberry Pi A+ for its mix of smaller size, reduced power consumption and camera connector. This year I'm currently using a RPi 3B for its additional power (In case I do image processing) and its built in WiFi and bluetooth. Although I'm also planning on using some PiZero for supporting roles.<br />
<br />
<br clear="all" />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeP3HNS2QzXg2W8r-lhpyxbN8xUvwxyKSuebX7CsF-fgXJwPvHrVG4EgQWhjsYpAAL-X7awmoJ0xLpKukqA6UOqaPNQ2aP1NmJ1kGCxU2ip4zznp6PO5Vb1OZtfPFke1R7fNYFsXUFMYI/s1600/IMG_20170123_185355.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeP3HNS2QzXg2W8r-lhpyxbN8xUvwxyKSuebX7CsF-fgXJwPvHrVG4EgQWhjsYpAAL-X7awmoJ0xLpKukqA6UOqaPNQ2aP1NmJ1kGCxU2ip4zznp6PO5Vb1OZtfPFke1R7fNYFsXUFMYI/s200/IMG_20170123_185355.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Toys!</td></tr>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbgK8ypn_GlkRdF_FHJ_8ADd6IKjulw3hnjE5_KTQJKsuUAoPlGHqbOZfSvx1NF16mY2DsNRMRAYJZC2RKtPQ7EJ0VLyGPjMH7UGtzEOHjEiPPPKdTe3gVyPCDqjC9uIe4j5fzxzdKN8M/s1600/IMG_20170123_190659.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbgK8ypn_GlkRdF_FHJ_8ADd6IKjulw3hnjE5_KTQJKsuUAoPlGHqbOZfSvx1NF16mY2DsNRMRAYJZC2RKtPQ7EJ0VLyGPjMH7UGtzEOHjEiPPPKdTe3gVyPCDqjC9uIe4j5fzxzdKN8M/s200/IMG_20170123_190659.jpg" width="193" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Boxes and containers</td></tr>
</tbody></table>
<br />
Next up on the list is the chassis, something to fit all the above components into, along with the connecting wires as well as any extra sensors or components required. My first Raspberry Pi robots were based around the BigTrak toy and other people have has success with other large plastic toys (preferably ones that already have motors in them!).<br />
<br />
Cheaper alternatives are empty food or packaging boxes (e.g. ice cream tubs, the CamJam EduKit box) as well as various project boxes available at Maplins or similar places. I used a project box for PiWars 2015, but ended up finding it to be a little restrictive in getting all the components connected to it, and overall ended up with a fairly plain looking robot (especially when compared to my Pirate ship from the first PiWars!).<br />
<br />
Luckily I have a much more flexible option this year, a 3D printer! Allowing me to, in theory, print out the exact shaped chassis I want. Of course that is entirely dependant on me being able to design it in the first place....<br />
<br />
<br clear="all" />
I've only created fairly basic objects to print before, so I thought I'd have a little practice by creating a chassis for a simple ZeroBorg based robot using 4 of the little micro metal gear motors to drive around. This took a few iterations but I generated a simple chassis that looked like it was going to work... apart from one small detail I missed.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-omGHo0lVKcU/WLdPdAnPK4I/AAAAAAAAyDI/nqj4aDtbT10gc_5IbfEE8mWw0XJE60_mwCPcB/s1600/IMG_20170118_204513.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="276" src="https://3.bp.blogspot.com/-omGHo0lVKcU/WLdPdAnPK4I/AAAAAAAAyDI/nqj4aDtbT10gc_5IbfEE8mWw0XJE60_mwCPcB/s320/IMG_20170118_204513.jpg" width="320" /></a></div>
Yes... I forgot to allow space for batteries to drive the motors.... I ended up balancing a 9V battery pack on top of the PiZero, but that wasn't exactly ideal...<br />
<br />
So it was back to the drawing board to come up with something a little better looking for PiWars and, after quite a few more iterations I've come up with the following (Which takes over 4 hours to print if I want it good quality!).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-zpRAJtl9MdY/WKmjkNF7MUI/AAAAAAAAx5E/o-Sx7gU1N90KG_NJGBqvXzlUQZlcpDAbwCPcB/s1600/IMG_20170219_134048.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="257" src="https://4.bp.blogspot.com/-zpRAJtl9MdY/WKmjkNF7MUI/AAAAAAAAx5E/o-Sx7gU1N90KG_NJGBqvXzlUQZlcpDAbwCPcB/s320/IMG_20170219_134048.jpg" width="320" /></a></div>
Still needs more work but its a Raspberry Pi 3, with camera, along with 2 motors, a LiPo battery and an AdaFruit PowerBoost 1000C to allow the LiPo battery to be charged without having to remove it, or interrupt power to the Pi3. There are liable to be many more iterations (It needs sensors/attachments for some challenges, maybe bigger motors/batteries too), but I'm hoping to keep to this general shape for the final event (only a month away now!).<br />
<br />
So that is how I'm planning on building my robot! More or less.. Obviously I have a lot more work to do, but already its looking nicer than my last attempt!.<br />
<br />
Leo<br />
<br />Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-61608766637489130242016-12-29T20:27:00.000+00:002016-12-29T20:27:41.554+00:00PiWars 2017 - Autonomous challengesIts the autonomous challenges at <a href="http://piwars.org/">Pi Wars</a> that separate the robots from the radio controlled cars, requiring one or more sensors on the robot to collect information about the real world, process it and make decisions on how to react in order to successfully complete the task at hand.<br />
<br />
To add to the complexity you are competing against a whole raft of other robots, so you have to balance between going slow and steady or quick and fast. Do you concentrate on completing the course without any penalties, or risk pushing things to get a good time?<br />
<br />
Of course the first step is working out how to approach each of the challenges and get a working, reliable system up and running, before trying to push things to the limits!<br />
<h2>
<a href="http://piwars.org/2017-competition/challenges/line-following/">Line following</a></h2>
<div>
A returning event for Pi Wars 2017, the robot needs to follow a black line on the ground, following it around a twisty course as many times as possible within the time limit provided.</div>
<div>
<br /></div>
<div>
My attempts at line following in the last Pi Wars didn't go so well... In testing the night before the Arduino controlling the line sensor started triggering the watchdog and restarting, clearing the calibration data and causing the robot to lose the line, so on the day I only got about a quarter of the way around the course. So this time around I want to take an approach that uses just Raspberry Pis, partly to try and avoid this issue in future, and partly due to the fact it is a Raspberry Pi based event! </div>
<div>
<br />
The first approach would to re-use the line sensor from last time, connecting it directly to a Raspberry Pi instead of an Arduino (something I've successfully done before using the pigpio library). Due to Raspbian not being a realtime OS it can take a lot of CPU time to ensure no data is lost, so for this approach I may have to use a dedicated Raspberry Pi to do the sampling, and send the data to the 'master' Raspberry Pi for processing.</div>
<div>
<br /></div>
<div>
An alternate approach is to use the Raspberry Pi camera to do a spot of image processing to determine where the line is, and where it is going. I've not done image processing since University, so this would require lots of investigation, research and learning. As I like using these events to learn new things, I'll definitely be giving this approach some serous consideration.</div>
<h2>
<a href="http://piwars.org/2017-competition/challenges/straight-line-speed-test/">Straight line speed test</a></h2>
<div>
Another returning event, the robot has to drive in a straight line as fast as possible along a 7.28m long trough. For Pi Wars 2017, however, the straight line speed test has been revised to be autonomous only, whereas previously I've only attempted this when under manual control (Attempts to use the compass on the Sense HAT having proven unreliable!).</div>
<div>
<br /></div>
<div>
A few approaches spring to mind for this event... Utilising feedback from motor encoders to try and ensure the robot is maintaining a straight line, using a sensor to ensure the robot stays a set distance away from one wall (probably reusing the<a href="http://optimuspi.mybigideas.co.uk/2015/10/stay-on-target-sensors.html"> range sensor</a> from last Pi Wars) or utilising the Raspberry Pi camera to try and detect where the walls of the trough are and ensuring the robot stays in the middle.</div>
<div>
<br /></div>
<div>
Using the range sensor sounds the most feasible, but it would be nice to get something working with the camera.</div>
<h2>
<a href="http://piwars.org/2017-competition/challenges/minimal-maze/">Minimal maze</a></h2>
<div>
Another new event for Pi Wars 2017, the robot has to navigate its way through a maze, without touching the walls, to reach the exit. The walls will be of various colours, providing information the robot could potentially use to determine where in the maze it is.</div>
<div>
<br /></div>
<div>
Initial thoughts on this challenge are that I could use a variation of the speed test solution, using a range sensor to keep the robot following the left or right wall, combined with a second sensor on the front to work out when a corner is coming up. Alternatively I could use a single range sensor and start out following the 'right' wall, then when the right wall turns blue (A camera being used to determine this) switch over to following the left wall. Hopefully avoiding hitting the outer wall as the direction changes!</div>
<div>
<br /></div>
<div>
The maze needs to be completed twice, with the times combined for the final result, so can we be a little sneaky and use the first run through to 'map' out the maze? Then use this map on the second run to zoom through it? You'd need to get the starting point spot on for the second run, but it certainly sounds feasible!</div>
<div>
<br /></div>
<div>
So those are my thoughts on the autonomous challenges... Do they sound good, bad, very bad? Is there enough time left to implement all of these?</div>
<div>
<br /></div>
<div>
Leo</div>
<div>
<br /></div>
Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-73393779425904714122016-12-28T20:44:00.000+00:002016-12-28T20:52:09.061+00:00PiWars 2017 - Manual challenges.Its been a busy few months since I was accepted as a competitor for PiWars 2017, unfortunately very little of that time has been spent on PiWars itself. Work has been especially busy, culminating in a sudden business trip to Taiwan where I had access to shops with all the connectors, cables and components I'd need for a robot, but with no idea what I needed yet!<br />
<br />
So in this post I've decided to jot down my ideas for the various manual challenges, as most of them have similar requirements, and its considerably easier to manually control a robot compared to telling it to deal with things itself.<br />
<br />
My general approach will be similar to last PiWars, a four wheeled vehicle with tank style driving, controlled via a joystick, but with some improvements. Whilst I had the option on my previous robot to change the motors and wheels it ended up being too fiddly to do on the day and led to my robot being defeated by the 'humps' at the start of the obstacle course due to still being on small wheels. So this is an aspect I want to review and improve upon this time.<br />
<h2>
<a href="http://piwars.org/2017-competition/challenges/obstacle-course/">Obstacle course</a></h2>
<div>
As the exact details of the obstacle course won't be known until the day itself I have to make some assumptions about what will be required based on previous events. I would expect certain parts of the PiWars 2015 course to be reused (especially the rotating table) with a few new elements added. As such I'll be needing a setup with good ground clearance and fine controls. A high top speed won't help much here, with the marble obstacle from last year requiring the robot to drive slowly in order not to dislodge any and occur a time penalty.</div>
<div>
<br /></div>
<div>
All the above is subject to change of course, the marbles may be swapped out with a gravel pit and I'll be wanting chunkier wheels to cope with that.</div>
<h2>
<a href="http://piwars.org/2017-competition/challenges/pi-noon-the-robot-vs-robot-duel/">Pi Noon</a></h2>
<div>
Having gotten to the final of Pi Noon last time (with a lucky win or two I must admit) there's probably not much to change here. I'm tempted by the mecanum wheels that Triangula was sporting last year, but I would need quite a lot of practise to be good at using them, something I've never ended up having much time for in previous events!</div>
<h2>
<a href="http://piwars.org/2017-competition/challenges/skittles/">Skittles</a></h2>
<div>
Skittles was a little hit and miss last time, with my robot knocking down more skittles during the practice run than it did in the official attempts. Due to time issues I ended up just pushing the ball for PiWars 2015 which, unsurprisingly, proved to be very unreliable.</div>
<div>
<br />
Possibly approaches to it this year could be a motorised launching system (a spinning wheel or two to get the ball up to speed), a catapult type system (pulling back and releasing an elastic band), a spring loaded system or maybe something that picks up the ball and rolls it. In theory anything that can propel the ball forwards in a straight line should work out okay for skittles, whereas the next challenge potentially requires a finer degree of control.<br />
<h2>
<a href="http://piwars.org/2017-competition/challenges/slightly-deranged-golf/">Slightly Deranged Golf</a></h2>
</div>
<div>
A new challenge for PiWars 2017 is golf, and apparently a slightly deranged variant of the game. As such its a bit of an unknown, with only the details of the challenge to base things on. The game is just a single hole (No 18 hole courses here!) and the robot is only allowed to push or hit the ball to get it around the obstacles. What those obstacles are we don't know (sand pits?) and whether its better to hit or push the ball won't be known until the day itself.</div>
<div>
<br /></div>
<div>
The traditional approach would favour having a mechanism that can 'hit' (or propel) the ball forwards at different speeds, allowing the robot to progress through the course, changing directions to move around obstacles and eventually reach the hole. However this does sound like quite a complicated approach, as each time you need to judge how far to hit the ball, chase it with the robot, line up the next shot etc.</div>
<div>
<br /></div>
<div>
A simpler approach maybe to push the ball the entire way, potentially lowering a cup over the top of it to ensure the ball doesn't get away from the robot, leaving you to just drive to the hole and drop it in. This, of course, assumes the course is flat and there is enough space between obstacles for the robot to drive through. If not the ball could escape and you'd be stuck trying to capture it again.<br />
<br />
So that's my current thoughts on the manual challenges, next up will be the autonomous ones!<br />
<br />
Leo</div>
Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com1tag:blogger.com,1999:blog-7973550104339721497.post-64065958250755100242016-11-21T13:38:00.000+00:002016-11-21T13:38:25.144+00:00Controlling a 3D Printer with the new Raspberry Pi Zero 1.3 - follow upBack in May I wrote a <a href="http://blog.mybigideas.uk/2016/05/controlling-3d-printer-with-new.html">blog entry</a> describing how I'd used a Raspberry Pi Zero to control my 3D printer and, at the time, came to the conclusion that the RPi Zero was indeed a viable alternative to the standard model Raspberry Pi once they were more readily available.<br />
<br />
It took a while but I eventually ended up with enough Zeros that I felt I could dedicate one to controlling my printer and have been running it successfully for the past couple of months. My original goal for switching to a Zero was based around building a more compact solution, as opposed to a cheaper one, and I went through a couple of iterations to end up with my current solution.<br />
<br />
The original test setup had cables, adaptors and components all haphazardly laid out, but since then various adaptors and boards have come out to provide additional connectivity to the standard Zero.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG14lAr0UbY87WSBPXLaibb52D2USENsGKIiIa5340o73igtcBkzLyTqnl-1_7MHXMJbZ4Yke0Ay9nZtx1YODDuTxZ9pslX6hNifs8omgNRJtQ4hJ9BBoq3uxaYdAMzCfV7pCuc97qSi4/s1600/IMG_20160522_213111.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG14lAr0UbY87WSBPXLaibb52D2USENsGKIiIa5340o73igtcBkzLyTqnl-1_7MHXMJbZ4Yke0Ay9nZtx1YODDuTxZ9pslX6hNifs8omgNRJtQ4hJ9BBoq3uxaYdAMzCfV7pCuc97qSi4/s320/IMG_20160522_213111.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Its all a little messy</td></tr>
</tbody></table>
The first setup I tried was the <a href="http://www.uugear.com/product/zero4u/">Zero4U</a> board, a 4 port USB hub that fits underneath the Zero, allowing both the printer and a USB WiFi dongle to be connected. Whilst that worked I was under using the hub itself, and it still looked a little untidy with the dongle and cables sticking out on multiple sides.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpHsMczcCMf3qN5aw5r_H9Y1L-rSCxeshxwa7wsVIS59NSNQU6NMT7nCGJXbKE-V6POJOMuBfH9ZQOfA6RZImTx5EPGvEuPhDaVfcIMlvSVMc00dfEVcxmv9ZoHQWBAynv5xYBDW1exRs/s1600/IMG_20160707_215629.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpHsMczcCMf3qN5aw5r_H9Y1L-rSCxeshxwa7wsVIS59NSNQU6NMT7nCGJXbKE-V6POJOMuBfH9ZQOfA6RZImTx5EPGvEuPhDaVfcIMlvSVMc00dfEVcxmv9ZoHQWBAynv5xYBDW1exRs/s400/IMG_20160707_215629.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A Zero4U installed under the RPi Zero.</td></tr>
</tbody></table>
My next, and ultimately final, setup was using the <a href="https://redbear.cc/product/iot-phat.html">RedBear IoT pHAT</a> to provide the Zero with a wireless connection, leaving the single USB port available for connecting to the printer. The final step was getting a <a href="https://www.amazon.co.uk/gp/product/B018M8YNDG">USB micro to mini OTG</a> cable to allow connecting the printer without needing an extra adaptor. I decided to use a <a href="https://thepihut.com/products/zeroview">ZeroView</a> board to mount everything on (due to having one spare) and then quickly designed and printed a support to mount it all on, with the camera pointing at the bed.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9WpjOrXIZZ1yRLoqvWBSwQilVrz_Y8pXECinR3-udzdK192PU1s67x6JL2-PwKazhLwn0QeLwx2AkeAxUKXEa7QxGahuOpK1ksSD-VHDKXzeY4oBU_175UJLfuusbkYdF_HYFSo1cqyg/s1600/IMG_20161023_142218.jpg" imageanchor="1" style="clear: left; float: left;"><img border="0" height="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9WpjOrXIZZ1yRLoqvWBSwQilVrz_Y8pXECinR3-udzdK192PU1s67x6JL2-PwKazhLwn0QeLwx2AkeAxUKXEa7QxGahuOpK1ksSD-VHDKXzeY4oBU_175UJLfuusbkYdF_HYFSo1cqyg/s320/IMG_20161023_142218.jpg" width="320" /></a>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG02GQa-EFNyyYzdHZT_biwJHVXmq9pkGnkFweqVy_626Je9DUwl41w2s4PnFh7fZdDMvpkugUfyNhiZGW7TX_O6cdoSrWvG4rgiIELPJRLvoXdTLRtPhNdBxbY3I5h16PGvdvFZeGBTA/s1600/IMG_20161023_142206.jpg" imageanchor="1" style="clear: right; float: right;"><img border="0" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG02GQa-EFNyyYzdHZT_biwJHVXmq9pkGnkFweqVy_626Je9DUwl41w2s4PnFh7fZdDMvpkugUfyNhiZGW7TX_O6cdoSrWvG4rgiIELPJRLvoXdTLRtPhNdBxbY3I5h16PGvdvFZeGBTA/s320/IMG_20161023_142206.jpg" width="320" /></a>
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
As mentioned earlier I've been running this setup for a few months now and the only issue I've run into was a failure when printing a <a href="http://www.3dbenchy.com/">3D Benchy</a>, which I thought may be an indication that the Zero was struggling to deal with larger gcode files. However I got a similar result after switching back to the RPi B+ (which had successfully printed 3D Benchy in the past) so have put that down to either one of the printers motors overheating, or an issue in the produced GCode.<br />
<br />
I never got around to mounting my RPi B to the printer, so whenever it got moved (albeit rarely) I had to move the RPi and printer separately. With this new setup I can just unplug the power and lift up everything as a single unit, and I have indeed taken this setup to a Raspberry Jam to show it off.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOnaF20mNtHKao16-aRJReL_0tkbwoujbXE6eZzdgzF4LIK17BtlYyCORZ9WfXlGgApIotwdP7_Z-FSPHMz-PFSMOROHtUap7eByk4qcQUE7wPdw0_rYJFO9f6qg13zQiD8-TlYXyhMvY/s1600/IMG_20161016_145030.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="215" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOnaF20mNtHKao16-aRJReL_0tkbwoujbXE6eZzdgzF4LIK17BtlYyCORZ9WfXlGgApIotwdP7_Z-FSPHMz-PFSMOROHtUap7eByk4qcQUE7wPdw0_rYJFO9f6qg13zQiD8-TlYXyhMvY/s320/IMG_20161016_145030.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Down at the Egham Raspberry Jam.</td></tr>
</tbody></table>
<br />
Leo<br />
<br />Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-59830585038104308562016-10-17T20:25:00.003+01:002016-10-17T20:27:14.929+01:00PiWars 2017<a href="http://piwars.org/">PiWars</a>, the Raspberry Pi based robotics competition, is back for a third time and I will be, once again, competing. Last time I entered my robot 'OptimusPi' (Which I blogged about <a href="http://optimuspi.mybigideas.co.uk/">here</a>) with my best result being runner up in the Pi Noon battle.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRJKPw25J-l4oKuibtzP6LSOr6TDMH-W7BTaDXg-i9JqyK6yOfb6klCQ-3BAGA6Jqcv7fALISLe02vMJhvE8foejY_sNEv_N-3R_IRILwPbiY5jSq62w6lZjxdPdz1YVVp-8KkvhVg-Lk/s1600/IMG_20151205_180035.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRJKPw25J-l4oKuibtzP6LSOr6TDMH-W7BTaDXg-i9JqyK6yOfb6klCQ-3BAGA6Jqcv7fALISLe02vMJhvE8foejY_sNEv_N-3R_IRILwPbiY5jSq62w6lZjxdPdz1YVVp-8KkvhVg-Lk/s320/IMG_20151205_180035.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">OptimusPi - From PiWars 2015</td></tr>
</tbody></table>
PiWars 2017 has grown in size and is being held over two days, instead of one, and I will be competing on Sunday 2nd April 2017 in the Pros/Veteran category as team 'Pi Squared'. Whilst I'm certainly a veteran of PiWars, I'm not sure I count as a Pro!<br />
<br />
So what is my plan this time? Well for OptimusPi I started on the basic chassis quite early, having a basic bot driving around before working on anything else, but in the end I found myself feeling quite constrained with the design, especially when getting all the sensors and other components to fit inside. So this time around I'll be starting with determining how I'll be approaching the various challenges, trying it out on one of my existing robots, and coming up with a chassis design later in the day.<br />
<br />
The challenges themselves are a mix of old and new with the <a href="http://piwars.org/2017-competition/challenges/straight-line-speed-test/">speed test</a>, <a href="http://piwars.org/2017-competition/challenges/skittles/">skittles</a>, <a href="http://piwars.org/2017-competition/challenges/pi-noon-the-robot-vs-robot-duel/">Pi Noon</a>, <a href="http://piwars.org/2017-competition/challenges/line-following/">line following</a> and <a href="http://piwars.org/2017-competition/challenges/obstacle-course/">obstacle course</a> making a return. With the new challenges of <a href="http://piwars.org/2017-competition/challenges/minimal-maze/">Minimal Maze</a> and <a href="http://piwars.org/2017-competition/challenges/slightly-deranged-golf/">Slightly Deranged Golf</a> joining them. For the first set I can draw on my experiences from previous events to know what approaches worked and what didn't, hopefully leaving most of the time to concentrate on the new events and actually having an interesting looking robot this time around (instead of a box on wheels that OptimusPi turned out to be).<br />
<br />
Of course the other question is what to wear! So far I've turned up as a pirate and then a scientist... I already have a few ideas, but I'll need some good time management to pull everything off. In theory I have just over six months to get everything sorted, but its surprising how fast that time can go.Plus there's also the blogging challenge, so stay tuned here for more updates!<br />
<br />
Leo<br />
<br />
<br />
<br />
<br />
<br />
<br />Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-51466655539720324242016-08-22T13:22:00.000+01:002016-09-11T21:45:48.153+01:00PiZero Bot V2.0Back in December 2015 I created my first Raspberry Pi Zero based Bot. It was a little ungainly with cables looping all over it and a USB WiFi dongle sticking out the side but it was relatively small, moved around and, at the time, I felt there was still plenty of room to make it more compact.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCKGrAd0aoZL_as8J5Y082xowklSB5du4aNKaPfxeY59CFC05XnRNY3xe8RA7wrLp3hDPnpeZAtsEpKL-1SFiDNMcpp87Rg0PGAv0BBg2kg_MJA6HrzTJe-HKAFU3je_eOVkWAYSHbr2U/s1600/IMG_20151215_213704.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCKGrAd0aoZL_as8J5Y082xowklSB5du4aNKaPfxeY59CFC05XnRNY3xe8RA7wrLp3hDPnpeZAtsEpKL-1SFiDNMcpp87Rg0PGAv0BBg2kg_MJA6HrzTJe-HKAFU3je_eOVkWAYSHbr2U/s320/IMG_20151215_213704.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">PiZero Bot V1.0</td></tr>
</tbody></table>
The aim of the next variant was to squeeze all the components into a mint tin that was only slightly larger than the Pi Zero itself. This proved something of a challenge and it wasn't until the release of Pimoroni's <a href="https://shop.pimoroni.com/products/zero-lipo">Zero LiPo</a> board and Average Man's <a href="https://thepihut.com/products/protozero">ProtoZero </a>development board that I was able to get everything compact enough to fit inside.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi13EPYrqm1FllXsyL-h-EHHDMJLg0oEXLkckpLuKdtxGqk2oLi3bCUqEHkbNvnK0fcbef56A-CS5rT2_j9ojvP8JOYn6yMq7jOHWNHbB_G3wvxYH47jbItQ1R3RXrK_KjZ_vWCmOh_tfA/s1600/IMG_20160818_212213.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi13EPYrqm1FllXsyL-h-EHHDMJLg0oEXLkckpLuKdtxGqk2oLi3bCUqEHkbNvnK0fcbef56A-CS5rT2_j9ojvP8JOYn6yMq7jOHWNHbB_G3wvxYH47jbItQ1R3RXrK_KjZ_vWCmOh_tfA/s320/IMG_20160818_212213.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The tin is only slightly bigger then the Pi Zero</td></tr>
</tbody></table>
I had never quite figured out how to best connect the AdaFruit PowerBoost to my PiZero without it getting in the way of the other components I needed to squeeze in, but the Zero LiPo fits snugly onto the Pi Zero PCB, taking up a minimal amount of space. With the power in place next step was to come up with a more minimal motor driver. After ordering a pack of L283D motor controllers (Buying several in case I killed one) I mounted it upside down on the ProtoZero board, after doing several dry runs to ensure I had enough space to fit in the wires and somewhere for the motors to attach.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK7a0Uv0IMb1F9EC0YSb1J9w3-zA_K9PhyphenhyphenwEL887LwMrYu5iJhY0KTsIodD1Ob-1HN6_K0r6l2DJvVJlM6GWR0Po7GAR5Vt9cHJ9cgnLYI4nWSrMFGLn9lwlLYb0-b-5vWYys1RYA_5Ww/s1600/IMG_20160818_205607.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="91" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK7a0Uv0IMb1F9EC0YSb1J9w3-zA_K9PhyphenhyphenwEL887LwMrYu5iJhY0KTsIodD1Ob-1HN6_K0r6l2DJvVJlM6GWR0Po7GAR5Vt9cHJ9cgnLYI4nWSrMFGLn9lwlLYb0-b-5vWYys1RYA_5Ww/s320/IMG_20160818_205607.jpg" width="320" /></a></td><td><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRAkjZRMAMfiXfckubHu2NrRhwGkRnQrHd8k1frVuB8w3T9v4EKY8wsOWIOlBcwGlcDM7A_QQhav52SOegoJ4H3EdJoVak0qAHTq5SiS_MGWosjWJA1hMFNE2QJMgZz7M8xTdFf5ZvTXQ/s1600/IMG_20160818_205838.jpg" imageanchor="1"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRAkjZRMAMfiXfckubHu2NrRhwGkRnQrHd8k1frVuB8w3T9v4EKY8wsOWIOlBcwGlcDM7A_QQhav52SOegoJ4H3EdJoVak0qAHTq5SiS_MGWosjWJA1hMFNE2QJMgZz7M8xTdFf5ZvTXQ/s320/IMG_20160818_205838.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A thin, PCB sandwich.</td><td></td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
</div>
As this bot has no sensors (yet) it has to be manually controlled. After several attempts to squeeze in a USB dongle failed I settled on using a TTL to Bluetooth adaptor (A HC-06 module), soldering it to GPIO pins 15 and 18, the Tx and Rx pins on the Raspberry Pi. This particular TTL module is designed for 3.3V IO operations, so I didn't need to risk driving the pins at 5V, or trying to find space to fit a 5V to 3.3V converter. Using an app called '<a href="https://play.google.com/store/apps/details?id=es.pymasde.blueterm">BlueTerm</a>' I could now connect to the serial console on the Raspberry Pi and send it commands from my phone.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5kRqTExud7fneXPi4jx-bKtgssOEJiq1eQe4ub0Rn2q-dvABvyLpBmlony1Cj4HbXQRPxFTiUnGbOkgCLPgULUlq-nxb4lnLyXAhB-11B7fi0c97KkPEAkzgnl6gMH9SDkHUUnxxcNwk/s1600/BlueTerm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5kRqTExud7fneXPi4jx-bKtgssOEJiq1eQe4ub0Rn2q-dvABvyLpBmlony1Cj4HbXQRPxFTiUnGbOkgCLPgULUlq-nxb4lnLyXAhB-11B7fi0c97KkPEAkzgnl6gMH9SDkHUUnxxcNwk/s320/BlueTerm.png" width="180" /></a></div>
<br />
Hardware is of little use without software to control it. Normally I'd be looking at connecting up a PS3 DualShock controller to drive the bot around, however that isn't quite so easy to set up over a serial link, so it was time to look at a different way to control a bot. A few weeks previous I had taken a look at the <a href="https://gpiozero.readthedocs.io/en/v1.2.0/">GPIO Zero</a> python library and knew it had a variety of helper classes. Taking a look at the currently supported devices I found that it not only had a GPIO based Motor class but a fully implemented Robot class, allowing a 2 motor robot to be up and running in 3 lines of python.<br />
<br />
<div style="background-color: #666666; color: white; font-family: monospace; text-align: left;">
<b>from gpiozero import Robot<br />
r = Robot(left=(23,22), right=(25,24))<br />
r.forward(1)</b></div>
<br />
A couple of tweaks to the connections to make sure the motors were going in the right direction and it was time to fit everything inside the tin. Being a metal tin it was conductive on the inside and, as I didn't want a short, I covered it as best as I could with Kapton tape, adding extra tape to the PiZero itself for extra safety.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPCdU23UFcYLPBUkOriOc4FIe4BnLzYKtP6I2kDTBWu2c5IWoP8Vwl1GvZV_tXRzDWcC19loBz7RaQGxpWhmQyT1pRgHsO90WSqlV-HoeUlacD0q16qMzTMcY0Edvr7RZbFL4CTppCzRc/s1600/IMG_20160818_204206.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPCdU23UFcYLPBUkOriOc4FIe4BnLzYKtP6I2kDTBWu2c5IWoP8Vwl1GvZV_tXRzDWcC19loBz7RaQGxpWhmQyT1pRgHsO90WSqlV-HoeUlacD0q16qMzTMcY0Edvr7RZbFL4CTppCzRc/s200/IMG_20160818_204206.jpg" width="146" /></a>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhomrKyG5Oz82_fb7VQNmODWBuZqZk0gc_ngj38u3DSOOqcN89S2yfC2u6zX6ORe4jtx65aLZUbcnJqgTkYxD276UhXObrKbw2gApJa55HyIDsFFt7OJoZLV-oMAgOmbNizZWcvJrjn3No/s1600/IMG_20160818_204233.jpg" imageanchor="1"><img border="0" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhomrKyG5Oz82_fb7VQNmODWBuZqZk0gc_ngj38u3DSOOqcN89S2yfC2u6zX6ORe4jtx65aLZUbcnJqgTkYxD276UhXObrKbw2gApJa55HyIDsFFt7OJoZLV-oMAgOmbNizZWcvJrjn3No/s200/IMG_20160818_204233.jpg" width="200" /></a>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4qw032DM6w-zmdIfH8ip7gkocBdp_ZpQ9GVuK7_CwchhOYgpRSLy48lUAD4D406LenXLJWVr7vsbxBAHDXVT77OFZ6b5KcqBzw3hoBmheR3wW_jkJbKgnRWWrcZ1C4eQtme2VHZHcCMg/s1600/IMG_20160818_204433.jpg" imageanchor="1"><img border="0" height="123" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4qw032DM6w-zmdIfH8ip7gkocBdp_ZpQ9GVuK7_CwchhOYgpRSLy48lUAD4D406LenXLJWVr7vsbxBAHDXVT77OFZ6b5KcqBzw3hoBmheR3wW_jkJbKgnRWWrcZ1C4eQtme2VHZHcCMg/s200/IMG_20160818_204433.jpg" width="200" /></a>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1BP7o659m4ZqpFcqgym77eBcMV1R9CEx8AaoiR2jZw_jBPjCMTYKVc0rEzuA5QqotVK9Q1zcY4e5It21FwxTUntH0UXCbcc3hRSSdJ4M0T9U9tlReGdwU8_PMg2jFQoZ-nR9yy_8ZYF4/s1600/IMG_20160818_204632.jpg" imageanchor="1"><img border="0" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1BP7o659m4ZqpFcqgym77eBcMV1R9CEx8AaoiR2jZw_jBPjCMTYKVc0rEzuA5QqotVK9Q1zcY4e5It21FwxTUntH0UXCbcc3hRSSdJ4M0T9U9tlReGdwU8_PMg2jFQoZ-nR9yy_8ZYF4/s200/IMG_20160818_204632.jpg" width="200" /></a>
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
With the motors and ball caster glued into place, and the battery held in place with blu-tak, PiZero Bot V2 was almost ready to go. I extended the python code to listen for the WASD keys to drive the robot from my phone and it was off for a test drive.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/3Ops2zvhdac/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/3Ops2zvhdac?feature=player_embedded" width="320"></iframe></div>
<br />
A relatively successful trip, although the battery appeared to be dying towards the end as it was starting to struggle to move. I know the battery wasn't fully charged at the time, so I'll have to test again to see how well it lasts. I do have a larger battery that is around the size of the mint tin, but I was avoiding using it as it adds to the height of the robot, and that somewhat defeated the point of making the smallest robot I can.<br />
<br />
Of course its also a little tricky to control when driving it via key presses alone, but it should be possible to write an Android app, or similar, that can implement an analogue controller that communicates over serial to the Raspberry Pi.<br />
<br />
As ever there is always more to do. I still want to add at least one sensor to this bot, probably a proximity detection one, so it can be left to drive around by itself. However with all the wires stuffed inside it there's not much room to extend it cleanly. I may have to look at designing my own PCB so I can get rid of most of the wires, freeing up some space to connect up a sensor, punching some holes in the front of the tin to allow it to be connected up. But that will have to wait for V3, as I have some other projects that need finishing up first.<br />
<br />
Leo<br />
<br />
<br />Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com4tag:blogger.com,1999:blog-7973550104339721497.post-78300681660451208132016-07-10T16:59:00.000+01:002016-09-11T21:46:05.477+01:00AstroPi 3D Printed Tripod MountSince printing my AstroPi back in March (and then never actually posting pics of it...oops.) I've been thinking of designing a mount that would allow the AstroPi to be held in the air in a similar manner to those up on the ISS. Thinking didn't actually become action until a friend of mine wanted a way to display his AstroPi at the <a href="http://www.recursioncomputerfair.co.uk/">Recursion Computer Science Fair</a> so that visitors could get a close look at it without, presumably, accidentally unplugging or dropping it.<br />
<br />
I dug an old magnifying lamp with spring loaded arm out of the attic, removed the lamp assembly (which was held on by a single bolt) and set out to design a printable part that would hold the AstroPi in place. Of course by design I mean launching Autodesk Fusion 360 and start creating and modifying objects. When this approach didn't work (unsurprisingly) I actually went and sketched out some ideas and started over.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir_a6VJ8WE_lMNPwYkGXv36NYnypSI4MTYXzcY1fz2Tf6ii5slnsX9QHB84wekJIwwOwZPS1yMqcWWJpmsMVXULeWJYF1PtWBSZrTdl8WRd1AvpMYcVeOA8j46iN2tm5zC88vGpYMySdo/s1600/IMG_20160703_143857.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir_a6VJ8WE_lMNPwYkGXv36NYnypSI4MTYXzcY1fz2Tf6ii5slnsX9QHB84wekJIwwOwZPS1yMqcWWJpmsMVXULeWJYF1PtWBSZrTdl8WRd1AvpMYcVeOA8j46iN2tm5zC88vGpYMySdo/s400/IMG_20160703_143857.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The original design.</td></tr>
</tbody></table>
Whilst not going to win any prizes in technical drawing, the sketches were enough for me to better visualise the 3D object, create it in Fusion (Its basically a couple of rectangles with holes) and run off a test print, immediately followed by several more until I got the sizes correct and the mount functional (For example, the hole for the nut was large enough to fit the nut, but too small to fit the socket required to tighten it up). Once I was happy I swapped over to my silver filament, printed out the final version and attached it to the arm.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1nn3NEbNJOHPS4BsyWcny-biyz1ZACJ1NmQS2U_IN2RLxJJEY68LMA1OPSCrzLBkj4Od3YjepEo6_MC13avtYV9J7XU1oqAUpENWOC9Ph-W9kdJBzNFqMANVCOhkKTOa_EDcimoBRPls/s1600/IMG_20160708_191626.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1nn3NEbNJOHPS4BsyWcny-biyz1ZACJ1NmQS2U_IN2RLxJJEY68LMA1OPSCrzLBkj4Od3YjepEo6_MC13avtYV9J7XU1oqAUpENWOC9Ph-W9kdJBzNFqMANVCOhkKTOa_EDcimoBRPls/s320/IMG_20160708_191626.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The AstroPi mounted on the end of the arm.</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4tNVRCXnhfZOTWrFIZ9THarJg_nJBdfaMRBsLMNrLn4Hak16_ISvG9NaEUOLLgRL4RSF2EMAEXcfVLbM8goBOv_XoiIE8bM1trDoK3SJZYq0Lo6OAAsQ5Q7Dm9FANQrQlcwB0zF2gyOY/s1600/IMG_20160708_191833.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4tNVRCXnhfZOTWrFIZ9THarJg_nJBdfaMRBsLMNrLn4Hak16_ISvG9NaEUOLLgRL4RSF2EMAEXcfVLbM8goBOv_XoiIE8bM1trDoK3SJZYq0Lo6OAAsQ5Q7Dm9FANQrQlcwB0zF2gyOY/s320/IMG_20160708_191833.jpg" width="209" /></a></td><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5e5AmiWQHMYfLpjEUlU3v-hIhMZAEeuPOzUypSmseZTBoFx_DoaEqM1gjzhRA3OTon4f4RhLcesKvWoXzV01CifxPHlFDKtZ-a-Kqdu5mt1oNa78f-tx-XN8_7AdYUuVlOk_vTlmzwWE/s1600/IMG_20160708_191819.jpg" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5e5AmiWQHMYfLpjEUlU3v-hIhMZAEeuPOzUypSmseZTBoFx_DoaEqM1gjzhRA3OTon4f4RhLcesKvWoXzV01CifxPHlFDKtZ-a-Kqdu5mt1oNa78f-tx-XN8_7AdYUuVlOk_vTlmzwWE/s320/IMG_20160708_191819.jpg" width="218" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Arm goes up.</td><td class="tr-caption" style="text-align: center;">Arm goes down.</td></tr>
</tbody></table>
With the sprung arm and mount out of the way it was time to tweak the design to make it more generally useful. A fairly common type of mount is the standard camera tripod which, according to the internet, a 1/4" UNC nut would fit so I ordered several from <a href="http://www.ebay.co.uk/itm/260467071167">eBay</a>.<br />
<br />
Whilst waiting for those to arrive I found out Fusion supported creating screw threads as part of the design so I created two variants of the mount. One with a built in thread and one which takes a nut.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiECcohlU1GW-p-YduvbLaiaqPyLiVXgM0rCXpbcWLX4RvmifXbbIstSTVc-Mz81kS8JpoHFT_Jzbd4QWjwWAMSgJF_zgsBWvgFtb0DCzY26vezI_DA_-9CnTghfcRxDkZSy7Gx0_iEIOQ/s1600/IMG_20160707_220234.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiECcohlU1GW-p-YduvbLaiaqPyLiVXgM0rCXpbcWLX4RvmifXbbIstSTVc-Mz81kS8JpoHFT_Jzbd4QWjwWAMSgJF_zgsBWvgFtb0DCzY26vezI_DA_-9CnTghfcRxDkZSy7Gx0_iEIOQ/s320/IMG_20160707_220234.jpg" width="320" /></a></td><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibzWxSm4ZW3Aq2dAPQYNwDR844ZREQu3PRe3lBr5Ws3_T65NXl83YmHtWqGrwV463hfyIs9fDe6qsZLD5m_c5lhqUv9VuyayHFs4-GwzXk8VKie78QWZnqVwlIwhAX6oQiavezdg-Nl4M/s1600/IMG_20160707_220255.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="109" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibzWxSm4ZW3Aq2dAPQYNwDR844ZREQu3PRe3lBr5Ws3_T65NXl83YmHtWqGrwV463hfyIs9fDe6qsZLD5m_c5lhqUv9VuyayHFs4-GwzXk8VKie78QWZnqVwlIwhAX6oQiavezdg-Nl4M/s320/IMG_20160707_220255.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Nut based model on the left, threaded on the right</td><td class="tr-caption" style="text-align: center;">Side view, not all the curves printed cleanly.</td></tr>
</tbody></table>
I printed the 'threaded' variant with a 0.1mm layer height and, whilst a bit tight to screw on the first time, is working surprisingly well. Even after being attached and removed a dozen times it doesn't seem to be wearing out. The 'Nut' variant I printed at a 0.2mm layer height, which seemed to produce better rounded corners, and the nut fits in snugly. Both variants of the mount connect to two corners of the AstroPi itself, using some slightly longer bolts (35mm) to account for the extra thickness added by the arms.<br />
<br />
With the mount attached to the AstroPi it can be connected to, and moved between, any camera tripod or similar that you have available so you can position it on your desk, hanging from a shelf or suspended looking out of a window, just like Izzy is doing on the ISS.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3xRY4v5iwrXvdhusl4v77DopUljdUMPVNATt-cMa8Lutar6IQpSgo9F5ptFiqET26cdOG3zMRfpT9ZV-SGynRIRSf167hBDWzyqfTHucr9M4Iz94MCGhUjLyAti2HjYunofP3iWJkmfI/s1600/IMG_20160707_221636.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3xRY4v5iwrXvdhusl4v77DopUljdUMPVNATt-cMa8Lutar6IQpSgo9F5ptFiqET26cdOG3zMRfpT9ZV-SGynRIRSf167hBDWzyqfTHucr9M4Iz94MCGhUjLyAti2HjYunofP3iWJkmfI/s320/IMG_20160707_221636.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Suspended in the air.</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOFO2DWAJMFehjZgyhrxAaBOsRkQqfrpJe3uDwFrs3ZqJf1EdojIe6WVrNKfL_B2SFD2gtv3noM6xL2TBS99YiIABRN2pNphahABPtl84WPfehznJZIsOuXAtwe5AX47m9nU4Xkilikmc/s1600/IMG_20160707_220928.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOFO2DWAJMFehjZgyhrxAaBOsRkQqfrpJe3uDwFrs3ZqJf1EdojIe6WVrNKfL_B2SFD2gtv3noM6xL2TBS99YiIABRN2pNphahABPtl84WPfehznJZIsOuXAtwe5AX47m9nU4Xkilikmc/s320/IMG_20160707_220928.jpg" width="220" /></a></td><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidr_YqL1T6Vk80zNLS1xv0ioxGH6KU7CHko-FBkMkFzyiEklEjb2Ensg03gYq-UxfjxJLG_oGJ2fPsOZel4G9djVlzZZsjUTbtHnRFR9kJUyCPSogQUWYfL-6kQbF3-bzL1XY1Dt-2TWk/s1600/IMG_20160709_183802.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidr_YqL1T6Vk80zNLS1xv0ioxGH6KU7CHko-FBkMkFzyiEklEjb2Ensg03gYq-UxfjxJLG_oGJ2fPsOZel4G9djVlzZZsjUTbtHnRFR9kJUyCPSogQUWYfL-6kQbF3-bzL1XY1Dt-2TWk/s320/IMG_20160709_183802.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Standing on the desk.</td><td class="tr-caption" style="text-align: center;">Hanging from a shelf bracket.</td></tr>
</tbody></table>
If you want to print out your own AstroPi tripod mounts then I've uploaded the .STL files to <a href="http://www.thingiverse.com/thing:1666712">Thingiverse</a> (<a href="http://www.thingiverse.com/thing:1666712">http://www.thingiverse.com/thing:1666712</a>) where you can download and print them out.<br />
<br />
Happy printing!<br />
<br />
Leo<br />
<br />
<br />
<br />Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com4tag:blogger.com,1999:blog-7973550104339721497.post-36333145010848043442016-05-30T18:47:00.001+01:002016-09-11T21:46:15.474+01:00Controlling a 3D Printer with the new Raspberry Pi Zero 1.3<br />
Last year I entered the world of 3D printing by purchasing a second hand RepRap Mendel Mono from eBay, with the initial aim of using it to print custom parts for my robots. The 3D printer has an Arduino based control board that contains the firmware required to drive the motors, heaters, fans and all the other time critical stuff that allows 3D printing to work, but with no LCD or any input controls a computer is required to tell this control board what to do.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQVMvOqG1yJeR0Ell9RSqRmb4hznYW8t_49kzLB-JCH0uvzge2HswLTFAcw1n3VEMniDXyVdX0NCI3D3nZwD9NjHgQETfSi0BtjNmgip2Ey32Z_yKF2wvuas0EYHAA7zTiQWCfGuFucNA/s1600/IMG_20151028_213312.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQVMvOqG1yJeR0Ell9RSqRmb4hznYW8t_49kzLB-JCH0uvzge2HswLTFAcw1n3VEMniDXyVdX0NCI3D3nZwD9NjHgQETfSi0BtjNmgip2Ey32Z_yKF2wvuas0EYHAA7zTiQWCfGuFucNA/s320/IMG_20151028_213312.jpg" width="320" /></a></div>
<br />
I started off using a laptop to control the printer and then, once I was a bit more comfortable with how everything worked, I switched over to a Raspberry Pi B+, connecting to it via VNC. Eventually I started doing longer prints (i.e. the Astro Pi case) and wanted to be able to monitor the printer remotely, so after some research I switched over to using <a href="http://octoprint.org/">OctoPrint</a>, which allows you to control the 3D printer via a web bowser, and has built in support for recording time lapses of the print itself.<br />
<br />
When the Raspberry Pi Zero was originally released I did consider using one to control the printer, but didn't want to lose the camera support. Roll on six months and a new and improved Raspberry Pi Zero model was released, complete with camera connector, so it was time to give it a go.<br />
<h3>
Software setup</h3>
<div>
When setting up OctoPrint on the Raspberry Pi B+ I made use of the easily downloadable OctoPi SD card image, which meant it only took a few minutes to get everything up and running. However I wasn't sure it would support the latest board revision so instead followed the comprehensive <a href="https://github.com/foosel/OctoPrint/wiki/Setup-on-a-Raspberry-Pi-running-Raspbian">instructions</a> for building and installing OctoPrint, which took a little while on the Raspberry Pi Zero.</div>
<div>
<br /></div>
<div>
With the main OctoPrint software installed I then moved onto setting up mjpg-streamer for performing the video capture. As usual I'd managed to put the camera connector in upside down, despite checking the correct orientation before plugging the cable in, so ended up opening up the case to more easily flip it over.</div>
<h3>
Test Print</h3>
<div>
As the Raspberry Pi Zero only has a single USB port, and I had to connect it to the printer itself whilst simultaneously having a network connection, I needed to make use of a USB Hub. Unfortunately the UUGear <a href="http://www.uugear.com/product/zero4u/">Zero4U</a> I recently purchased doesn't quite fit the new Raspberry Pi Zero board, so I ended up making use of a slightly less compact setup with an external USB Hub.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAOi45zDdXPjMRXXzGTX-Lzb0EQvD37u-1utvIDBQOnsNi6UHREmQHMJhNNrLqgmeFtwdOOni6V2ohxzBvddrQVBOxXOzJwgB2pGxTJ_tvqZNL9StyMxlfKZmIZmeazEBuV3YbUQNCmoM/s1600/IMG_20160522_164730.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAOi45zDdXPjMRXXzGTX-Lzb0EQvD37u-1utvIDBQOnsNi6UHREmQHMJhNNrLqgmeFtwdOOni6V2ohxzBvddrQVBOxXOzJwgB2pGxTJ_tvqZNL9StyMxlfKZmIZmeazEBuV3YbUQNCmoM/s320/IMG_20160522_164730.jpg" width="320" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
With the Raspberry Pi Zero connected to the printer and the camera positioned I started off with a fairly simple test print that only takes 10-15 minutes to complete, just to make sure everything was working as expected. During the print I kept an eye on the CPU load and memory usage of the Raspberry Pi Zero, just to make sure everything was running happily.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/HoEsfVOKovc/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/HoEsfVOKovc?feature=player_embedded" width="320"></iframe></div>
<br /></div>
<h3>
A longer print</h3>
<div>
With the test print out of the way it was time to try something a bit more time consuming, to see if the Raspberry Pi Zero had the staying power to keep on driving the printer. Something I had been meaning to print for a while was a 5 1/4" to 3 1/2" drive bay adaptor. This was something I had originally thought about buying in a shop, but as I looked at the price of it (around £6 to £7) I realised I should be able to print one at home for a fraction of the cost. A bit of hunting around on the internet had come up with a few designs that people had put together, so I selected one and set it off printing.<br />
<br />
Total print time turned out to be just under 4 hours, of which I mostly monitored progress by viewing the video feed from my phone. Whilst the video resolution was the same as I use on the B+, the newer 8MP camera did seem to give a sharper image.<br />
<br />
I did, of course, notice that the corners of the print had lifted at one end, but as the resulting item was going to end up inside a computer case I wasn't worried enough about it to stop the print and re-try. Besides, that edge is always a pain to get levelled!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/cuyqR4mOU7M/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/cuyqR4mOU7M?feature=player_embedded" width="320"></iframe></div>
<br />
With the 4 hours up the print looked good enough, apart from where the corners had lifted of course, and the Raspberry Pi Zero was still running happily (and still is now, several days later). A couple of times the OctoPrint page seemed to stop updating, but a reload got it working again. After removing the print, and detaching the raft that was supposed to help the print stick to the glass, it was time to see how well it worked. Due to the print lifting on one side I did have to slightly extend the screw holes, but my USB3 front panel fitted in nicely and I soon had it mounted in my PC case.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJyOWtv-wWtdlM5emru8NTtUOh5z-rB7vINYONeS7dgQGkXSDYZFdVCc9F-pgdHPRFxgfyCZzmXnH_iGWUYFsc6_5uds0rBS5wfreTBSOCPnMEphZPI184k19Qnwi_GRXpm3MEPqqrWGw/s1600/IMG_20160523_220306.jpg" imageanchor="1" style="margin-left: 1em;"><img border="0" height="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJyOWtv-wWtdlM5emru8NTtUOh5z-rB7vINYONeS7dgQGkXSDYZFdVCc9F-pgdHPRFxgfyCZzmXnH_iGWUYFsc6_5uds0rBS5wfreTBSOCPnMEphZPI184k19Qnwi_GRXpm3MEPqqrWGw/s200/IMG_20160523_220306.jpg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi16AMmIickRKNavQEAqOvJFZrsY86yXQd6sSpKurLGelrhn4e2XLPXtKC3ItYzlsZNbtm1nFPvL8RdGqlPz3pJRZYJgY7yIjW246wYZdLsDRCrCOGUH7XWvx8sti6-JmFYLViXf6pWzds/s1600/IMG_20160523_220333.jpg" imageanchor="1"><img border="0" height="96" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi16AMmIickRKNavQEAqOvJFZrsY86yXQd6sSpKurLGelrhn4e2XLPXtKC3ItYzlsZNbtm1nFPvL8RdGqlPz3pJRZYJgY7yIjW246wYZdLsDRCrCOGUH7XWvx8sti6-JmFYLViXf6pWzds/s200/IMG_20160523_220333.jpg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy5KwfJScyv-FRVBvneMc9BAS0ZGPjKlLaC4eHsMzXH-zSKlg4ePYoe8bINFI2UtjqB-KMiTMdBwfk8OKr0AWiW6tgEO630qkoV4u2aHdzY0rC3LKJ1xp9wxjHlGxZiiJlL8Pk5wLExBY/s1600/IMG_20160523_220947.jpg" imageanchor="1"><img border="0" height="83" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy5KwfJScyv-FRVBvneMc9BAS0ZGPjKlLaC4eHsMzXH-zSKlg4ePYoe8bINFI2UtjqB-KMiTMdBwfk8OKr0AWiW6tgEO630qkoV4u2aHdzY0rC3LKJ1xp9wxjHlGxZiiJlL8Pk5wLExBY/s200/IMG_20160523_220947.jpg" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyxWK5ncTM30322QeA9Lq7PK2lENZhVVLaus3P0StBgdUSqimLP5C0JSMPyXxi-45O7Hy3EMos-iZCcwJIlKmIf_2WNIrPzduOt1GTqodxUpErTri89TxyuhbvpNyTtS-PtfRtcbMz7Ms/s1600/IMG_20160526_195620.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="131" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyxWK5ncTM30322QeA9Lq7PK2lENZhVVLaus3P0StBgdUSqimLP5C0JSMPyXxi-45O7Hy3EMos-iZCcwJIlKmIf_2WNIrPzduOt1GTqodxUpErTri89TxyuhbvpNyTtS-PtfRtcbMz7Ms/s400/IMG_20160526_195620.jpg" width="400" /></a></div>
<h3>
Conclusion</h3>
</div>
<div>
Based on this quick test am I going to switch over to controlling my 3D printer using a Raspberry Pi Zero? Probably, yes.. at least when I manage to get ahold of more than one of the newer boards!<br />
<br />
Not because of the price, after all I already have the B+, but more because it will allow me to create a more compact setup. I'll need to do something about requiring the external USB hub first, either getting a newer Zero4U that's been updated to work with the revision 1.3 board, wiring the Raspberry Pi's serial port directly to the printer, or by connecting up the networking differently e.g. by using the <a href="https://www.kickstarter.com/projects/1991736672/iot-hat-for-raspberry-pi-a-must-have-for-pi-zero">IoT HAT</a> that I backed recently.</div>
<div>
<br /></div>
<div>
But for now I'll be switching back to the B+, as I have other uses for my singular Raspberry Pi Zero 1.3 board!<br />
<br />
Leo<br />
<br /></div>
<div>
<br /></div>
Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-75536111919609423112016-05-01T12:16:00.001+01:002016-09-11T21:46:38.276+01:00Two weeks with the Oculus Rift - Part TwoThis is the second half of my ramblings about the Oculus Rift, so if you've not read part one yet you may want to go check it out first before continuing on here.<br />
<br />
After having played Lucky's Tale I thought I'd carry on taking things slowly before diving into the other launch title EVE: Valkyrie, just to make sure I was used to the headset before exposing myself to a high speed, high action style game.<br />
<br />
So next up was 'Henry', a short animated movie from Oculus Story Studio that places you in Henry's front room, allowing you look all around and watch the story unfold. Henry isn't just an animated movie recorded with a '360' view, but its a proper 3D environment, allowing you to look over, under and behind the various objects in the room and generally gives you a much better impression of being there.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAJvgTqGzqSC_WcTSZ-84ZRYxFv3mFaz6QzwwYLcploQknn5vspNa7FJf6pzDRa7mRmpYMBysaddt4G2ZIDZxgHtHUjsE-_heHXd_SGYhTh6pH9D21W7VI3uq0tG9w6EaO6f09Khepi6k/s1600/Henry1.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAJvgTqGzqSC_WcTSZ-84ZRYxFv3mFaz6QzwwYLcploQknn5vspNa7FJf6pzDRa7mRmpYMBysaddt4G2ZIDZxgHtHUjsE-_heHXd_SGYhTh6pH9D21W7VI3uq0tG9w6EaO6f09Khepi6k/s200/Henry1.jpg" width="173" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt3CfQO_rk9hRlLES9ud2D8xM3sDAvJGvEzx3UIbWvYIXwF4-3nOCHdEJDYvyFj8tYzmAG3Q_9MUkKNgunm8iKZ6-JJEF-UPUiqr5bDN-c00HXAaBRkz_y3jlFX8CaUY8w13UYlG9b5Js/s1600/Henry2.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt3CfQO_rk9hRlLES9ud2D8xM3sDAvJGvEzx3UIbWvYIXwF4-3nOCHdEJDYvyFj8tYzmAG3Q_9MUkKNgunm8iKZ6-JJEF-UPUiqr5bDN-c00HXAaBRkz_y3jlFX8CaUY8w13UYlG9b5Js/s200/Henry2.jpg" width="173" /></a><br />
<br />
The instructions suggest the best viewing position is sitting down, however in my setup that would leave me sat on the floor in front of my desk, leaving the sensor partially obscured. In theory if I had a bigger room I could set the sensor up to allow this, but for now I just watched the movie standing up (luckily its not too long!).<br />
<br />
This was also the first title where I noticed the 'len flare/god rays' that have previously been mentioned. The movie itself wasn't a problem, but it was really obvious on the opening and ending titles.<br />
<br />
There are a couple of other animations in the store, although these are much shorter, with the ones I watched next being INVASION!, Lost and COLOSSE. These follow a similar format where you are fixed in place, looking around as the scene unfolds. In INVASION! you have a clear view to the mountains and, if you look down, a fluffy bunny body. Lost has you in a forest where you can lean your body to look between the trees and has a 'The Iron Giant' kinda vibe to it, something that could possibly be included as a DVD/Blu-ray bonus feature.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4w3JusJ7PBGfCjWSCjAlyKKdWxlLvJudlj6vFZp9iLjw8_AVuYXcC7hhpbr1JWGsOq2NZ9HBsnFILqk4v2fLY2iVXc-EPvM_6UVRvLLkXKw2tfpEmKayqRxCDjJ4SNRPysue_83h4IiA/s1600/Invasion2.jpg" imageanchor="1"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimFBaebT-E36bjL5IYPtpg8dyX2QlTRqfeD2DneGTRqUYZtZhhgUJ0kVLLUyeUKH3yLSK1mDZ-e4cPUpfJaSJQYRpmmtyj3pxAZP4VV-Da5sq6j4FwA92J_EPlH72YTnDzt-vm4UbJJNU/s1600/Invasion1.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimFBaebT-E36bjL5IYPtpg8dyX2QlTRqfeD2DneGTRqUYZtZhhgUJ0kVLLUyeUKH3yLSK1mDZ-e4cPUpfJaSJQYRpmmtyj3pxAZP4VV-Da5sq6j4FwA92J_EPlH72YTnDzt-vm4UbJJNU/s200/Invasion1.jpg" width="177" /></a><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4w3JusJ7PBGfCjWSCjAlyKKdWxlLvJudlj6vFZp9iLjw8_AVuYXcC7hhpbr1JWGsOq2NZ9HBsnFILqk4v2fLY2iVXc-EPvM_6UVRvLLkXKw2tfpEmKayqRxCDjJ4SNRPysue_83h4IiA/s200/Invasion2.jpg" width="176" /><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7liYSKQcN9ieY2tZMQ58OePPQXiKemTRzLVqv7l1ENC4R1ouXluLsPrDg26ANlLAHWED979vdVVobAqWgay89aTCuq2UHLgqKIk0N2R7pUf1jzPTpi7lEOxOO4j5RVAGZwWc0WPAwn40/s1600/Lost1.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7liYSKQcN9ieY2tZMQ58OePPQXiKemTRzLVqv7l1ENC4R1ouXluLsPrDg26ANlLAHWED979vdVVobAqWgay89aTCuq2UHLgqKIk0N2R7pUf1jzPTpi7lEOxOO4j5RVAGZwWc0WPAwn40/s200/Lost1.jpg" width="173" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5oQZFifq-8P7kLie06f5otzSmDA1YgGi6B8LicAni8ckdWHraFdfQMiBm0Yxty2KuEhYi9E35EtmZA8hLfVWOl4ztJXa3G-8BTqDVqOgRON7fkpdm5ptV2_X9ABjP5nPQjsHmSim04aU/s1600/Lost2.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5oQZFifq-8P7kLie06f5otzSmDA1YgGi6B8LicAni8ckdWHraFdfQMiBm0Yxty2KuEhYi9E35EtmZA8hLfVWOl4ztJXa3G-8BTqDVqOgRON7fkpdm5ptV2_X9ABjP5nPQjsHmSim04aU/s200/Lost2.jpg" width="172" /></a><br />
<br />
COLOSSE is slightly different in that you get transported during the story to a couple of different locations, with the final scene encouraging you to look around in all directions. Whilst these shorts are fun enough to watch once, I'm not sure I'll go back to rewatch them (other than to show off to friends/family) and trying to do a full 1 to 2 hour long movie in this format may be a stretch, but we shall have to wait and see what people come up with on that one.<br />
<br />
But are all these movie-like experiences static? Well no, there's the 'The Body VR' which takes you on a journey through the human body, with you sitting in a little pod that takes you from place to place. This generally works quite well, with a narrator describing what you are seeing (Instead of having to try and read text) with the pod moving slowly enough that there's plenty of time to look around and is unlikely to cause any nausea. Apart from, that is, 2 or 3 times when the 'pod' suddenly 'jumps' 90 degrees, which can leave you a little disoriented, especially if you were already looking in that direction.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgADG5ZH_Y0pR_edwxHFxUduww95Gy-YEVoOqbYcq4vSVyqovmkYGBSew2jUJZbRWslUieyTYPPknvO2AUj3q-Bl1vNXGpJFn0jy2XVgtzG1lYtHIsWAl4IpBYZf4NHbWXA8lSuOGWuOGg/s1600/Body1.jpg" imageanchor="1"><img border="0" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgADG5ZH_Y0pR_edwxHFxUduww95Gy-YEVoOqbYcq4vSVyqovmkYGBSew2jUJZbRWslUieyTYPPknvO2AUj3q-Bl1vNXGpJFn0jy2XVgtzG1lYtHIsWAl4IpBYZf4NHbWXA8lSuOGWuOGg/s200/Body1.jpg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivKSd1TEWKlQumCM9x1hyphenhyphenUgchyphenhyphenuRuF7kBP-O01BfJcQhmoln32buJiwRWwbwKZOoam_Nuy_-c85werzg6VT80EWFftONB_o-1VXWarN0KSxIsglIk2ai3wB3_MTtUJ6R-WxmlUktydH8w/s1600/Body2.jpg" imageanchor="1"><img border="0" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivKSd1TEWKlQumCM9x1hyphenhyphenUgchyphenhyphenuRuF7kBP-O01BfJcQhmoln32buJiwRWwbwKZOoam_Nuy_-c85werzg6VT80EWFftONB_o-1VXWarN0KSxIsglIk2ai3wB3_MTtUJ6R-WxmlUktydH8w/s200/Body2.jpg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwMoMbuj7G1aCHs-4fks7ktI_rb-BDfbeXrWJk_VYdujuaPbNpwzf-YxowaFdr6kOJpBamWmhSW2PA7B9IHhgTT5YAfpym3RS8-wBhKsxZfYrjJkkBbnDxnwlaxa5E_ZOSvhxJPn_Bc-E/s1600/Body3.jpg" imageanchor="1"><img border="0" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwMoMbuj7G1aCHs-4fks7ktI_rb-BDfbeXrWJk_VYdujuaPbNpwzf-YxowaFdr6kOJpBamWmhSW2PA7B9IHhgTT5YAfpym3RS8-wBhKsxZfYrjJkkBbnDxnwlaxa5E_ZOSvhxJPn_Bc-E/s200/Body3.jpg" width="200" /></a><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgADG5ZH_Y0pR_edwxHFxUduww95Gy-YEVoOqbYcq4vSVyqovmkYGBSew2jUJZbRWslUieyTYPPknvO2AUj3q-Bl1vNXGpJFn0jy2XVgtzG1lYtHIsWAl4IpBYZf4NHbWXA8lSuOGWuOGg/s1600/Body1.jpg" imageanchor="1"><br /></a>
Other media content that can be found on the Oculus Home store are the 360 pictures and videos. The pictures were fun, able to bounce around the world looking at the various landmarks, a considerable improvement compared to 'drag scrolling' the view in a web browser, or looking at it on a small mobile. I was also able to view a 360 photo I had taken the previous weekend and that looked nice (apart from the bits where it overlaps.. need to practise taking those more!).<br />
<br />
The 360 videos were a bit of a disappointment, frequently buffering and when they do start playing they are often so compressed looking that its almost not worth watching them. Reminding me of the days where I would try and find the smallest video files to download over my modem, so it wouldn't take hours to arrive. The best 360 video in the list was the Virgin Media advert! Possibly due to it being streamed from the UK.<br />
<br />
I had much better luck watching 360 videos from YouTube using Virtual Desktop, where it would download the entire high quality video before starting to play it back, often a bit of a wait but a much nicer experience overall.<br />
<br />
But enough with the media playback... back to the games!<br />
<br />
Farlands is a colourful, planet exploration game, where you analysis and photo the alien creatures to learn more about them, with your discoveries allowing you to unlock more items to use, and more areas to explore. Its a fun little diversion that seems to be designed for short, but daily visits, which as there is only so much to do each time works out fine.<br />
<br />
Movement is handled by instantly teleporting to your destination, so you move around the area in short jumps. The system allows you to select what direction you're facing after the teleport, which means you don't have to keep turning around to see everything (Which would lead to cable tangle).<br />
<br />
There's also a map of each area where your view pulls back, allowing you to see the entire area, in a sort of tilt-shift miniature world kinda way, and you can watch the aliens moving around before teleporting back to the area, or up to your ship.<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh185G4KFrIwJvRic9ccE3eeUSmYpo2aZElep7hF9Nsk2cfYd7ob-Rvj_ZPRaTnT1kBarH16MzvAR9HuzrQLTePkPOJGsb-LpXk-ZrxuMUtvzMaCU1k2ef7koLVDglB3Cid7bLxg2bXTRw/s1600/Farlands1.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh185G4KFrIwJvRic9ccE3eeUSmYpo2aZElep7hF9Nsk2cfYd7ob-Rvj_ZPRaTnT1kBarH16MzvAR9HuzrQLTePkPOJGsb-LpXk-ZrxuMUtvzMaCU1k2ef7koLVDglB3Cid7bLxg2bXTRw/s200/Farlands1.jpg" width="199" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX8-Kj-AkLaTOgE6YRUya1oMLjjRmhSadqDwYLJ98p0iwVR0hXjEiQM9K9fZvp3H-IfDRYz8E78r2FsW1PuiYYjiVuCbO62Ay09RPYP5VURDQ3RLKgwBkbD1Qn-2HLPZH8HP2vd4btTYo/s1600/FarLands3.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX8-Kj-AkLaTOgE6YRUya1oMLjjRmhSadqDwYLJ98p0iwVR0hXjEiQM9K9fZvp3H-IfDRYz8E78r2FsW1PuiYYjiVuCbO62Ay09RPYP5VURDQ3RLKgwBkbD1Qn-2HLPZH8HP2vd4btTYo/s200/FarLands3.jpg" width="199" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6VbWplY9BmTydrpTb8Re9xjGVwClnZAMIC47fQ2h-QSB8RWxO7tqLmYcvuUZ8thXhc_MazXav3cd_8LK8cjJ6AysFKrr-Mp5ZryXfpU1M0H_VwsthCCvyIeFClp1pzu96lRWnBZFR7O4/s1600/Farlands2.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6VbWplY9BmTydrpTb8Re9xjGVwClnZAMIC47fQ2h-QSB8RWxO7tqLmYcvuUZ8thXhc_MazXav3cd_8LK8cjJ6AysFKrr-Mp5ZryXfpU1M0H_VwsthCCvyIeFClp1pzu96lRWnBZFR7O4/s200/Farlands2.jpg" width="193" /></a><br />
<br />
The final game I played in this two week period was EVE: Valkyrie, I'd left it until last because I wanted to make sure I was comfortable enough in VR before trying anything too hectic, which flying around in a space ship that can go in any direction certainly is!<br />
<br />
EVE: Valkyrie is basically dog-fighting in space, two teams battling to win each round. Either in a straight forwards team deathmatch, or trying to capture various points in the map. Whilst you can, in theory, dive straight in, I elected to go through the tutorial and training first to get a feel of the ship, and used to playing this in VR.<br />
<br />
Traditionally in flight sims I either look around by using the 8 way hat, or by toggling into a look mode and using the mouse to change the view. With the Rift its much more natural, giving you the freedom to look in any direction without needing to think about what you are doing, what button to press and how many times to press it.<br />
<br />
After taking a good look around my ship it was time to actually take control. Moving up and down and side to side was fine, then I tried rolling the ship... Now whilst it didn't make me feel nauseas, my stomach was certainly a little uncomfortable with the manoeuvre as my brain was expecting to feel some sort of movement. I persevered and carried on with the tutorial, performing a few more rolls, trying to get used to it a bit more.<br />
<br />
In my younger years I was lucky enough to fly a few light aircraft and I would have to say that this is nothing like that! Its missing the noise, vibration, smell of the engine or any of the g-force that you feel doing similar manoeuvres.. Its a bit closer to gliding, with the lack of engine noise, and if you pretend you're in your favourite sci-fi program that has inertial dampers, null gravity fields or similar then all is good!<br />
<br />
Weapon wise the ship I flew has a front facing cannon and a head tracking homing missile. With that you just have to look at an enemy ship, wait for it to lock on, and launch the missiles. Which enables you to fire missiles at one ship, whilst shooting the cannons at another one (In theory anyway!). There's also an ECM (Which really looks like a flak cannon) for stopping enemy missiles, as well as drones that can be deployed.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb_h-GbieP3_oW2EN3XaJKEI_zKGspb5leF2x0eEpqHYGoE2ZAZ3kbBlhjwVWGSJAuogfdiRNRbpEsbLE365eSQszyrfmVQLSd1rmR6vurNorjXAmuGZRP6Xm-ejCcwU4V1Vcp_kh4OK0/s1600/eve3.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb_h-GbieP3_oW2EN3XaJKEI_zKGspb5leF2x0eEpqHYGoE2ZAZ3kbBlhjwVWGSJAuogfdiRNRbpEsbLE365eSQszyrfmVQLSd1rmR6vurNorjXAmuGZRP6Xm-ejCcwU4V1Vcp_kh4OK0/s200/eve3.jpg" width="157" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1RsFLGnTuAP5aVX98P6dSxrWc7E8XbzG_PTUPmgCoXPOmVTISjV88p-sFsC0VorLiqJ2AaAuAU5lmXBMRHJr81vu-Z32-kNjUMD4NNhj_IZmY3scDFoLuYR6ZHCkmX_CzQaYa11JN0ks/s1600/EVE1.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1RsFLGnTuAP5aVX98P6dSxrWc7E8XbzG_PTUPmgCoXPOmVTISjV88p-sFsC0VorLiqJ2AaAuAU5lmXBMRHJr81vu-Z32-kNjUMD4NNhj_IZmY3scDFoLuYR6ZHCkmX_CzQaYa11JN0ks/s200/EVE1.jpg" width="157" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7S6K14cVIHQANKJrYy7iywfHxx6AXhyIUfakT6HgKkmSkNnzFZmVXkecE5sRW0xA5ZL59W1KR_04MN9TymOIBdcGCDdnqzUGyR85YT2PgeGqdeG5lacnwdJDMnarKQabqGcS79JOvJyU/s1600/Eve2.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7S6K14cVIHQANKJrYy7iywfHxx6AXhyIUfakT6HgKkmSkNnzFZmVXkecE5sRW0xA5ZL59W1KR_04MN9TymOIBdcGCDdnqzUGyR85YT2PgeGqdeG5lacnwdJDMnarKQabqGcS79JOvJyU/s200/Eve2.jpg" width="157" /></a><br />
<br />
With the tutorial out of the way it was on to an actual match and once I was out in space and getting involved in the action I stopped noticing the mild discomfort when I rolled the ship, and after a match or two it went away. The matches tend to be quick and hectic, with me looking around in all directions trying to keep track of the enemy craft. I played the first few rounds with the XBox controller, before switching over to a joystick and throttle, finding that easier to use when turning, rolling, launching missiles and firing the cannon all at the same time.<br />
<br />
The different levels have various ships/asteroids that you can fly around and through, giving lots of opportunities for sneak attacks, or just running and hiding when your shields are low. Team deathmatch is fairly simple, you're just trying to destroy the enemy ships before they destroy you. The 'capture the flag' style mode has three points around the map that you need to deploy drones nearby to 'capture' them, which you then have to protect, whilst also working to destroy the enemies drones to make it easier to capture the other points.<br />
<br />
All in all a fun, fast action packed game, that I will be playing more of if I ever mange to finish writing this post! And as promised in my last posting, here is a short video of myself playing EVE: Valkyrie to give you a better idea of how it works, and how easy it is to look around, following the enemy ships in even the most hectic of moments.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/yhsQLQO934w/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/yhsQLQO934w?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
Now if you'll excuse me I have more ships to go hunt down!<br />
<br />
Leo<br />
<br />Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-43582106582316244622016-04-19T22:46:00.000+01:002016-09-11T21:46:45.554+01:00Two weeks with the Oculus Rift - Part OneBack in August 2012 a friend pointed me towards a web site called 'KickStarter' and a project called 'Oculus Rift: Step Into the Game' which was looking for $250,000 in backing so that they could build some prototype virtual reality headsets. I remembered the VR headsets/games from the 80s and 90s, although I never did get a chance to try them out, and after reading up on the current state of play decided to back the project a day or two before it finished.<br />
<br />
The project finished at the end of August with 9522 backers, who together pledged a total of $2,437,429 almost 10 times the original target! With the project completed the waiting started. I knew the kits would need to be ordered and assembled so wasn't expecting to see anything soon, not to mention I was towards the back of the queue.<br />
<br />
The December delivery target came and went (to no great surprise), things got delayed more over Chinese New Year and then finally in late May my Developer Kit arrived, the DK1.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSIxEUJrBJWYyLUqlQcwt_gsFS5Fw2oSkAFJR_VHHc8lh3tpBRC5WRYjd-AU5lcEvHs6TadjrRUzKcnNVe_eZKIJ1sL9ZnqckGXLHNL3NE2QNXyPB9LG9IiDPPg4o-uQV2GvN5qmLn_eA/s1600/DK1-1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSIxEUJrBJWYyLUqlQcwt_gsFS5Fw2oSkAFJR_VHHc8lh3tpBRC5WRYjd-AU5lcEvHs6TadjrRUzKcnNVe_eZKIJ1sL9ZnqckGXLHNL3NE2QNXyPB9LG9IiDPPg4o-uQV2GvN5qmLn_eA/s200/DK1-1.jpg" width="150" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPMsLM0WeJzwKH_X6f5S4txpjuvnAuQJUt3_8Lofmk6wyuxAlN4VYCECSVpY-BUBOxa-SlmEeO4qfgjtMUYqOXcHHbJxe53aLU0g2dtxp8S5IQioqIAZU7yQxmnGJIp-lDYVBht-HTN2k/s1600/DK1-3.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPMsLM0WeJzwKH_X6f5S4txpjuvnAuQJUt3_8Lofmk6wyuxAlN4VYCECSVpY-BUBOxa-SlmEeO4qfgjtMUYqOXcHHbJxe53aLU0g2dtxp8S5IQioqIAZU7yQxmnGJIp-lDYVBht-HTN2k/s200/DK1-3.jpg" width="150" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUCFlhec8kGSNf7IS4nO5OnjUbhp-QCdUFdJG2F2PVLZP2OaymYkXw1aw8GNm1FsuMSgqxbT8bdIoHobdAq_tAOopB37_0NKKaHUk82jyZmMm27PCLl8ck9Ay_HK7JO6BWzUhFKpXnmgY/s1600/DK1-2.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUCFlhec8kGSNf7IS4nO5OnjUbhp-QCdUFdJG2F2PVLZP2OaymYkXw1aw8GNm1FsuMSgqxbT8bdIoHobdAq_tAOopB37_0NKKaHUk82jyZmMm27PCLl8ck9Ay_HK7JO6BWzUhFKpXnmgY/s200/DK1-2.jpg" width="150" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Its was a little bulky, had lots of cables, but I set it up, plugged it in and tried out the Tuscany Demo, Epic Citadel village (plus roller coaster) and even played some Half Life 2. It was low-res, had limited tracking (you couldn't lean through a window for example), quite bulky, had a very obvious screen door effect and you had to jump through hoops to get anything to work (Changing resolutions, moving the output window to the correct screen etc.).</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Whilst I had a few ideas I never really got far into the actual development side of things, so when the DK2 was released I decided to skip it, although I did get to try one out, and my DK1 started to gather dust as it got harder and harder to get up and running as people were moving over to the newer hardware.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Moving ahead a few more years and the release date of the first commercial version (CV1) was announced and, much to my surprise, Oculus announced that everyone who backed the original DK1 would be receiving a free KickStarter edition of the CV1. The release date came and waiting began anew. This time, instead of a 9 month wait, my CV1 turned up at my house a week after the release date. Of course I was already at work when it arrived, so it was a few more hours until I got to play with it.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The packaging looked sleek and professional, opening up to reveal the CV1 headset itself, sensor and remote. With those removed the case opens up further to reveal the XBox One controller, batteries, cleaning cloth and a few stickers. The CV1 looked compact and felt nice and solid, a far cry from the chunky DK1 with its wide front and thick straps.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM-NBdekVSanzvgAQdeSYlgzHXNMQbeQ624qvzTG6yvemFrjL0ZnNxJMypAMae2Il0tnNlw-qYF3e9PabE48_VPlSg0Skz34k9KZMmWKn6rwf8_Vkf-_xIH5HMYjcxxXitMOAs38mgqbA/s1600/IMG_20160405_184336.jpg" imageanchor="1" style="float: left;"><img border="0" height="147" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM-NBdekVSanzvgAQdeSYlgzHXNMQbeQ624qvzTG6yvemFrjL0ZnNxJMypAMae2Il0tnNlw-qYF3e9PabE48_VPlSg0Skz34k9KZMmWKn6rwf8_Vkf-_xIH5HMYjcxxXitMOAs38mgqbA/s200/IMG_20160405_184336.jpg" width="200" /></a>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdSGZ8XUMCRbIZ1syQEOGOrCAeKgWaYkHLdSK_EpC5uUz-88zGRstcxFvfkmMYiqpyLjURUOwLTvhcu9Fut68M2NGRtb5jcbMtmupYHeOemtmmlb9X8WtakffeIU71jYrJjRyt6EGp6TM/s1600/IMG_20160405_184359.jpg" imageanchor="1" style="float: left;"><img border="0" height="147" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdSGZ8XUMCRbIZ1syQEOGOrCAeKgWaYkHLdSK_EpC5uUz-88zGRstcxFvfkmMYiqpyLjURUOwLTvhcu9Fut68M2NGRtb5jcbMtmupYHeOemtmmlb9X8WtakffeIU71jYrJjRyt6EGp6TM/s200/IMG_20160405_184359.jpg" width="200" /></a>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwCuiZGUPfR7Kz2Fl8PRT_iKpgxZrbGCqx-y0AQJCUnuraCThYrpPzHcoGviCqYcQ_ZMbRUr47MAbLsdHTaAsTBKahk25De6WNoSUvGIgz7Wmf48rZL0n_EqK5hU0VO36T6vo1OUz7AFw/s1600/IMG_20160405_184508.jpg" imageanchor="1" style="float: left;"><img border="0" height="147" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwCuiZGUPfR7Kz2Fl8PRT_iKpgxZrbGCqx-y0AQJCUnuraCThYrpPzHcoGviCqYcQ_ZMbRUr47MAbLsdHTaAsTBKahk25De6WNoSUvGIgz7Wmf48rZL0n_EqK5hU0VO36T6vo1OUz7AFw/s200/IMG_20160405_184508.jpg" width="200" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv_dzRqSIC8T0M1KH_wOGd3A3wNHdSWJizz0sWJ_ozjYLX_gYLbFmFV74aYGfs2p3RobHhWDcfDeGC_MgghDUXk_OIqq1FKAWgsEWKNN6e6PlPVQhGOUzyTBt8quRHm8QIOw92W3wbVCQ/s1600/IMG_20160405_184616.jpg" imageanchor="1" style="float: left;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv_dzRqSIC8T0M1KH_wOGd3A3wNHdSWJizz0sWJ_ozjYLX_gYLbFmFV74aYGfs2p3RobHhWDcfDeGC_MgghDUXk_OIqq1FKAWgsEWKNN6e6PlPVQhGOUzyTBt8quRHm8QIOw92W3wbVCQ/s200/IMG_20160405_184616.jpg" width="147" /></a>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjscvA4fsqxx5_P8YOZvd3V-qC3nswZCQqUDfsgqZcI9jyWAjWVTae8-0sfl-UYDj58pP7V7k-EwFZb7BjsxAzj96WBCAqUfUfg5yf64Ot9NezLpBVA-0iqaB2XHbJGug8P3BO2QDQ8XAQ/s1600/IMG_20160405_184717.jpg" imageanchor="1" style="float: left;"><img border="0" height="147" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjscvA4fsqxx5_P8YOZvd3V-qC3nswZCQqUDfsgqZcI9jyWAjWVTae8-0sfl-UYDj58pP7V7k-EwFZb7BjsxAzj96WBCAqUfUfg5yf64Ot9NezLpBVA-0iqaB2XHbJGug8P3BO2QDQ8XAQ/s200/IMG_20160405_184717.jpg" width="200" /></a>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcbMIQM_G6SdHGdxGzPMiIAo9pLwMZIujwAbP1P_a4sCrqPDgbkRGURrYoV1LKse40hbKpPApCxFQapHf-gRVyfbzyNKfeCUjYh-XL9fA50Rw4Zs_kAxKNxGStmi45TAzjI2xgz0s6PBg/s1600/IMG_20160405_185743.jpg" imageanchor="1" style="float: left;"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcbMIQM_G6SdHGdxGzPMiIAo9pLwMZIujwAbP1P_a4sCrqPDgbkRGURrYoV1LKse40hbKpPApCxFQapHf-gRVyfbzyNKfeCUjYh-XL9fA50Rw4Zs_kAxKNxGStmi45TAzjI2xgz0s6PBg/s200/IMG_20160405_185743.jpg" width="200" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOut68dbRGFDH-BL8zlPUXvsGzIFK6_QhOR_Y_sr7fSJSOG64607rwCYetdK_6LIHiEcGKc-gVadf063FVaKw1EX8j_Xm7Ldopb8wh-Ww1_SHcpyIysSqHqmvq74rYsQp6mDKdny-GrVc/s1600/IMG_20160405_185810.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOut68dbRGFDH-BL8zlPUXvsGzIFK6_QhOR_Y_sr7fSJSOG64607rwCYetdK_6LIHiEcGKc-gVadf063FVaKw1EX8j_Xm7Ldopb8wh-Ww1_SHcpyIysSqHqmvq74rYsQp6mDKdny-GrVc/s320/IMG_20160405_185810.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The setup/installation process was much more slick than with the DK1, with a mixture of text, images and short videos to show you how to connect up the Rift (plus accessories) and confirmation that everything was successfully detected. I did run into one issue during the installation process, that being my USB 3 expansion card not being supported. Hoping I wouldn't have to wait for a new card to arrive I plugged the Rift and sensor into USB 2 ports instead and was happy to see that they were successfully detected, albeit with a warning stating the sensor may not work as well as it could.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
With the software and hardware installed it was time to put on the headset and finish the setup process in VR!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now the first thing I noticed was that the CV1 is much easier to put on compared to the DK1, although the headphones did catch on my ears slightly (They wouldn't stay in the 'lifted' position). The back rest pulling out on springed rails to let it slip easier over you head, and then tightening to hold it in place. Meaning once you had adjust the velcro straps, you don't need to touch them again.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
With the headset on, and the displays active, I immediately spotted an improvement over the DK1. Yes, I could actually read text! Obviously the text size for the installation process is optimised for the headset itself, but even with the official demos for the DK1 text was hard to read, being blurry and fuzzy. Graphic quality and resolution was also obviously improved, with the screen door effect barely being noticeable.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Returning briefly to the headphones I mentioned earlier. Its so much easier to have these built in and not having to fumble around trying to find your headphones and putting them on over the CV1(along with the inevitable cable tangle), but if you prefer your own headphones the built in ones are removable. So far I haven't felt the need.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Setup continues in VR, asking you to stand up in your area so it can get the sensor correctly positioned, the actual sensor itself is represented in VR, however it didn't seem to be as accurate as some of the Vive footage I've seen (when reaching out to adjust it I'd miss slightly).</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Once all the hardware is correctly configured the installation process moves on to the Oculus Dreamdeck demos (Note: The version you download from the store has a few extras demos in it that are worth a look, especially the submarine and paper town) taking you to a cartoon campfire, standing at the top of a tall building (making me think of the various Batman Arkham games), a short visit to an alien planet and a close encounter with a dinosaur (appropriately enough at the Hammond museum). Each one giving you a short time to look around before moving on.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAbgSELJ6rk7lS8rz5D-hqPXvd0kNyBJUZVeCGM7jGGZdlVVNkoRGgr1xolxelE32P-dIQC_rzlM0QaSTXsMnBFQCbIOg1v3FJOXzoh_ijsgDC9CFYzgtH80-1rsVhDxB8X9vYfdr-9gY/s1600/DreamDeck1.jpg" imageanchor="1"></a><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAbgSELJ6rk7lS8rz5D-hqPXvd0kNyBJUZVeCGM7jGGZdlVVNkoRGgr1xolxelE32P-dIQC_rzlM0QaSTXsMnBFQCbIOg1v3FJOXzoh_ijsgDC9CFYzgtH80-1rsVhDxB8X9vYfdr-9gY/s320/DreamDeck1.jpg" width="320" /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_o3IFS6tUvwHDeL5JOQKc5NYx19Koh31h7aVgmRs6I_lGVTFmtNTIxQYWPL828yzB5jmelKGsXKTOnjs9QwFwRKqzxmit99ck68-i_-zAYuHY31OdNFOJ4wmkEh2Htq5tbP2qaRnfTpk/s1600/DreamDeck2.jpg" imageanchor="1"><img border="0" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_o3IFS6tUvwHDeL5JOQKc5NYx19Koh31h7aVgmRs6I_lGVTFmtNTIxQYWPL828yzB5jmelKGsXKTOnjs9QwFwRKqzxmit99ck68-i_-zAYuHY31OdNFOJ4wmkEh2Htq5tbP2qaRnfTpk/s320/DreamDeck2.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghzfHcDI0-ttIrxFTFWCG9FoThz1JUb87OEUeljeO9ubuq1LWVOBBqmZLMpHsY_kfDZUJQptbA06-fQcGYFwuWt4mmSmyRvsd60RU7IIm26woFCmvQBw3KgBB_Dar7m45vm7JWHv2dBz8/s1600/DreamDeck3.jpg" imageanchor="1"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghzfHcDI0-ttIrxFTFWCG9FoThz1JUb87OEUeljeO9ubuq1LWVOBBqmZLMpHsY_kfDZUJQptbA06-fQcGYFwuWt4mmSmyRvsd60RU7IIm26woFCmvQBw3KgBB_Dar7m45vm7JWHv2dBz8/s320/DreamDeck3.jpg" width="320" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuHBxuiMim_6fXZte3HMZ4C4jGIAaGKb1ZNhV9dq_hUBiCN8pDO6z7EaXTSM-qDTbdwredLb8rd5FYJlhiFG0zhb71HqwhQes1-3d3cIuq66htDNnfm8UNOzGdibaktRg2ux51mHioFxA/s1600/DreamDeck4.jpg" imageanchor="1"><img border="0" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuHBxuiMim_6fXZte3HMZ4C4jGIAaGKb1ZNhV9dq_hUBiCN8pDO6z7EaXTSM-qDTbdwredLb8rd5FYJlhiFG0zhb71HqwhQes1-3d3cIuq66htDNnfm8UNOzGdibaktRg2ux51mHioFxA/s320/DreamDeck4.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Once you've watched (or skipped) all of these installation is complete and you are transported to Oculus Home, a (very) large room that acts as a launching point into the other applications (So far I've not worked out how to get a screen shot of that!). There's a fire place, books and pillows strewn over the floor, various bits of furniture and objects on display. I wonder if this will evolve into a customisable location?</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
From here you can download and buy games, applications and other media content, as well as launching/watching the ones you already purchased. So like any sensible person I went through the entire store 'buying' every free item available! Some should always be free, where as some other were limited time offers. Its at this point you get dragged back out of the experience, as whilst you can happily queue up and download items, watching the progress bar fill up, eventually it will get to 'installing' and it will then stay on 'installing' until you take off the headset, return to the 2D world of your computer and click on the 'yes this program may install things on my PC' dialogue.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
To be fair this step is built into the Oculus application (assuming you remember to check your notifications), but its still a little annoying. There are a few pre-installed apps (Such as the 360 video and pictures, plus the regular movie theatres) so you might not run into this straight away.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
With several games downloaded (luckily I have a fast connection) I decided to start with one of the launch titles, 'Lucky's Tale'. A third person platforming adventure game. Now I had watched someone playing this earlier in the day and thought that it looked 'okay', but I have to say that it was a completely different experience when I tried it myself. Whilst it is a bright, colourful, cartoon type world all the objects have a good presence of actually being there, and I found myself looking over things, around things, inside things as I played through the first chapter. Other than occasionally looking around a corner there wasn't much you really needed the headset for (The game could be played with just a 2D fixed camera view) but I did spend 30 minutes going through the first stage, looking back down each level when I got to the end to see if I had missed any coins or enemies.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiffrQLu5hAOhcOFFWBBkHfHKTujaBjsYm3MEaJ1vL1HYyZHaqpZqUXohxxxq4VC9TgsCfyfy4NgalXRggKo-pR9Fneu7SY-BAng4dC7pe29pHydZxzjoEs-5jzz_017YeEcnA8aHXWxe4/s1600/LuckysTale.jpg" imageanchor="1"><img border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiffrQLu5hAOhcOFFWBBkHfHKTujaBjsYm3MEaJ1vL1HYyZHaqpZqUXohxxxq4VC9TgsCfyfy4NgalXRggKo-pR9Fneu7SY-BAng4dC7pe29pHydZxzjoEs-5jzz_017YeEcnA8aHXWxe4/s200/LuckysTale.jpg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkPHehp0eP6wvdOEgiSz6_60icSpD9lD8PeAZmjQHs5HzZvyB0BkfH7N5eeup-bs4lWwgOYiX0lvOaio1Rl8te3sZaxyj87ap9SyPsAwsmoBIlEzvdwKmJOGB7Hm7ikH0Yzph9U-cS0DU/s1600/LuckysTale2.jpg" imageanchor="1"><img border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkPHehp0eP6wvdOEgiSz6_60icSpD9lD8PeAZmjQHs5HzZvyB0BkfH7N5eeup-bs4lWwgOYiX0lvOaio1Rl8te3sZaxyj87ap9SyPsAwsmoBIlEzvdwKmJOGB7Hm7ikH0Yzph9U-cS0DU/s200/LuckysTale2.jpg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiX8wRf2N6emTuhj41Qry3uYODyX_ykHJuPp5-LYjFmFtFtbRSD-wBtmD6qddPr3vNxZhawCG3mK1A47CsOeHzq38t-814srml8_jTHmmbTDn_TlH7MUQNp8tm-mfrzbYAlOMxJGD7H5Q/s1600/LuckysTale3.jpg" imageanchor="1"><img border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiX8wRf2N6emTuhj41Qry3uYODyX_ykHJuPp5-LYjFmFtFtbRSD-wBtmD6qddPr3vNxZhawCG3mK1A47CsOeHzq38t-814srml8_jTHmmbTDn_TlH7MUQNp8tm-mfrzbYAlOMxJGD7H5Q/s200/LuckysTale3.jpg" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
As I had so recently come out of the installation process I ended up playing Lucky's Tale standing up. For the most part this was fine, and made it easier to look around the level, but a couple of times I did find myself swaying, as if trying to maintain my balance on a moving ship. This generally seemed to be triggered by the first camera move, as it follows Lucky moving down the level, and when something passed close to my eyes (e.g. one of the butterflies or floating coins).</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
It wasn't a huge problem, and didn't make me feel nauseous, but maybe I'll play the rest sitting down!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
As this is getting rather long I'll stop here and carry on looking at some of the other games and applications in the next part (Including a video of me playing EVE: Valkyrie! That's bound to be embarrassing..)</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Leo</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Leo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0tag:blogger.com,1999:blog-7973550104339721497.post-83367149214488349592016-01-02T18:15:00.002+00:002016-01-02T18:15:37.933+00:00New blogGreetings!<br />
<br />
After using a blog to track progress for my PiWars 2015 entry <a href="http://optimuspi.mybigideas.co.uk/">OptimusPi</a> I've decided to start a more general blog. Partly to make it easier to publish short examples/code snippets, partly to make it easier to share links to the content and partly so I can find this stuff again later!<br />
<br />
LeoLeo Whitehttp://www.blogger.com/profile/08531315879735366920noreply@blogger.com0