<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts on usedbytes:Blog</title>
    <link>https://blog.usedbytes.com/posts/</link>
    <description>Recent content in Posts on usedbytes:Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Wed, 25 Nov 2020 20:35:09 +0000</lastBuildDate><atom:link href="https://blog.usedbytes.com/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Un-replaceable Belling oven switch replacement</title>
      <link>https://blog.usedbytes.com/2020/11/un-replaceable-belling-oven-switch-replacement/</link>
      <pubDate>Wed, 25 Nov 2020 20:35:09 +0000</pubDate>
      
      <guid>https://blog.usedbytes.com/2020/11/un-replaceable-belling-oven-switch-replacement/</guid>
      <description>One Sunday evening around the end of October, our dinner just wasn&amp;rsquo;t cooking properly. The cause: despite heating initially, the oven wasn&amp;rsquo;t holding temperature.
Now this particular cooker - a Belling Platinum db3 - is pretty old. I don&amp;rsquo;t know exactly how old, but it&amp;rsquo;s old enough that none of the spare parts suppliers recognise it as a model; and the most similar manual I can find online has a copyright date of 2002, so I assume it&amp;rsquo;s in the region of 20 years.</description>
    </item>
    
    <item>
      <title>Failsafe Pi Dual-boot with GPIO</title>
      <link>https://blog.usedbytes.com/2020/06/failsafe-pi-dual-boot-with-gpio/</link>
      <pubDate>Sat, 06 Jun 2020 22:12:52 +0100</pubDate>
      
      <guid>https://blog.usedbytes.com/2020/06/failsafe-pi-dual-boot-with-gpio/</guid>
      <description>tl;dr Add this to /boot/config.txt:
# Set GPIO 26 to pull-up gpio=26=pu # If GPIO 26 is high, the kernel, dtb and cmdline will be taken from /boot/other/ [gpio26=1] # Note the trailing slash is important os_prefix=other/ The background I&amp;rsquo;ve been keen for quite some time on using Arm powered machines for as much as I can. Back in 2012 I bought the first Samsung Chromebook which used a dual-core Cortex-A15 Samsung Exynos chip.</description>
    </item>
    
    <item>
      <title>Reverse Engineering keyboard firmware with Ghidra - Part 4 (Conclusion)</title>
      <link>https://blog.usedbytes.com/2020/04/reverse-engineering-keyboard-firmware-with-ghidra-part-4-conclusion/</link>
      <pubDate>Wed, 29 Apr 2020 19:53:36 +0100</pubDate>
      
      <guid>https://blog.usedbytes.com/2020/04/reverse-engineering-keyboard-firmware-with-ghidra-part-4-conclusion/</guid>
      <description>This post has been a bit delayed for noe reason in particular (except perhaps fatigue with the project). It brings the Ducky reverse engineering adventure (mainly) to a close.
At the end of Part 3, all of the pieces were in place, but I still wasn&amp;rsquo;t able to flash my own modified firmware to the keyboard because of a pesky failing CRC check.
What I did know, was that after sending the CRCCheck() command, the keyboard responded with a 16-bit value.</description>
    </item>
    
    <item>
      <title>Reverse Engineering keyboard firmware with Ghidra - Part 3</title>
      <link>https://blog.usedbytes.com/2020/03/reverse-engineering-keyboard-firmware-with-ghidra-part-3/</link>
      <pubDate>Sat, 28 Mar 2020 10:18:10 +0000</pubDate>
      
      <guid>https://blog.usedbytes.com/2020/03/reverse-engineering-keyboard-firmware-with-ghidra-part-3/</guid>
      <description>In which we succeed, and fail - and take a break to play through Half-Life: Alyx
At the end of Part 2, we&amp;rsquo;d found and extracted the &amp;ldquo;firmware blob&amp;rdquo;, which is the data that the updater sends over USB to the keyboard. The problem is that the data doesn&amp;rsquo;t look anything like Arm Cortex-M3 code.
00000000: 84be c2c7 450a 0879 6c0a d553 51ce 1efc ....E..yl..SQ... 00000010: fe5b e848 e9c1 3c77 3b74 48b7 768c cbd9 .</description>
    </item>
    
    <item>
      <title>Reverse Engineering keyboard firmware with Ghidra - Part 2</title>
      <link>https://blog.usedbytes.com/2020/03/reverse-engineering-keyboard-firmware-with-ghidra-part-2/</link>
      <pubDate>Fri, 13 Mar 2020 20:36:08 +0000</pubDate>
      
      <guid>https://blog.usedbytes.com/2020/03/reverse-engineering-keyboard-firmware-with-ghidra-part-2/</guid>
      <description>Last time, in Part 1, we found out the super-secret XOR key for the Ducky One firmware updater and used it to obtain its file header describing the firmware version and keyboard layout.
