Cr4cx - Security robot/Telepresence

cr4cx should be an autonomous home security bot.
It must also work as a telepresence/mobile camera and mobile media player.

Here are some basic specifications:

  • brain: netbook, Intel Atom processor;
  • communications: netbook provided wireless network connection;
  • environment sensing sensors and netbook connection managed by an ATmega328;
  • motor controller with PID control algorithm with ATmega168;
  • MOSFET H bridges for motors;
  • 2 DC motors with encoders for movement;
  • webcam, microphones + speakers for bidirectional audio/video streaming;
  • power regulator: 5V switching regulator;
  • power source: 12V Pb accu.

Future features:

  • charging station;
  • media player, Internet radio;
  • webcam for computer vision;
  • connection to the home's alarm system.

I expect the robot weight not to go over 7kg. I hope for 5kg. Because I think that a future version will power the netbook from robot's battery I have choosed 12V ones, so the motors must be 12V rated.

I choosed Ubuntu for netbook's operating system (I have experience with Debian and Ubuntu is an easy to use distribution for many peoples).

Audio/video streaming

The alternatives considered: ffmpeg+ffserver, Skype, Pidgin and Linphone. Skype lost because of his closed source and retired API. I have developed a small plugin for Pidgin but Pidgin exhausted my CPU cycles so it loosed also. ffmpeg+ffserver compiled from source worked and used a small amount of computing power. Linphone is an open source SIP phone able to do audio/video calls and IM. It used a small amount of computing power and it have a comman line client. I made a quick and dirty modification and a small test app with success so I will use it for audio/video streaming, for sending commands to the robot and for receiveing robot's status. Linphone will be the communication provider for now.

Motors

I do not have many options here, basically I can order some motors from Pololu. I have used the motors calculators from Society of Robots and RobotShop.com but I've got somehow different results !

Using two 74mm diameter wheels I hope that two of 67:1 Metal Gearmotor motors will be enough. the 67:1 have "150 RPM, 200 oz-in (14 kg-cm) stall torque". I want a speed around 30cm/s under robot's load.

I really need your guidance about the motors, see this forum thread. Ro-Bot-X helped me to decide.

Body construction

I wanted a sturdy body that can be made with common hand tools (read no CNC, 3D printer, laser cutter or any other expensive tool).

Here is how I've made the base layer:

  • I've drawn the base layer on Kicad's pcb design program and printed it 1:1 on a A3 size paper;
  • I've cut the paper around the drawing, removing the excess paper, and punched a hole in the middle;
  • I've made a 3mm hole in the center of the plywood sheet, put the paper over a plywood and fixed it with a M3 screw then with self adhesive transparent tape;
  • after the paper was fixed to the plywood I've cut the plywood board with a hand saw, drilled the required holes and sanded the margins.

For upper layers I've searched some more plywood but I only found in 3 square meter sheets so I had to find another solution. I've found round cutting boards for kitchen use, like 30cm in diameter and 2 mm thick and buyed three of them.

To connect the boards together I've search some metal plates but beside the very thin ones I found only heavy and expensive plates. So I had to find another solution: 2 * 1 meter long, 8 mm diameter threaded rods and a bunch of M8 screws and spacers.

To keep the distance between the layers I choose to buy 15 mm cooper tubing and a cutting tools for them.

Upper layers construction:

  • I've made new designs, using Kicad's pcb design program, a 30 cm diameter circle with a 3 mm hole in the center and a grid of holes spaced at 1 inch and 4 * 8 mm holes for the threaded rods. The grid of holes was made for easy fixed of different boards/components;
  • I've found the center of the cutting boards, quite easy as the boards had a small point in the center, left from the manufacturing process, and drilled a 3 mm hole;
  • I've fixed the printed designs like I did for the base board;
  • I've drilled the 1 inch spaced with a 1,5 mm bit (fol layer 2 and 3 I only drilled the holes spaced at 2 inch);
  • using a 8 mm bit for wood I've drilled the holes for the threaded rods.

After that all the boards I've made for cr4 had the fixing holes spaced on 1 inch multiplied values (bling controller, RTC and EEPROM memory board, buttons board). For the boards from layer 1 I've drilled the holes with a 2,5 mm bit then hand tapped them for M3 screws. Boards were attached using 5 mm plastic spacers.

To fix the 15 mm cooper tubes somehow centered to the 8 mm threaded rods I have used some rubber spacers.

I also have some T and L shapped cooper tube fixings to make a stand for the netbook but their turn has not come for now.

