ExplorerBot – part 1

ExplorerBot is a robot that can explore flat environments and produce a 2D map of them.

Components:

  • 2 x Arduino Uno
  • 2 x RF24Lo1 radio module
  • 2 x Parallax continuous rotation servo
  • Adafruit BNO055 sensor board
  • Turnigy 1.25 Ah 3S LiPo Battery
  • Turnigy 40V SBEC
  • 2 x HC-SR04 Ultrasonic distance sensor
  • Jumper wires
  • Laptop

 

The ultrasonic distance sensors will allow the robot to see the environment and map it. The adafruit sensor board will allow the robot to keep track of its orientation. In combination with the distance sensing, it should be able to keep track of its relative position with only a small amount of compound error. The continuous servos will drive the robot. The PWM signal sent to them controls both speed and rotation direction. The main logic of the robot will actually be handled by the laptop, so it will need a wireless link to send and receive data so the robot will be equipped with a radio module. My laptop can’t interface directly with the other radio module, so a second arduino will act as a relay, sending the data to the laptop via serial over USB. The robot is powered by a LiPo battery. Since the battery puts out 11.1V nominal, it’ll need to be regulated to 5V and 3.3V for the components. The Turnigy SBEC will handle the 5V regulation. From there the arduino will produce the 3.3V for the radio module. The arduino could do all the power regulation for the robot, but it isn’t capable of much current. The dedicated switching power supply can handle 5A, so there should be no problem there. The battery is capable of about 40A at 11.1V, so it has loads of headroom. These components are far from ideal for this project. I chose them because I already had them and am familiar with them.

I measured up all the components with my digital calipers and placed them in a virtual environment for 3D modelling. I used Blender for all the modelling because it’s the only software I have for it and because I am very familiar with it. I modelled the body parts of the robot around the virtual components so I knew they would fit. I then exported them from Blender, and opened them in Cura, the software I use for 3D printing. Cura slices up the model and produces G-code for the printer. The G-code is a long list of instructions that the printer follows to print the part. I then powered up the printer, got it up to temperature (205°C) and printed the parts for the robot. The main body piece had to be printed separately as it was too big to fit on the print bed with everything else.

ExplorerBot Body STL Download   ExplorerBot Wheel STL Download

ExplorerBot Balance STL Download

I had initially designed a roller caster that would balance the robot, keeping it level. I didn’t notice that Cura had not sliced the thinner sections that held the balls. instead it cut the print short. This appeared to be because the walls were to thin. I redesigned, opting for simpler posts with rounded ends. These printed without a problem and ended up working very well.

I then assembled the robot. Everything fit well, except half of the screws for the servos. I found that 2 screws in each were enough to secure them anyway, so this didn’t cause an issue. I then wired everything up. I spliced some wires together for the power delivery as there weren’t enough connectors on the arduino itself. I knew I would have to do this, but also knew it wouldn’t be a problem doing so. I then wired up the relay arduino to its radio module.

With the hardware completed I moved onto the software. I decided to do all of my data transfer in ASCII so I could read it all for debugging. It also made handling when a transmission starts and stops a lot easier. The relay code is relatively simple. Just listen to both interfaces. When you start receiving on one, read it into memory, then write it to the other interface.

 

The code for the robot’s arduino is more complex. On top of being able to receive and interpret instructions, I wanted the robot to be able to do repetitive tasks with just a single instruction, rather than the laptop sending out loads of simple instructions, so I wrote functions for setting bearing and sweeping for distance information. I also wrote simpler functions that the more complex functions would use. These functions could also be called directly if the laptop program needed a specific bit of data. I also did some component calibration and baked it into the robot code. This helps the robot do exactly what it intends to, and help it see exactly what it should.

Robot Arduino Code Download   Relay Arduino Code Download

The laptop code will be in the next part of the project.

Heads-Up Display – part 1

I thought I would try my hand at making a heads-up display from some components I had lying around. This is only the first half of the project, I will finish it at some point.

Components

  • I2C 128×64 0.96″ LED display
  • Lens from cardboard VR headset
  • Arduino Uno
  • Thin clear plastic

The idea for this project is that the light from the display will pass through the lens, allowing the eye to focus on it as if it were further away. The light then hits an angled piece of clear plastic were it is reflected into the eye. I measured everything up and modelled a body to hold all the parts.

Heads-up display STL 1 download   Heads-up display STL 2 download

Once I assembled the device, I found that the reflection of the display wasn’t very bright so I will need to find a different, more reflective but still transparent material to act as the reflector. I would like to make the device Bluetooth capable so it can display notifications from my phone, so I will come back to this project at some point in the future.