The next missing piece to find is the size of the firmware image, which will tell us which part of the .exe file contains the firmware.
To find out where to look, we need to go back to the xx_get_fw function, which takes the firmware size as a parameter:</description>
    </item>
    
    <item>
      <title>Reverse Engineering keyboard firmware with Ghidra - Part 1</title>
      <link>https://blog.usedbytes.com/2020/03/reverse-engineering-keyboard-firmware-with-ghidra-part-1/</link>
      <pubDate>Wed, 04 Mar 2020 20:43:08 +0000</pubDate>
      
      <guid>https://blog.usedbytes.com/2020/03/reverse-engineering-keyboard-firmware-with-ghidra-part-1/</guid>
      <description>In March 2019, the NSA (yes, that NSA) released a reverse engineering tool called Ghidra. This is pretty cool, as it&amp;rsquo;s relatively easy to use, pretty powerful, and free as in both speech and beer (compared to the similar and popular IDA Pro which is not).
Around a year earlier, I&amp;rsquo;d &amp;ldquo;upgraded&amp;rdquo; my non-backlit Ducky One TKL keyboard to a backlit one: The non-backlit version is identical to the backlit version, they just don&amp;rsquo;t install the LEDs.</description>
    </item>
    
    <item>
      <title>Run at Startup (without rc.local)</title>
      <link>https://blog.usedbytes.com/2019/11/run-at-startup-without-rc.local/</link>
      <pubDate>Sun, 24 Nov 2019 16:13:28 +0000</pubDate>
      
      <guid>https://blog.usedbytes.com/2019/11/run-at-startup-without-rc.local/</guid>
      <description>A question that comes up quite frequently in Pi Wars circles is &amp;ldquo;how do I make my robot program run at start-up?&amp;rdquo; Someone asked me that directly at the Pi Wars Miniconference - and I gave the same answer I always do: &amp;ldquo;Use systemd&amp;rdquo;.
In itself, that not a very useful answer, because systemd is a large and varied project with lots of tools and functionality. It&amp;rsquo;s just a bit too complex to describe over voice without context.</description>
    </item>
    
    <item>
      <title>Google Home Headphone Jack</title>
      <link>https://blog.usedbytes.com/2019/06/google-home-headphone-jack/</link>
      <pubDate>Sun, 09 Jun 2019 15:36:04 +0100</pubDate>
      
      <guid>https://blog.usedbytes.com/2019/06/google-home-headphone-jack/</guid>
      <description>In my living room, I have a pair of reasonably nice speakers (rescued from a skip) connected to an amplifier salvaged out of an old pair of Dell PC speakers. That setup actually sounds pretty good, but doesn&amp;rsquo;t see much use. It&amp;rsquo;s a pain to plug something into them: either you plug them into the TV and have to have the TV on, or you plug your phone in and have to keep walking over there.</description>
    </item>
    
    <item>
      <title>Making Jewellery</title>
      <link>https://blog.usedbytes.com/2019/06/making-jewellery/</link>
      <pubDate>Mon, 03 Jun 2019 20:26:51 +0100</pubDate>
      
      <guid>https://blog.usedbytes.com/2019/06/making-jewellery/</guid>
      <description>Towards the end of 2018, I got engaged (woop!), but that&amp;rsquo;s not really what this post is about. This post is about the ring.
The ring is designed in OpenSCAD and printed/cast in 14K gold by Shapeways. In the process of designing it, I learnt a whole host of new tricks in OpenSCAD which I wanted to share1. All of this design work was done in secret, mostly under the guise of &amp;ldquo;working on my PiWars robot&amp;rdquo;.</description>
    </item>
    
    <item>
      <title>Pi Wars: Post Mortem</title>
      <link>https://blog.usedbytes.com/2019/03/pi-wars-post-mortem/</link>
      <pubDate>Sun, 31 Mar 2019 20:20:41 +0100</pubDate>
      
      <guid>https://blog.usedbytes.com/2019/03/pi-wars-post-mortem/</guid>
      <description>Pi Wars happened! It&amp;rsquo;s over! I can start doing something else with my life!