Here are two pictures of the result (click to enlarge):

body1.jpg

 


 

2011.01.28

Following Ro-Bot-X advices, I will use two 67:1 Metal Gearmotor 37Dx54L mm with 64 CPR Encoder motors.

For the netbook’s software I think I will use ROS as, I hope, it will save me a lot of coding and debugging. On top of ROS I will add my stack.

Tomorrow I will go to ski in Austria and maybe I will have some time to dig through ROS and creating my own packages for cr4.

Yesterday I have placed a command for some components to build a switched, 5V output, power supply and a MOSFET H bridge, mostly inspired from OddBot’s great H bridge design. Until I will be back from the ski I may receive those components.


 

2011.02.11

Yesterday I have drilled two boards for H bridges, one board for the 5V switched power regulator and a board to control the motor drivers.

Today I have managed to etch the board for the power regulator and for the H bridges but I am not pleased with the results, however I hope that the boards are functional. I am not sure now if I will make the motor controller board because I think the pen used for drawing it is not good anymore.

I have populated the 5V power regulator board and it works! I hope to build and test one H bridge tomorrow.


 

2011.02.15

I have talked with a “professional” that know to make good PCB and today I have sent him the drawings for the H bridges, the motor controller and the main board. Excepting the motors (still no word about them from the importer…) in a few days I should have most of the parts for robot’s base.

I am not ready to take the ROS way yet not beeing sure that the overhead it ads is worth for my robot.

Things to investigate:

  • adding 3 or 4 microphones for orienting the robot or his camera to the speaking person;
  • indoor navigation system based on pattern recognition.

 

2011.02.24

The PCBs arrived two days ago and I started the build process. Yesterday I was worked hard on populating the boards and finished the motor controller:

While waiting for the boards I have build the software for the controller. Today I want to make the connection cables, upload the software and test the motor controller.

I still have to populate the robot’s main board but I have good news about the motors - next week I may have them!


 

2011.03.03

I have the motors and a bunch of other components. Unfortunatelly I have to make another set of H bridges because the ones I’ve builded does not work as I expected.


 

2011.03.12

I have designed and redesigned and redesigned and build one H bridge and it works!

I have just finished the basic tests (using a bicolor LED instead of a motor), PWM worked great at 32KHz. The H bridge uses PWM in sign/magnitude mode and allows all control modes for the motor using only two output pins and a PWM one. Monday I will drill and add the heat sinks and make some measurements using an oscilloscope to see the wave forms.


 

2011.03.22

After a fried MOSFET driver I have made some series of tests and changes to the schematic and now it works OK. Using 2A load and 32KHz PWM there is virtually no heat generated. More infos will follow.


 

2011.05.04

I had some spare time and builded a frame for the robot. It is more like the skeleton and I will publish some pictures next days.

I made experiments with one H bridge and one motor: everything worked good even at 32KHz PWM and no heat was generated by the H Bridge - I am using way to big heat sinks and none or smaller ones are enough.

I had a problem regarding the noise: it seems that the skeleton amplifies the motor noise so I had to install some vibration dampening material under the motor bracket. Results are good, tomorow I will install the vibration dampening material - a piece cut from a “single use” food container - under the second motor bracket.

I have a bigger problem: the wheels. I was unable to find a supplier for good quality wheels so I have buyed some general purpose wheels from a store but I could not mounte them to the motor adapters. I also brought some nice Robbe wheels which I have drilled to mounted on the adapters but I have the unpleasant result to see that the wheels are not straight - those wheels are curved longitudinally and transversally. I may be able to buy, through a friend in Germany, some Banebots wheels.


 

2011.06.26

I think I have made some important progress for now but I have to take a break to fly to Mallorca. More work in 10 days from now.


 

2011.10.16

I have spent a lot of time thinking about the command set for motor driver but now it is done. Speed settings, movement directions, distance and angle movement limits and error reporting are all there.

Today I have finalized a basic software for the main board’s ATmega and did the communication test:

pc -> [USB] -> converter -> [serial] -> main board -> TWI/I2C ->motor driver

and it worked like a charm (after a few tweaks) !


 

2011.10.20

Added a DS1337 I2C RTC and a I2C EEPROM and the related classes and functions.

Do you still have your

Do you still have your modified linphone sources around? I’m working on a senior design project and we need some ideas about modifiying linphone as far as if we need to just write a custom interface since we need to do joystick/keyboard input…

you have mail

you have mail

Ugly news

@!#$ H bridges #!@#! MOSFETs @#@@!! drivers

