RASPBERRY Pi - LEARNING HOW TO MAKE YOUR ROBOT WORK

 

Jimmy Watson saved all his paper round money for eleven months to buy himself a robot for Christmas

BEGIN AGAIN OR READ JIMMY'S PROJECT DIARY

 

 

 

Ryan Dusart getting to know Dino the Dionbot giant robot ant

 

 

NECK JOINT - Let loose in the robot store, a young engineer checks out the range of movement of Dino's head mountings. Plug and Play computers do not need students to know much about structural design, welding or other engineering problems, they can just concentrate on learning how to make machines obey digital commands. The engineering grunt comes after the intellectual workout.

 

 

 

 

You might think it strange that the makers of so-called educational computers are so busy trying to maintain their market share that they failed to see the logic of working to the same basic voltage in selecting their architecture, so as to be more compatible with one another. If they were compatible they would be more efficient and the world would be slightly more sustainable in the reduction of energy and time used by humans to create robots for a better world. KISS

 

 

ABOUT RASPBERRY Pi and ARDUINO COMPUTERS

 

The Arduino is a wonderful platform for handling the lower level work of a robot - reading sensors, driving servos, and blinking lights. There is a fair amount of RAM on board, and it is programmable in C++, so you can write decent amounts of code, and basic autonomous robot behavior is well within its capabilities.

 

While it is extensible, meaning that you can add to and expand upon the basic board with future potential built in - you can buy Arduino shields to do a wide variety of things - it doesn't have an Operating System (OS) per se. Arduino has a great deal of support for accessing the board and driving servos, etc., but it is limited and doesn't provide what an OS provides, e.g., multiple processes or threads of execution, signals, IPC and so on. 

 

IPC - In computer science, 'Inter Process Communication' (IPC) refers specifically to the mechanisms an operating system provides to allow processes it manages to share data. Typically, applications can use IPC, categorized as clients and servers, where the client requests data and the server responds to client requests. Many applications are both clients and servers, as commonly seen in distributed computing. Methods for achieving IPC are divided into categories which vary based on software requirements, such as performance and modularity requirements, and system circumstances, such as network bandwidth and latency. 

 

Signal, or Asynchronous System Trap (AST) is a system message sent from one process to another, not usually used to transfer data but instead used to remotely command the partnered process, hence IPC. This is more common in robotics where we are using machines to do things based on what the machine knows about its surroundings.

 

 

 

 

 

 

MOTORS - We need two separate motors to power our ant robot, one motor for each side of the giant insect. This will allow us to steer the DinoBot. Slowing down one set of legs will cause Dino to turn in the direction of the legs working the slowest. The motor and gearbox that Ryan is inspecting is a 500 watt unit more commonly used to propel electric cycles. It's a teensy bit more powerful that the Lego or other VEX, STEM plug and play systems and way too expensive to learn with, but once beginners have mastered the basics using low powered robots, they may want to stretch their imaginations with projects that can do useful things in the real world. This hexapod platform could be the basis of a rescue robot, to carry humans from dangerous crash sites, or compromised nuclear plants where uneven surfaces might defeat a tracked vehicle.

 

 

 

 

ARDUINO + POINTS - When you think of Arduino, think of a great platform for hooking up sensors and servos, and the like, and getting access to a wonderful library of functions that make reading sensors and driving servos very easy.

 

RASPBERRY Pi + POINTS - The Pi provides Input and Output ( I/O) lines but no supporting library per se like you get with Arduino. You can do much of what you want in terms of reading sensors and driving servos from the Raspberry Pi, but it is probably better done on the Arduino.

 

What Raspberry Pi can provide that is out of reach of Arduino is an operating system of the stature of Linux (Fedora and others), and with that all the support that Linux provides for non-trivial devices like USB Ethernet, USB cameras, etc. It also gains you access to the wide array of powerful libraries written for Linux like OpenCV for image processing and hundreds (thousands) of others - pretty much anything that you would find on a desktop system is going to be available or portable in theory to Linux running on Raspberry Pi. It also provides orders of magnitude more processing power and memory, which will help in doing that tasks that a more sophisticate robotics application will need to perform.