I had an awesome time at Pi Wars today and yesterday, with Mini Mouse performing pretty solid attempts at all of the challenges. I ran into a few hiccups on some challenges, but far outperformed my expectations on others.
Overall, I placed 3rd in my category, and am really happy to have been awarded first place for this blog, and Artistic Merit (for being &amp;ldquo;beautiful on both the inside and the outside&amp;rdquo; - thanks Rachel :-)</description>
    </item>
    
    <item>
      <title>Pre-Competition Status Report</title>
      <link>https://blog.usedbytes.com/2019/03/pre-competition-status-report/</link>
      <pubDate>Thu, 28 Mar 2019 20:58:21 +0000</pubDate>
      
      <guid>https://blog.usedbytes.com/2019/03/pre-competition-status-report/</guid>
      <description>With two days to go until competition day (only one day for schools and clubs!), I thought I&amp;rsquo;d capture the status of Mini Mouse, for posterity and for something to compare against in a Post-Competition Post-Mortem.
I&amp;rsquo;m quite happy with where I&amp;rsquo;ve got to. The autonomous challenges are all working mostly reliably in practice runs, and the performance seems to be competitive. Of course there&amp;rsquo;s no guarantee that it&amp;rsquo;ll perform &amp;ldquo;on the day&amp;rdquo;, but I&amp;rsquo;ve done all I can at this point!</description>
    </item>
    
    <item>
      <title>Battery Discharge Profile</title>
      <link>https://blog.usedbytes.com/2019/03/battery-discharge-profile/</link>
      <pubDate>Sat, 16 Mar 2019 22:16:03 +0000</pubDate>
      
      <guid>https://blog.usedbytes.com/2019/03/battery-discharge-profile/</guid>
      <description>Earlier, on the PiWars Discord, we were having a spirited discussion about the discharge profile of lithium batteries, disagreeing about the relationship between cell voltage and remaining charge level. I&amp;rsquo;ve never actually checked this for myself before, so I thought I&amp;rsquo;d run a little experiment to see.
When fully charged, a lithium polymer (LiPo) cell should be at 4.2 Volts. The &amp;ldquo;nominal&amp;rdquo; voltage for a LiPo cell is 3.7 V, and figures for the &amp;ldquo;minimum&amp;rdquo; recommended discharge level vary - but quoted figures range from 2.</description>
    </item>
    
    <item>
      <title>Autonomous Challenge: Hubble</title>
      <link>https://blog.usedbytes.com/2019/03/autonomous-challenge-hubble/</link>
      <pubDate>Wed, 13 Mar 2019 16:15:56 -0700</pubDate>
      
      <guid>https://blog.usedbytes.com/2019/03/autonomous-challenge-hubble/</guid>
      <description>The Hubble Telescope Nebula Challenge (previously Somewhere Over the Rainbow) is one of the autonomous challenges, requiring the robot to visit the four corners of a square arena, starting from the centre. In each corner, there&amp;rsquo;s a coloured board - and for maximum points the robot must visit the corners in an order specified by their colours (Red, then Blue, Yellow and finally Green), as quickly as possible.
My overall strategy for this challenge is to spin on the spot at the starting position, to identify where each colour is.</description>
    </item>
    
    <item>
      <title>Setbacks</title>
      <link>https://blog.usedbytes.com/2019/03/setbacks/</link>
      <pubDate>Fri, 08 Mar 2019 18:20:44 +0000</pubDate>
      
      <guid>https://blog.usedbytes.com/2019/03/setbacks/</guid>
      <description>Three weeks ago, I got a basic implementation of The Hubble Telescope Nebula Challenge working, which made Mini Mouse&amp;rsquo;s code &amp;ldquo;feature complete&amp;rdquo; from the point of view of entering all of the autonomous challenges.
Honestly, I was pretty darn happy. All three challenges were working well enough to be &amp;ldquo;competitive&amp;rdquo;, and with more than a month to go until the competition, all that was left was optimisation. So, I spent a week doing rapid-fire blog posts .</description>
    </item>
    
    <item>
      <title>Mini Mouse&#39;s Armament</title>
      <link>https://blog.usedbytes.com/2019/02/mini-mouses-armament/</link>
      <pubDate>Wed, 20 Feb 2019 20:37:14 +0000</pubDate>
      
      <guid>https://blog.usedbytes.com/2019/02/mini-mouses-armament/</guid>
      <description>Now, irrespective of personal views on arming robots, unfortunately one of the Pi Wars challenges requires1 that we weaponise them. For Space Invaders we have to be able to knock down as many targets as we can (up to 5) from 1-1.5 metres away.
