Table of Contents
Sorry for the lack of articles lately, external events and distractions kept me away from the DB1 project. In this article, I’ll attempt to bring you up to speed so we can move forward with the development of this intelligent robot.
Despite not being able to devote a lot of time to the robot it hasn’t been forgotten. Let’s begin!
Important Updates and Developments
Before we go over the individual video episodes I want to recap some of the more important developments in the project. Not all of these developments are technical, as illustrated by the first one on the list:
The DroneBot Workshop Forums
If you haven’t heard already we now have a forum!
I had remarked several times during the DB1 project that I would like a forum so we can interact and exchange notes and ideas for the DB1 project, and robot projects and components in general.
The forum has many sections, including a Robotics section. One sub-forum is dedicated to the DB1 project. We also have sub-forums for almost every aspect of DIY electronics, it goes way beyond robotics.
We’ve already had some great conversations on the forum about the DB1 project, as well as some excellent robotics presentations from some of our members. It’s amazing what everyone is building!
We even have a forum member who has kindly been writing a series of posts about ROS, the Robot Operating System.
If you are not yet active on the forum head over there right now and sign up. Membership is completely free and you’ll be able to get (and dispense) advice for your electronics and robotics projects.
Hope to chat with you there soon!
New Motor Controller Design
Once again I’m changing the motor controller! For those of you building along with me this is probably a bit frustrating, but remember, DB1 is a “work in progress” and this probably won’t be the last design change that I make as we go along.
I’m also going to add some OR gates to the design so I can accept multiple Emergency Stop inputs.
I’ll be briefing you on the new design soon. If you have already built the original design it will still work, and the software is the same.
GitHub – Coming Soon
I’m doing what I should have originally done and I’m moving the DB1 code to GitHub. It will allow you to collaborate on the design.
Actually, I’m moving ALL of the DroneBot Workshop code to GitHub. And I’ll be changing the code displays on the website to link to GitHub, so they will always display the most recent version of the sample code I publish here.
I’m a firm believer in open source, and I also know there are many coders out there who are far more skilled than I am. So by putting all my code out there, I hope to inspire you to improve upon it and contribute it back to the community.
Together we can build a much better robot. And lots of other better stuff too!
I’m working on the GitHub move right now, you should see it soon. There is a link to GitHub on the front page of the website right now, soon you’ll be seeing more of them.
Episodes 11 – 14
Now that we’ve gone over the highlights, let’s go over every video episode-by-episode to catch up.
In this episode, I started coding for the motor controller. Remember, even though I am changing the electrical design all of the code for the design using the Arduino Nano’s is still valid.
My controller code just does the following:
- Move the motors at a speed of 200 for a couple of seconds.
- Reverses and moves again at the same speed.
- Stops for two seconds.
- Accelerates forward to a speed of 255
- Runs for four seconds and then decelerates to zero
- Waits fours seconds
- Repeats the acceleration and deceleration, but in reverse
Simple, but it gives you an idea of how to work with the motor controller.
In Episode 12, I go over a bit of the code, the MovePWM function. I’ll show you how the function works, and how to use optional parameters in an Arduino function.
The real news in this episode is the introduction to the DroneBot Workshop Forums.
The next phase of the DB1 robot project will be to add the navigation sensors. These are the sensors that will prevent the robot from crashing into walls and falling down the stairs!
These sensors are NOT to be confused with the sensors on the sensor layer, they are independent and are just for navigation. And they need to be mounted all over the robot, not just on the base.
The sensors will communicate with the Arduino Mega using I2C. But, for all of its merits, I2C has some issues that we will need to resolve before we can use it.
The biggest problem with I2C is that we are not using it the way it was intended, originally I2C was simply used to allow integrated circuits on the same PCB to communicate. Extending its reach with wires can pose a problem, especially in an environment like DB1 that has a lot of potential for electrical interference.
Another problem is wire capacitance, whose effect is illustrated here:
Two methods are discussed in the video of alleviating this problem.
The first is to use a balanced line driver. This is an excellent solution for running I2C connections over a very long distance, however, for DB1 I think it is an overkill. It is also not inexpensive, especially when you consider that I’m running multiple I2C lines.
Sparkfun makes a module that can do this job nicely, you’ll need one at each end of the extended I2C connection.
Another method is to use a buffered driver. This is a less expensive solution and I think it would be ideal for DB1. The use of buffered chips is illustrated here:
That brings us to the latest episode, the Sensor Bus wiring. I have started wiring up the Sensor Bus, which I have divided into four sections:
- Tower 1
- Tower 2
I have created a diagram to illustrate this:
As you can see there are a couple of new components – a main Sensor Bus Distribution Hub and four Nodes, one for each wiring section.
The master hub interfaces with the Arduino Mega for I2C and GPIO signals. It also connects to the motor controller to provide Emergency Stop signals.
The I2C signals are converted using the buffer chip I spoke of earlier. These are inexpensive 8-pin devices that can be used as both receivers and transmitters.
The Node end also used the same chips to bring the signals down to the I2C level. It distributes the I2C and one of each of the GPIO and Emergency Stop connections.
The actual bus wiring uses 6-conductor shielded cable. I’m using 6-pin aviation cables on these, and the pinout I used is in the following diagram:
Note that “LDA” is the buffered I2C SDA line and “LCL” is the buffered SCL line.
In the video, I also want to discuss the best types of connectors to use in the robot design, while Dupont connectors are the easiest and cheapest to use I’m concerned about them coming loose due to vibrations.
I have some other ideas and I mention them in the video. Basically, I’m looking for connectors that lock into place.
And I just had to show off my new 4GB Raspberry Pi 4, which will be replacing the Raspberry Pi 3B that I currently have on the base!
So that’s a summary of what’s been happening with the robot project.
Moving on I’ll be continuing the sensor bus wiring, after which I’ll test out the remote I2C sensors with some experiments.
If you want to keep up to date on the project one of the best ways is to hop onto the DroneBot Workshop Forum. You’ll find the latest DB1 info there and can add your own ideas to the project.
Looking forward to chatting with you on the Forum soon!