Accordingly, use the Raspberry Pi as a host for all of the logic that is difficult to cram onto an Arduino (or to find as a solution - Linux is going to dominate in terms of software choices compared to Arduino by a large margin). It's also the place to do the number crunching, image analysis, database storage. Does that make sense to you.

 

 

 

Micro computer visual interface communications

 

 

 

The basic architecture of a Raspberry Pi/Arduino robot would be something like this: 

 

1. Logic for interacting with robot hardware on the Arduino, and the brains of the robot on Raspberry Pi.

 

2. Add an Ethernet shield and send messages between the two (sensor status from Arduino to Raspberry Pi, and control commands (e.g., servo commands) from Raspberry Pi to Arduino).

 

3. Or wire together the serial lines and send commands and data over serial (preferred, since it uses less power and probably less code to implement).

As a good example, if your robot uses machine vision to navigate its world, you'd put the image processing and navigation decision logic on the Raspberry Pi, as well as the web cam and its drivers. On the Arduino you might drive the servo that is used to rotate the camera into position. On the Raspberry Pi you might also run a web server that allows for monitoring the state of the system and for receiving commands for controlling the robot manually over a network.

 

 

 

 

A large energy store for a giant insectoid robot  Controlling all that power needs some hefty electronics  

 

 

ROBOT INSECT PARTS  - Ryan checks out the 2kW hour 48 volt lithium battery pack and the electronic speed controllers for the two 500 watt 2/3rd horsepower motors. That means that combined, this robot hexapod will have the power of 1.34 horses. Of course that all depends on the efficiency of the motors and drive train. In reality it will be more like a half a horse. A horse is a much bigger animal that our DinoBot.

 

 

 

 

Circuit diagram for a voltage shifting computer interface or coupling

 

 

COMPATIBILITY - A 3.3V I2C component can be connected directly to the Arduino, by using the 3.3V of the Arduino board, and using two 4k7 pull-up resistors to the 3.3V, but you have to know the risks. The Arduino boards use AVR microprocessors, most of which run at run at 5 Volts, and most of those Arduino Boards have a voltage regulator for 3.3 V which can be used for those components that need it. 

 

 

 

 

OTHER INCOMPATIBILITY ISSUES

 

Raspberry Pi is great tool for embedded engineers but it lacks ADC. One more draw back is all of its IO’s are 3.3V level. On the other side Arduino is good at sensing the physical world using sensors. To get benefits of both the systems one may want to interface them.

You can divide this interfacing problem into two steps. There are many interface options available in both boards like UART, IIC and SPI.

Universal Synchronous/Asynchronous Receiver Transmitter (UART) Serial Peripheral Interface (SPI). UART and SPI are serial communications interfaces between two devices (such as a Wi-Fi module and a host microcontroller). The two interfaces differ in the protocol and speeds at which a bi-directional serial communications link is created between two devices.

In terms of speed, simple UARTs typically operate at 0.3 Kbps to 1 Mbps whereas an SPI can operate at up to 50 Mbps or more. As such, UARTs are an excellent choice for sensor type applications and SPI is better suited to high-bandwidth applications such as audio or video.

A UART is an asynchronous interface since the transmitter and receiver use independent clock sources. 

 

SPI is an synchronous interface that uses a dedicated clock signal. The device considered the 'Master' provides a clock signal used to synchronize data transactions between the two devices.

The choice of protocol depends on the requirement of the application and roles of the Arduino and Raspberry Pi.

 

The main problem arises when we try to make physical connection between the two boards because they are working on different voltage levels. We need to use level shifters to avoid any damage to the Raspberry Pi and to get expected results.

 