I let the new H bridge worked for a half hour driving a LED with 32 KHz PWM without problems. Monday I hooked up a nice oscilloscope to actually see how good the bridge is working and I’ve got smoke - the controller (TC4427A) died keeping the low fet’s on.

While searching for other solutions I decided to make some test with totem pole BJT drivers. I really hope to have succes otherway I may have to buy a driver.

Better use a socket for all

Better use a socket for all your ICs. Not funny to desolder a damaged IC :wink:

Actually I use sockets only

Actually I use sockets only for microcontrollers. I had only a few fried ICs and I used a lot of ICs, this is one reason I do not use sockets, the others been interferences, riscs of oscillations, parasite capacitances and so on.

Regarding the fried TC4427A I did not found a plausible cause for its death considering the specs. May be because I did not used gate resistors ?

I have made tests with the totem pole BJT drivers made with 2N2222A and 2N2906A. I’ve got very good command waveforms but I really did not like the waveform at the MOSFET’s output when driving a LED connected at +12V. Now I think that maybe the LED is not good for my tests and I will make tests tomorrow with a 5W lightbulb from my car.

H bridge is working

H bridge is working and I hope that there will be no more unexpected, smoking related, problems. Updates and schematics will follow when I will have free time.

Help, I need wheels !

I have updated the blog with a small piece of my last work on cr4cX. It is a lot more to do (like cutting support plates from plastic cutting boards…) but I need wheels, nice good wheels.

I may be able to buy Banebots wheels 3-7/8". Can somebody share some info about these wheels ? Any other recomandation for wheels with a diameter of 90-100mm, width around 10mm and able to suport a 5-7 Kg robot ?

Progress is slow but never stop

A lot have been changed with cr4 development:

  • I am working on tunning the PID for motor control;
  • I have builded the cr4’s main board - software must be written;
  • I have breadboarded an ArduinoISP and put Arduino bootloaders on three ATmega168A’s;
  • I have changed the wheels with Banebots ones;
  • I have changed the heatsinks for motor drivers;
  • I have designed a smart (I hope) charge controller with integrated home beacon, three switching power supplies, RGB LED for bling and ATmega168 as a brain - crazy right?
  • I have builded an USBasp - really I do not know why;
  • I did not sleeped enough …

F****ck! This project is more complex, and costly, then I have ever anticipated!

Details about cr4’s body and …

… a vacation.

I’ve added some details about the building of the cr4’s body and two pictures.

More to come 10 days from now when I will be back from vacation.

Looks nice! Kind of my

Looks nice! Kind of my future butler robot on top of the Roomba, hehe. I’ll follow your progress closely.

Turtlebot like ?

When I have seen that Willow Garage will release Turtlebot I wanted to discard the work on cr4 and wait to buy a Turtlebot basic kit but on a second thought I decided that my approach is better because:

  • cr4 will have greater autonomy, the added hardware does not need the computer for every job and the battery is cheaper, powerfull and with a longer life;
  • I have doubts about the payload a Roomba can carry for a long time, for sure its mechanical systems were not designed for a signifiant higher payload that its own weight (netbook/laptop, Kinect and the frame).

In short, I do not think that a robot build on top of a Roomba is much more then a smart toy so my advice is: do not build your future butler robot on top of the Roomba, design a stronger base.

You may be right my friend,

You may be right my friend, you may be right! It all depends on the weight of the added parts, but yeah, it gets close to be too much. Also, the trutlebot is built on top of the Create, that I heard has better motors and handles more weight than Roomba. But I like the cleaning bonus. I might get a cheap ussed Roomba and a used Create and combine them into one that has both benefits. But, the only advantage I will have by building my own base is the possibility of sending commands like drive at 80% speed for this exact distance [Forward(Speed, Distance)] and have the motor controller deal with velocity PID(s) and distance PID. Roomba does not accept that. It accepts only the speed prameter and you have to poll the encoders to find out the distance traveled, which makes it really hard to travel exactly 37cm for instance. But it may not be necessary anyway… Why would we use precise distances when we can do SLAM and adjust the position based on external feedback, not internal…

Flawless I2C communication

First I2C communication that I’ve done and it works without problems despite the fact that I have made a multimaster sistem (main board <-> motor driver).

Flawless I2C communication

First I2C communication that I’ve done and it works without problems despite the fact that I have made a multimaster sistem (main board <-> motor driver).

Nice! Yay!

Nice! Yay!

Yes, nice and more …

… complex now since I’ve added an I2C RTC and a I2C EEPROM - and still works :slight_smile: