Shop OBEX P1 Docs P2 Docs Learn Events
My ActivityBot Diagnostic — Parallax Forums

My ActivityBot Diagnostic

RsadeikaRsadeika Posts: 3,837
edited 2013-09-24 02:59 in Learn with BlocklyProp
Below is the start of a diagnostic program for the ActivityBot. So far I only have two tests, the abcalibrate, and a remote controller. The remote program is the one Andy provided to test the keys, and get the number for the key. Also the abcalibrate is the existing program that is found in the lib file.

The ABdiag program, for the 'remote' command has a terminal screen problem that I do not know how to fix. When I use the "CRSRY,1" combination, it is not placing the cursor where I was expecting. I would like to have everything appear right below the "print("%c Press 'Power' on remote to quit.\n",CLS);" statement, not sure how fix this.

I have not commented the program at all, just want to make sure the concept is something people would use.

Ray

Comments

  • RsadeikaRsadeika Posts: 3,837
    edited 2013-09-21 13:00
    I added a couple of more items to the program, still have to figure out how to make the ping function work. Now I have a fairly easy way of checking some of the functionality of the ActivityBot. A big function that is missing is a way of checking the state of the battery charge, both a power pack or the li-ion pack, which ever you have installed.

    Ray
  • edited 2013-09-21 20:49
    Looks great so far Ray! I'm looking forward to seeing this continue to evolve.

    For battery monitoring, try this:

    Take an unused pair of servo ports, like P16 and P17, and set the power jumper for that pair to VIN.

    Run a socket to pin jumper from the center pin of either the P16 or P17 port to an unused row on the breadbaord.

    Connect two 10 k resistors in series (end to end) from GND to the VIN row you created on the on the breadbaord.

    The row where the two series resistors are connected together should have half of the VIN voltage. Check with a voltmeter.

    After using a voltmeter to verify that the voltage at the node where the series resistors meet is 1/2 VIN, connect a jumper wire from that half voltage row to A/D3.

    Start with the Measure Volts project from http://learn.parallax.com/propeller-c-simple-circuits/measure-volts. Modify it to display just v3. You could also multiply v3 by 2 so that it displays the actual battery voltage.

    The Lion pack docs will probably have some info on when the batteries are tired. As for the 5-cell alkaline pack, I'd say test if your ActivityBot continues performing down to 6 V.

    You'll probably want to make your code take an average of voltages. Avoid taking voltage measurements during direction changes because battery voltage will dip briefly, but significantly during those maneuvers.

    Andy
  • RsadeikaRsadeika Posts: 3,837
    edited 2013-09-22 07:12
    I upgraded the 'ping' and 'remote' commands, once you start the routine all you do is hit the 'q' to exit. I am still having problems with the terminal screen control like 'CRSRY', it is just not working for me, if somebody has some suggestions, that would be appreciated.

    Next in line will be the battery charge state function, I was trying to do this before with no luck, I hope I have a better outcome this time. If and when I get the battery thing working, that should provide enough basic information about the ActivityBot.

    The only thing that I have to think about now is, making the program a little smarter, for instance - what if one of the devices is bad, does the function lock-up? Or what if one of the devices is not hooked up, how does the program convey that information? Just small stuff like that ...

    Ray
  • edited 2013-09-22 08:22
    CRSRXY is on our list; I submitted a report. Remember http://learn.parallax.com/activitybot/using-measurements? That used a string to fill up the line that moved the light indicator instead of CRSRXY. Not sure if it will work in your app, but maybe worth a try for now.
  • RsadeikaRsadeika Posts: 3,837
    edited 2013-09-24 02:59
    I added a battery function, so far the menu selections are:
    menu - shows the menu
    quit - quits the program
    calibrate - does the servo calibration program
    remote - shows the key code numbers on keypress
    servos - tests the servo drives
    ping - checks the ping)))
    battery - shows the state of battery charge

    There is still something wrong with the remote function as it is displayed, cannot figure that one out. You can use this program to check the state of your ActivityBot to see if everything is working as expected, and whatever else you want to use it for.

    Since there are a lot of other devices that can be used with the ActivityBot, I am not sure how I will deal with those.

    Ray
Sign In or Register to comment.