There is a nice blog on arduino forms. You can build level shifters by looking at this blog. Once we have a physical connection between the two micro computers, they can start talking to each other. On Pi side you can use any of your favorite programming languages.

 

 

 

 

 

 

 

 

Learning how to program a computer to control a moving object, react to sound or other moving objects, tell the time or measure temperature is not as difficult as it first seems using the latest educational aids from several different manufacturers, even if there are compatibility issues. And why are there so many different programming languages? Once again, we are building in difficulties for ourselves and wasting human lives writing code again and again to achieve the same outcome. For a bunch of clever people, computer engineers are quite stupid. Keep It Simple Stupid.

 

 

RASPBERRY Pi STARTER KITS

https://www.amazon.com/dp/B01C6Q4GLE

CanaKit Pi 3 Ultimate 32GB Edition

https://www.amazon.com/dp/B00P2E9W30

 

 

 

 

 

 

NATURAL VARIATION - Despite their reputation as pests, the trillions of insects, bugs, and spiders that inhabit Planet Earth can make some of the most fascinating and dramatic close-up photography subjects and some of the best robots in the world.

 

 

 

 

 

 

 

 

 

THE GUARDIAN 12 DECEMBER 2016

We were thrilled with your creative contributions last time we asked – a year on, we want to see what you’ve been making in 2016.

More than 10m Raspberry Pi units have sold since 2012 – and many of them, we know, have landed in the hands of our ever-inventive readers.

When the Raspberry Pi Zero launched in 2015 we asked you to share the projects you’d been working on, but the past year has seen further development of the technology and exploration of its capacity – so, we’re asking again.

After we published the results – including audiovisual and entertainment projects, educational tools and even festive ideas – many of you wanted to highlight similar or alternative home project-enabling technology:

So we’re happy to say we’re also looking for anything you’ve been making with open source electronics platform Arduino – or anything else you’d like to tell us about.

Whether you have pieced a Pi or Arduino-based system together from scratch as a fun joint project with the kids, or breathed life into some older tech you had lying around, contribute your stories and photographs and we’ll gather together some of your success stories – or even tales of woe.

 

 

 

 

   

 

 

MAKEBLOCK - This is a more advanced version of the Lego Mindstorms Brick concept, mixed in with a bit of Meccano thinking and it looks good. These robot kits use Arduino and Raspberry Pi computers to navigate their world and perform simple tasks.

 

 

 

THE GUARDIAN 26 NOVEMBER 2015

 

The British-made computer is as comfortable in the classroom as on the kitchen table – we want to hear about your successful (and not so!) projects.

The Raspberry Pi has become one of the easiest and most popular tools to learn programming or hack together a tech solution with add ons – it can even take on the tasks of a conventional home computer, and its latest model is so cheap it comes free with a magazine.

Its British makers have shipped millions of the credit card-sized machines since launching in February 2012, and we want to know how you’ve been using them.

Whether you have pieced a Pi-based system together from scratch as a fun joint project with the kids, or breathed life into some older tech you had lying around, contribute and we’ll gather together some of your success stories – or even tales of woe.

You can share your pictures and stories by clicking ‘HERE’. You can also use the Guardian app and search for ‘GuardianWitness assignments’ – add it to the homepage to keep up with all their assignments.

 

 

 

 

Checking out the Arduino computer boards  Learning how to solder using crocodile clips

 

 

RASPBERRY Pi - Your computer board and other electronic components should come in protective plastic packets to prevent static electricity damage. A stand with clamps and magnifying glass will help you when it comes to fiddly soldering. Make life easier by using these low cost items in your laboratory, classroom or on your kitchen table. Sorry Mum!

 

 

 

 

THE GUARDIAN 14 JAN 2016

 

