Acitivity Board iRobot Create 2 proj

It must be "cabin fever" setting in. I went ahead and ordered an iRobot Create 2 robot. Nothing against the Activity Bot, just needed something a little larger and affordable. I have a couple of Activity Bots, in a box somewhere.

Initially I will be using the Activity Board WX with the WX WiFi module. And I will be using SimpleIDE to program it. So far I have determined that the only way to access the WiFi part is by using SimpleIDE. Not sure, but I think flexGUI cannot access the WiFi part for programming the Activity Board WX, like I said, not sure about that part.

I was also thinking about the P2, and if that could be used to control the Create 2. The latest P2 Eval board does not seem to be setup for that, no WiFi, no easy way to power it using 6V-26V power, no easy way to add different sensors and peripherals. It would be nice if there was a robotics P2 eval board, I would imagine that somewhere along the line Parallax will be creating an Activity Board WX with the P2, for the Activity Bot.

Ray

Comments

  • When I put in my order earlier this week, their was a mention of covid-19 delays, since I have not received an email detailing the shipment, I guess, maybe next week, hopefully, it gets shipped.

    This is giving me some time to think about the robot and what I will be preparing it to do. The one, very important thing is, the robot power control and usage. The Create 2 standard battery pack is 2.6Ah, which means that you could get probably a good 1 hour run before it needs to be charged. I think I will be adding a power pack for running the Activity Board and accessories.

    The Create 2 has a little pull out compartment that can be used, maybe it could fit a small power pack. driverBob made an interesting discovery, vruzend diy, the kit allows you to make your own 18650 battery packs. I am watching his thread to see how his battery pack is working out.

    Since I will be adding a Raspberry Pi, to help out the Activity Board, or vice-versa, I know I will need a 3.3V or a 5V power source for the RPi and a 6V power source for the Activity Board. This could be a little tricky, I would like to minimize the regulator count for this. The wiring could get very messy, and a problem of shorts plus wires coming loose, comes in to play.

    Since the 18650 battery is 3.65V, and I think it gets charged up to ~4.0V, I think, hopefully the RPi is ~4.0V tolerant. Now, the Activity Board does not have a method for powering it in that manner. For the P2, I think I read that it is ~4.0V tolerant, so a battery pack that provides 3.65-~4.0V battery pack could be created. Putting together 4 18650 batteries in parallel could provide maybe 4 - 6Ah, and hopefully fit into the little Create 2 drawer. Also I would have to create some wiring concept to have the 18650 battery pack charged up when the Create 2 is having its battery pack charged up. Boy this could get very tricky, in terms of wiring and control.

    Ray
  • I received an email from iRobot yesterday, concerning my order, it has been delayed. It has been seven days since I put my order in, now the new delay could be another ten days, or maybe more.

    I keep thinking about possibly using the new P2 eval board instead of the Activity board. Not sure if I could make that work the way I want it too work. First problem, how do I power the P2 eval board, the Create 2 provides unregulated 14.4V. With the Activity board I just use a barrel plug connected to the Create 2 power supply.

    The other problem that I see is using the WX WiFi to program the P2. I could, maybe try to connect a SIP WX WiFi somehow, but still not sure if flexGUI would be able to work, let alone use the necessary driver for accessing the module. So, what IDE would I use to program the P2.

    So there are two big obstacles that would have to be overcome, right off the bat.

    My end goal is to create an autonomous robot, which means access to lots of storage, that is where the RPi comes in. Besides adapting the new RPi camera, the robot will probably have a lot of different sensors on it. Now I am thinking interrupts within a cog, not sure that flexGUI has that available just yet. Boy this could be a very long project to develop fully.

    Ray
  • VonSzarvasVonSzarvas Posts: 1,998
    edited 2020-05-16 - 16:02:35
    Waiting for the P2 Eval Rev C will make the Wifi programming simpler. You can do it with RevB, but there's a tweak needed.

    Rev C due by mid June, but nothing guaranteed at the moment.
  • Rev C due by mid June, but nothing guaranteed at the moment.
    From the looks of things, that might be about the time I get the robot from iRobot.
    Waiting for the P2 Eval Rev C will make the Wifi programming simpler.
    That is good to hear, I will also probably need to use the ADC functionality of the smart pins. Hopefully there will be some handy-dandy routines available for that.

    Speaking of the WX WiFi, my testing shows that the SIP WX Wifi module has a shorter signal strength than the one on the Activity WX board. Not sure why that is, I tested both of them. I especially made an effort to see what the signal strength was while the units were on the floor, since that is where the robot will be.

    I will be getting the Parallax GPS module to test out on the robot, this will be used inside the house, I hope this will work out as expected.

    At the moment, the robot, will be outfitted with an Eval Rev C, Sirc, for manual control, WX for remote control and programming, and maybe a temperature sensor, to start things off. I was also thinking it would be nice the have some sort of IR Tx/Rx communication, so robots could talk to each other when in range.

    Ray
  • I believe that the project will definitely need a P2 board, of some sort. I am thinking about the Eval Rev C board, because it will be WX WiFi capable, but what tools will be available to program it?

    I have nothing against Spin/Spin2, but that is not my choice for development, sorry. So, what else is left, FlexGUI. Eric has been working on it for awhile now, and it is starting to look good. Since I have decided that the project will need a WiFi component, FlexGUI is not there yet, for doing the WiFi stuff.

    So, I guess I have to pull back and do a preliminary prototype using the Activity WX board with the WX WiFi module.

    Ray
  • I just got an email that said the robot will be shipping out probably today, so, maybe the middle of next week I should have the delivery.

    I guess I will be using the Activity WX board with SimpleIDE. Below is an outline of the program code, at this point I am using seven COGS.

    Ray
    /*
      cr2mobile.c
      
      May 12, 2020
      
    */
    #include "simpletools.h" 
    #include "simpletext.h"
    #include "fdserial.h"
    #include "adcDCpropab.h"
    #include "sirc.h"
    
    #define reboot() __builtin_propeller_clkset(0x80)
    
    serial *rpi;
    serial *cr2;
    
    volatile float vw;
    
    void bat_info();
    void rpi_com();
    void cr2_sirc();
    void cr2_ctrl();
    
    int main() //COG 0
    {
      // Add startup code here.
      cog_run(bat_info,128); //COG 1
      pause(150);
      cog_run(rpi_com,128);  //COG 2 & 3
      pause(150);
      cog_run(cr2_sirc,128);  //COG 4
      pause(150);
      cog_run(cr2_ctrl,128);  //COG 5 & 6
      pause(150);
      //COG 7, last cog avaialable
     
      while(1)
      {
        // Add main loop code here.
        print("Data: %.2f\r",vw);
        pause(4000);
      }  
    }
    
    
    /* Tracking of the battery power. */
    /* Track the robot main battery and the additional power pack. */
    void bat_info()
    {
      float v0;
      adc_init(21, 20, 19, 18);
      
      while(1)
      {
        v0 = adc_volts(0);
        pause(150);
        vw = (v0*4.8125);
      }    
    }
    
    /* Comunication with the Raspberry Pi. */
    void rpi_com()
    {
    rpi = fdserial_open(1, 0, 0, 115200);  //COG 4
      
      while(1)
      {
        //writeChar(rpi,'A');
        writeFloatPrecision(rpi,vw,4,2);
        writeStr(rpi,"\n");
        pause(1000);
      }    
    }
    
    /* Manual control of Create 2 with TV remote. */
    void cr2_sirc()
    {
      
      while(1)
      {
        pause(500);
      }    
    }    
    
    /* Commands to control the Create 2. */
    void cr2_ctrl()
    {
    cr2 = fdserial_open(2, 3, 0, 115200);  //COG 6
      
      while(1)
      {
        pause(500);
      }    
    }  
    
  • To my surprise, I got my iRobot Create 2 package.

    Unpacking:
    The box itself shows that it is a Create 2, the green model. But when I open up the box and pull out the contents, it contains a black robot. The black robot has had all of its brushes removed, and I think that it is a Roomba 614 model, stripped.

    I removed the battery pack, and the battery pack is a Lithium Ion 1800mAh. Could not find any more relevant information about the lithium battery pack, not sure if this is good or bad choice. The normal battery pack is usually a NiCad 2600mAh 14.4V.

    It also contained a communications cable, it looks like a new model, because it has a 10 pin female header on it. The header is TTL just like the mini-din. The USB part of it would be used with a computer for communications with the robot.

    I checked some of the voltages at the mini-din connector. When it is on the home base, it shows ~19V, when it is off the home base, it shows ~15.5V. I had the Activity board connected to the mini-din, and when it is on the home base, the Activity board, when turned on, the board shuts off. I guess it is blowing a fuse. When the robot is off the home base, and the Activity board gets turned on, it stays powered up. I guess the board can handle the 15.5V. Not sure if there is something wrong with the Activity WX board.

    I did a quick test with the Activity board connected to the communications cable header, and the commands that were sent, worked to control the robot. The Activity board was powered by my small lithium ion power pack, when charged up, it is ~8V 2600mAh. I guess I will have to put two of these together, parallel, and have ~8V 5200mAh of power. It looks like I could put the batteries inside of the robot compartment. Now how can I have the robot charge the batteries while it is on the home base charging the robot.

    Next thing is connect up an IR demodulator, and use the Sirc functions to control the robot with a TV sirc remote. I will be able to see how straight it runs, traction transition between wood floor and carpeted surfaces, plus how it handles rolling over loose cables that could be laying on the floor.

    On to the next thing.

    Ray
  • So, I had some setbacks.

    The Activity WX board that I was using no longer functions. At first, the ADC chip got fried; this time the Propeller chip itself got fried. Not sure how the Propeller chip got fried, the top surface of the Create 2 is all plastic, and there was no other metal objects in the vicinity. I think it had problems with the barrel plug adapter it self.

    I have one Activity board, not a WX version, left to work with, but I find this cumbersome to work with. I do not have a 9' USB cable and I do not have any room, on the desk, for the robot to sit close to the computer, when it has to be programmed.

    I am also finding that the top of the robot gets very cluttered with wires and boards, and because I have to disconnect everything every time I have to program the Activity board, I find this very tedious. I have to rethink this whole setup.

    I am also finding that working with the Create 2 robot, gets to be a little bit annoying sometimes. They have a power saving feature which turns the robot off after 5 minutes, sometimes I forget what mode the robot is in, passive or off.

    Now, I am not even sure that the P2 Eval Rev C board will work out, I will still have to many wires and little boards to contend with. And if I fry the Propeller chip, now it becomes a lot more expensive to replace. Not sure what a good board and processor would be for the robot. Back to the drawing board, for the time being.

    Ray
  • I've not tried so this might be a longshot :)

    ... But I think you have a FLiP and WiFi SIP module, right ?

    Could they work together and provide a smaller controller (and lower cost) to experiment with ?

    Set the WiFi module to use CTS reset, and hook up to the FLiP with some F-F header cables.

  • I never got my WiFi SIP module to work, so I ordered a couple new modules from Parallax. Not sure how the Parallax delivery is working these days, so not sure when I will be getting them.

    The problem with using the FLiP module is, it has to be on the breadboard, and I do not want to use the adhesive surface of the breadboard just yet, it makes a mess when you want to peel the breadboard off the surface.

    As I mentioned somewhere, earlier, there seems to be a difference, in signal reach between the two WiFi modules. The SIP version seems to have a weaker reach. Since I have two Activity WX boards that got fried, the WiFi modules still seem to work. Would be nice if there was a way to use those WiFi modules on a breadboard.

    I also ordered a GPS module from Parallax, I found the C driver for it, in the new Learn folder, but no example code. Yes, I disabled Blockly, so not sure how I will get some example code.

    The electrical part is going to get a little tricky, the regulator that I am using is bigger than the FLiP module and it also has to be fastened down, so it does not slide around on top of the robot.

    [Quote}
    ...and hook up to the FLiP with some F-F header cables.
    [/QUOTE]

    Not sure what F-F header cables are. Does this mean that if you lay the WiFi module down, you will get a longer signal reach?

    Ray
  • Hello!
    Our friend means, this:

    ...and hook up to the FLiP with some F-F header cables.

    He means to use Dupont style jumpers with female connectors on them. Sort-of like the ones used for connecting servos to BoE boards for example. I've used them to connect my breakout board for my TI calculator to that same Stamp board. Oh and the differences between an Irobot create and the regular model are just that. They do not install those functional devices into the Create model. Remember that prior to the release of the Create models, people would track down those who needed batteries, which at the time were expensive, and track down replacement ones which were, well, not designated by the company as replacements.

    I actually looked at the site for buying one, until I saw how much he wanted just to come here, and changed my mind.

    Of course there is another problem..... You were sent one with a personality module intact........
  • *** Comments about connectors and fasteners. ***

    My suggestion would be use these Velcro type strips to secure the FliP to the robot. Just flip the FliP upside down and use the smooth side to fasten it to to the robot. The fasteners can easily be removed in the future thanks to their pull strips. These same sorts of fasteners might be able to secure your voltage regulator.

    I sometimes add a layer of Polymorph to the bottom of a PCB in order to have a flat surface to mount the Velcro style fastener. Here's an example of a small PCB I secured with 3M's Dual Lock.

    I use a lot of short jumper wires in my projects. I get these short ones from Pololu.(I have get a bunch of a bunch of sizes. I try to use the shortest jumper practical.) The plastic connector housings are also sold at Pololu but these can be found for much less from other sources (Banggood, ebay, Aliexpress, etc). Having a variety of short jumpers makes the wiring on projects look much less of a tangled mess.

    I only use female ended jumper wire. The male pins bend too easy. I used to get both male and female connectors but now I only purchase female connectors and use long header pins in places where I need to join to sockets together.

    Depending on how many pins need multiple connections, a breadboard may not be required.

    *** Comments about iRobot Protocol. ***

    I used a QuickStart board with my Roomba. I found controlling the Roomba motors a bit of a challenge. I'm used to controlling a robot by controlling the speed to two motors. iRobot's control protocol used a turning radius and speed as control parameters.

    I'm sure there are better algorithms for computing radius and speed from joystick inputs than what I came up with, but I'm certainly willing to decipher my old code to share the algorithm I used.
  • As mentioned in the other threads, I just received my package from Parallax.

    Since I am a big fan of using thick cardboard, to hold some small screws, the setup for the time being will be, a small breadboard too hold the FLiP module and the WiFi SIP module. I did a quick test run of the setup, and I am experiencing some WiFi issues with the WiFi module, or maybe SimpleIDE. Sometimes SimpleIDE cannot find the WiFi module. So I have to power down the FLiP module, and then power it up again. I was having the same issue with the Activity WX board setup.

    The next thing on the list is to add the Raspberry Pi 3 Model A+. Not sure what communication model I will be using, master/slave, or something else between the FLiP and the RPi.

    Ray
Sign In or Register to comment.