Plan A This challenge has caused me a great deal of head scratching as I sought out the right option for projectile launchers for Mini Mouse. For Bot Matrix the plan was dual-wield repeating rubber band guns - so that was my starting point for Mini Mouse too.</description>
    </item>
    
    <item>
      <title>Edge Detection</title>
      <link>https://blog.usedbytes.com/2019/02/edge-detection/</link>
      <pubDate>Tue, 19 Feb 2019 20:23:05 +0000</pubDate>
      
      <guid>https://blog.usedbytes.com/2019/02/edge-detection/</guid>
      <description>Identifying edges is one of the key &amp;ldquo;features&amp;rdquo; of the human vision system. Our brains have evolved to identify edges and it&amp;rsquo;s one of the things which lets us pick out different objects in the world. If we want to teach our computers to see, Edge Detection is one of the key tools needed to reach that goal (at least, according to &amp;ldquo;classical&amp;rdquo; methods. Things change with Deep Learning).
Unfortunately, edge detection can be a difficult problem to solve in software.</description>
    </item>
    
    <item>
      <title>Autonomous Challenge: Blast Off</title>
      <link>https://blog.usedbytes.com/2019/02/autonomous-challenge-blast-off/</link>
      <pubDate>Sun, 17 Feb 2019 19:52:08 +0000</pubDate>
      
      <guid>https://blog.usedbytes.com/2019/02/autonomous-challenge-blast-off/</guid>
      <description>Blast Off: the Straight-ish Line Speed Test is, to my mind, the easiest of the three autonomous challenges in this year&amp;rsquo;s competition. As such, it&amp;rsquo;s the one which I started working on first.
The task is to get from one end of the course to the other as quickly as possible. There&amp;rsquo;s effectively two feasible options:
 Follow the walls Follow the white line  Given that I don&amp;rsquo;t have any side-facing sensors to follow the walls, to me the easiest option looked like following the white line.</description>
    </item>
    
    <item>
      <title>Mini Mouse&#39;s Software</title>
      <link>https://blog.usedbytes.com/2019/02/mini-mouses-software/</link>
      <pubDate>Sun, 17 Feb 2019 11:43:26 +0000</pubDate>
      
      <guid>https://blog.usedbytes.com/2019/02/mini-mouses-software/</guid>
      <description>Before I dive in to details on individual challenge implementations, I thought it would be sensible to describe how the software on Mini Mouse sits together. Some of this information is duplicated in We&amp;rsquo;re in, but there&amp;rsquo;s more detail here, and things have evolved since then.
The diagrams on this page are created with graphviz (or more correctly, dot), which doesn&amp;rsquo;t give the prettiest of drawings, but does stop me wasting time obsessing over layout.</description>
    </item>
    
    <item>
      <title>Final Hardware</title>
      <link>https://blog.usedbytes.com/2019/02/final-hardware/</link>
      <pubDate>Sat, 16 Feb 2019 22:03:44 +0000</pubDate>
      
      <guid>https://blog.usedbytes.com/2019/02/final-hardware/</guid>
      <description>It&amp;rsquo;s been a few frantic months of robot building between my last post and now, a decent portion of it being focussed on finalising the chassis. Since around September I&amp;rsquo;ve had my prototype chassis working, which has given me a great test-bed for software implementation testing and debugging the hardware design.
There were three main (known/intentional) limitations with the prototype chassis, borne out of a need to get it built and tested before I could finalize some of the details.</description>
    </item>
    
    <item>
      <title>(Quite) Robust Thresholding</title>
      <link>https://blog.usedbytes.com/2018/10/quite-robust-thresholding/</link>
      <pubDate>Sat, 27 Oct 2018 16:55:59 +0100</pubDate>
      
      <guid>https://blog.usedbytes.com/2018/10/quite-robust-thresholding/</guid>
      <description>Today, I&amp;rsquo;m detailing the method I&amp;rsquo;m using to threshold images for line detection. Also included are some hard-learned lessons about premature optimisation and the importance of re-evaluating your decisions frequently!