Finally, a nu-metal revival we can all get behind. After more than a decade rusting on the TV scrapheap, Robot Wars has been reactivated. The BBC has announced plans to bring the bombastic pageant of radio-controlled droid proxies engaging in gladiatorial combat backs to our screens for a new six-part run later this year. The original series, which originated in the cyberpunk era of the late 1990s before perishing in the post-apocalyptic wasteland of the Channel 5 schedules in 2003, was a scrappy but absurdly entertaining showcase of weaponised Roombas scuttling around a booby-trapped Thunderdome, an arena where overclocked house sentinels like Shunt and Sir Killalot roughed up most of the civilian challengers with ease.

Perhaps it was a reaction to deep-seated anxieties about artificial intelligence superseding humanity as the millennium approached. In any case, a heavily distorted voice shouting “activate!” while two bodged-together killbots went at it with circular saws and repurposed drillbits seemed like exactly the reassuring salve the world needed: the format was eventually exported to 45 countries, and the BBC must hope that any new incarnation is capable of achieving similar Top Gear-like levels of global penetration. (Jeremy Clarkson hosted the first series in 1998, although his default setting of ironised contempt proved a poor fit for what was ultimately a celebration of spoddiness. His replacement, Craig Charles, struck the right note of slightly stern enthusiasm, firing up the crowd with his emphatic catchphrase: “Awooga!”)

 

 

 

Craig Charles BBC television presenter

 

 

 

Even viewed from ergonomic and app-happy 2016, the grungy Robot Wars still seems considerably ahead of its time. The producers coined the word “roboteers” to describe the teams of enthusiasts who designed and built their machines from scavenged parts, power tool components and golf cart engines. That swashbuckling term helped recast these cheerfully nerdy hobbyists as Dumas-like warrior-inventors, precursors to the ice-cool wave of hackers and heavily bearded disruptors who comprise the currently celebrated movement of hands-on bootstrappers called “makers”.

 

That’s why it’s the perfect time to bring Robot Wars back. Imagine what a new generation of roboteers will be able to achieve, these digital natives to whom rigging up GoPro cameras, flying quadcopter drones and ingeniously programming Raspberry Pi mini-computers is already second nature. The first wave of homebrew Robot Wars challengers wore their spot-weld scars and repurposed sheet metal with a certain scuffed pride. Thanks to the advent of 3D-printing, roboteers will now be able to achieve previously unimaginable designs with elaborate body panelling. Perhaps the next Robot Wars champion will embody beauty as well as durability, some Jony Ive along with its Mad Max.

 

Aesthetics, education, innovation: these are all laudable aims. No true heir to the Robot Wars name can deny the tension that exists at its heart, though. The audience and viewers are invited to admire the ingenuity of the roboteers, but that honourable applause is usually drowned out by cheers as their creation gets abruptly reduced to its component parts by a gas-propelled hatchet, left sputtering and malfunctioning in a pool of its own brake fluid.

 

The BBC may still feel obliged to big up the educational aspect of the show – the official press release describes Robot Wars as “content-rich factual entertainment” – but teachable moments are actually baked-in to the premise. Watching something you’ve spent innumerable man-hours working on get smashed to pieces by an uncaring universe in the form of apex predator Sergeant Bash will always be a valuable life lesson. It should make for riveting viewing.

 

 

 

 

BBC Robot Wars series 2 with Craig Charles

 

 

 

 

R-TECH & ROBO CHALLENGE Q & A

 

Q - How did Robo Challenge get involved with Robot Wars?

Robo Challenge are contacted regularly with regards to creative engineering projects for TV shows and PR campaigns. Our reputation of high quality work, fast turn arounds and friendly family run business means we are the go-to company for a lot of exciting projects such as this.

Q - What metals are the robots made from?

Each House Robot is created with unique materials and metals to suit their needs. We use a wide range of metals such as mild steel chassis’, Hardox wear plate weaponry, Armox armour plating and Titanium such as the axe head on Shunt. Some of the robots even have thick fibreglass bodies to create the more organic profiles that help create the character of the machines.

Q - The making of the robots included welding using an R-Tech MIG180, MIG250 and TIG210EXT. What were the team’s thoughts on using these machines?