Coding and Education

We are all taught to read and write at school. Our education system puts so much effort into making sure people are adequately literate so they can be effective members of society. It’s remarkable then, that in an age so driven by technology and computers, that we do so little to teach our children to program. We do teach them a bit about using computers, however it’s usually just how to use basic office applications, with maybe the slightest bit of html. I am disappointed that my young brother is completely code illiterate. Not in him, but in our education system.

We are on the cusp of the automation revolution. Soon many jobs will disappear, with employers chose to implement algorithms and smart machines in place of people. In this very different employment landscape, it is important to give our children the tools to navigate it. These tools come in the form of solid programming skills. Eventually we can expect most, if not all, jobs to be automated. At that point there will be no requirement for anyone to work to get by. However, before we get to that, we must make it through the transition. Such a transition will require a complete redesign of the way we live our lives. In the uncertainty that will come with it, our next generation need to be able to understand and build these complex automation systems, lest they risk getting left by the wayside, too late to be employed, too early for their needs to be catered to.

We can fix this by promoting coding education in our schools and communities. Technology moves so quickly that our slow education system has fallen greatly behind. We need to put the effort in now to catch back up. Perhaps part of the reason will fell behind in the first place was the cost of providing such education, though I would argue that is no longer an issue. Computers like the Raspberry Pi, and microcontroller boards like the Arduino represent a cheap hardware platform to teach programming on. The Raspberry Pi boards are incredibly cheap, requiring very little support hardware.  They are also very useful. I am writing this post on an old Raspberry Pi 2 connected to a TV. This low bar to entry means there really is no excuse not to teach programming. We just need to get on and do it.

Surveillance, Security and Democracy

Now more so than ever, we are dependent on technology. Advents like the internet and smartphones have changed the way we live our lives. With such powerful tools comes an important question. What should and shouldn’t be allowed to be done with them? This is a particularly relevant topic in the UK with a surprise general election lurking just around the corner. Prime minister Theresa May of the conservative party has vocalised a very extreme stance on the issue in the conservative manifesto. She says that Britain should be a world leader when it comes to internet and technology regulation. The conservative manifesto goes on to outline new measures the government will use to regulate and control what is done, said, seen and heard online.

This immediately has alarm bells going off in my head. All the comes in the wake of the Investigatory Powers Act in late 2016. An act that forces ISPs to keep logs of every site their customers visit so that if the government wants to know, it’ll all be ready and waiting for them. It also strong-arms companies into removing encryption on communications if the government deems the potential content of such messages important enough. This all paints a picture, not of a government that is interested in serving and protecting it’s people, but one that is obsessed with controlling and manipulating them. These proposed powers will allow the government to chose what can and can’t be said online, and will give them the ability to harshly punish those who would go against them.

I heard about the Investigatory Powers Bill in September of 2016. It had flown under the proverbial radar of the public and myself for several months at that point. Brexit acted, and still does, as the perfect smokescreen for these overreaching and authoritarian powers, with many too preoccupied with issues surrounding leaving the EU to notice. It received hardly any televised press coverage, and not much written coverage either. As a result many are oblivious to just how surveilled they really are. It is also noteworthy that the section of the conservative manifesto that mentions these new surveillance powers is right at the end of the manifesto, as to get missed or skipped over by most, who are more interested in getting the general gist of it as opposed to reading it all the way through.

These powers don’t protect us, they make us vulnerable. Putting back-doors in encryption allows malicious parties to walk right in and get at our most sensitive data. Requiring service providers to keep extensive records of every users activity online makes them a target for attackers looking to exploit that treasure trove of information. Allowing the government to see into and meddle with everything we say, do and interact with, jeopardises our freedom, privacy and democracy. Weakening cyber security won’t make us safer. Gathering unwarranted amounts of data on every individual and dictating what can and can’t be talked about won’t protect our democracy.

These proposed powers are the beginning of a dystopian, authoritarian nightmare. If we don’t put a stop to it now, it will be to late. We won’t be allowed to express these kinds of opinions. This topic will be deemed harmful, and websites will be forced to remove content like this. The government will decide what is true, and everything else will be branded ‘fake news’, and removed, will those behind it prosecuted. I don’t want to live in a country like that, and I doubt you do too. You can do something about it. Talk about it. Get others talking about it. Use your democratic power as a people to shutdown these intrusive powers and the people behind them. If you don’t do it now, you won’t get another chance.