Image thresholding is the process of taking an image, and converting it into a two-color (just black and white, no grey) image. This is useful for lots of image processing algorithms - like edge or blob detection.
My initial focus here has been on implementing a white line detector for the &amp;ldquo;Blast Off&amp;rdquo; challenge.</description>
    </item>
    
    <item>
      <title>We&#39;re in!</title>
      <link>https://blog.usedbytes.com/2018/10/were-in/</link>
      <pubDate>Sat, 06 Oct 2018 11:09:04 +0100</pubDate>
      
      <guid>https://blog.usedbytes.com/2018/10/were-in/</guid>
      <description>So last weekend Mike and Tim sent out the confirmations for Pi Wars entries, and Mini Mouse made the cut! We&amp;rsquo;re going to Pi Wars!
Doug on the Discord suggested the idea of sharing successful applications for people to look at to see if they can improve their chances next time - so here&amp;rsquo;s mine in case it&amp;rsquo;s useful.
It&amp;rsquo;s been a little over a month since my last post, but I have moved things forward a bit in that time.</description>
    </item>
    
    <item>
      <title>PCBs</title>
      <link>https://blog.usedbytes.com/2018/08/pcbs/</link>
      <pubDate>Sun, 26 Aug 2018 10:11:04 +0100</pubDate>
      
      <guid>https://blog.usedbytes.com/2018/08/pcbs/</guid>
      <description>For Mini Mouse, I&amp;rsquo;ve designed two PCBs - one for motor drivers, and one for the power supply/control circuitry. These were my first boards using the open-source KiCad suite of EDA tools, having previously been an EAGLE user.
I got the boards made at dirtypcbs.com, panelising the two boards into a single 5x5 square. This is the third set of boards I&amp;rsquo;ve made with dirtypcbs, and I&amp;rsquo;ve always been very pleased with them.</description>
    </item>
    
    <item>
      <title>Power</title>
      <link>https://blog.usedbytes.com/2018/08/power/</link>
      <pubDate>Sun, 26 Aug 2018 09:50:46 +0100</pubDate>
      
      <guid>https://blog.usedbytes.com/2018/08/power/</guid>
      <description>Every robot needs power, generally at two or more voltages - one &amp;ldquo;high&amp;rdquo; voltage directly from the battery to feed the power hungry motors, and one &amp;ldquo;logic&amp;rdquo; voltage to drive the electronics. The motor voltage needs to be able to provide high current, and the logic voltage needs to be relatively &amp;ldquo;clean&amp;rdquo; to avoid messing up the electronics with excessive noise or voltage drops.
Mini Mouse uses a 3S LiPo battery, which means it&amp;rsquo;s quite important not to over-discharge the battery, as that might damage the cells (and could even result in fire).</description>
    </item>
    
    <item>
      <title>Motors</title>
      <link>https://blog.usedbytes.com/2018/06/motors/</link>
      <pubDate>Sun, 03 Jun 2018 14:55:44 +0100</pubDate>
      
      <guid>https://blog.usedbytes.com/2018/06/motors/</guid>
      <description>Motors were the first thing I worked on selecting at the start of the development process. Given the space constraints I&amp;rsquo;m working with, motors would be a critical component which would inform the design of the rest of the robot.
Stepper vs Brushed DC In Bot Matrix I had DC motors with hall-effect encoders on the back. I used the encoders to implement closed-loop control for motor speed, and for odometry for dead reckoning.</description>
    </item>
    
    <item>
      <title>Mini Mouse</title>
      <link>https://blog.usedbytes.com/2018/04/mini-mouse/</link>
      <pubDate>Mon, 30 Apr 2018 19:47:31 +0100</pubDate>
      
      <guid>https://blog.usedbytes.com/2018/04/mini-mouse/</guid>
      <description>In the past 12 months, I built Bot Matrix, aiming for PiWars 2018 (though unfortunately I wasn&amp;rsquo;t selected as a competitor). It was the first chassis I built from scratch, and I learnt a lot in the process! Bot Matrix was large (on the limits of the PiWars size allowance), and used pretty large motors and drivers.
This year&amp;rsquo;s project is a little bit different - I always fancied building a robot in a computer mouse and so that&amp;rsquo;s what I&amp;rsquo;m going for.</description>
    </item>
    
  </channel>
</rss>