Welders and Plasma cutters were the 2 main tools we used to create the robots. This meant that they were in use constantly, with often 3 welders and the plasma cutter being used at the same time for hours on end each day. With such a wide range of metals to work with, the tools performed flawlessly. We had to weld and cut anything from 1mm mild steel sheet up to 20mm thick Hardox wear plate. The ease and speed of set up of all of our tools are critical to get large projects like this completed quickly and to extremely high standards. The R-Tech equipment didn’t disappoint. It’s nice to finally weld with a TIG that’s silent and doesn’t interfere with the old analogue radio!

Q - How long did it take to build each of the robots?

Ideas, sketches and meetings went on for quite some time before Robot Wars was announced on what the house robots would be, how they would function and what components would be used. We then had around 7-8 weeks to get all 4 physically built and transported up to Glasgow ready for battle. This was very tight, and I am extremely happy with the end results.

Q - How many of you are there in the team and do you have dedicated team members for each robot?

During our initial designs and discussions, it was clear that we each had our favourite robot from the original series, and our ideas grew with our passion for working on that machine. With this in mind we split into 3 teams, with a leader of each to work on and create the 3 smaller House Robots, Matilda, Dead Metal and Shunt. We then all joined together to create the 741kg beast that is Sir Killalot!

Q - Did you come across any issues in the rebuild and how did you overcome them?

Collectively, our main team of 4 have over 55 years experience in building fighting robots, and with that comes a lot of knowledge on what works and what doesn’t. Just like an engineer can look at a problem and find the solution out of instinct, we can do the same with robots. We have created all sorts of projects for TV and PR campaigns so we are very familiar with the technologies used, the reliability and how these components work in unconventional circumstances. We had very few issues along the way, which is what allowed us to complete them in such a short timescale. There are the obvious things where we have a change of mind of the placement of a component or the visual aspect wanted tweaking, but all in all the builds went very smoothly.

Q - What weapons have each of the robots got?

Each House Robot is unique in its weaponry.

Matilda: Flipping tusks capable of lifting 1.5tonnes, and a 35kg Hardox flywheel on the rear to tear into its prey.

Dead Metal: Large 1.4m wide grapplers clamp with 300kg to hold opponents in place, whilst the 450mm dia 4000rpm friction saw cuts through almost any material.

Shunt: Titanium tipped axe, that swings over in less that 0.25ms onto its opponents. Powered by CO2 it also has a Hardox Bucket on the front to flip with more than 350kg of force.

Sir Killalot: 2 large hydraulic operated arms capable of lifting 300kg each. One is equipped with a large drill lance, and the other with a powerful crushing claw with more than 2500kg of crush at the tips.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Artwork for Sectasaur, a story about a giant insect discovered as the Antarctic thaws

 

 

A Sectasaur™ (thawed) - now on permanent display at Herstmonceux Museum, in Sussex, England.

 

 

 

 

 

 

 ANTICS - ARDUINO - ARMOUR - ARTWORKBLACK BOX - CHAT GPT - ELECTRONICS - ENERGY - FRAME -  FORMICARIUM

HEAD - INVISIBILITY - JAWSKITS - LEGSMECHANICS - MOTORS - MOVIE - RASPBERRY Pi - R/C DRONE - SENTRY - SOFTWARE

SIM CARDS - SMARTPOHNES - SOUND PROOFING - SPACE ROVERS - SPEED - SUSPENSION - TAIL - WEAPONS - WARGAMING

 

 

 

 

This webpage is Copyright © 2023 Jameson Hunter Limited.  The name DinoBot™ in relation to educational robotic kits is a trademark, though these articles on insects and hard and software is not-for-profit and may be freely quoted with or without a back-link but that a credit would be appreciated. All other trademarks are hereby acknowledged. The design of the Robot Ant on this series of pages is design copyright © December 23 2016, all rights reserved - Jameson Hunter Ltd.