ragstian

Forum Replies Created

Viewing 15 posts - 46 through 60 (of 62 total)
  • Author
    Posts
  • in reply to: Checking EBB motor voltage from Inkscape #21831
    ragstian
    Participant

    Hi

    Reverse engineering of Brian’s file ebb_demo.c  in python. Plotted with standalone python test program used for above tests.

    Front and Back

    RGDS
    Ragnar

    in reply to: Checking EBB motor voltage from Inkscape #21830
    ragstian
    Participant

    Hi

    Another fruitful run without errors.
    Dump of last four lines from program;

    Moving pen   279 steps=  31.39°, egg   279 steps=  31.39° in  697mS.
    Moving pen  -558 steps= -62.77°, egg  -535 steps= -60.19° in 1394mS.
    Moving pen   279 steps=  31.39°, egg   279 steps=  31.39° in  697mS.
    Performed 25037 move commands in 5:51:20.

    I am pretty confident in the pen arm code being bug-free.
    RGDS
    Ragnar

    in reply to: Checking EBB motor voltage from Inkscape #21829
    ragstian
    Participant

    Hi Brian.

    After testing the pen move using the 2.2.3 version I reckoned – why not try “the real thing” – running the eggbot from Inkscape.

    When setting up the eggbot after flashing the EBB on the Eggbot ( I used my spare EBB board for testing on the bench) I found the pen-up pen-down to be reversed in v2.2.3.
    When I perform – “Raise pen – turn off motors’ the pen is lowered. By reversing the upper and lower values in the setup I can still use version 2.2.3 but it might confuse users having a lower number in the Up position than in the Down position.
    Flashing the EBB back to V2.1.5 changes to “Normal’ behavior.

    From looking at the commands sent to the EBB from Inkscape using a USB device Monitor (software) when performing a “Raise the Pen” manual command Inkscape sends;

    “SC,4,18240”
    “SC,5,20540”
    “SC,11,250”
    “SC,12,100”
    “SP,0”
    “SP,1”
    “SM,500,0,0”

    – According to the EBB bot board command manual it is supposed to be the other way around “SP,0” to raise the pen and “SP,1” to lower. From manual;

    Format: “SP,<value>,<duration>,<portBpin><CR>”
    <value> is 0 (for up) or 1 (for down)

    Looking at the eggbot.py confirms this error to be in the eggbot.py extension code. The EBB code works according to the manual. I have verified this using my standalone python test program.

    By the way the “Command manual” is missing a section on the “QB” (QueryButton) command.

    RGDS
    Ragnar

    in reply to: Solved – Stipple file will not completely print #21673
    ragstian
    Participant

    Hi.
    Could you post a link to the SVG file causing the crash?
    Much easier to debug with a file causing the error than from the error messages.
    What version is the EBB board and firmware?
    You can get the board and firmware from the “manual” tab in the Inkscape eggbot extension dialog.
    Select “Check EBB version” from the dropdown list.

    RGDS
    Ragnar

    in reply to: Checking EBB motor voltage from Inkscape #21828
    ragstian
    Participant

    Hi Brian.

    I have now done two tests, one EBB pen move command turning the motor one complete revolution in one second.
    This was done for over 12500 moves without error. The second test was random length moves – in random direction – restricted to the range available on the eggbot. This test ran for over 21500 moves (Six hours) without errors. Video snippet of test.

    The EBB board seems to “behave” OK but is very unforgiving on incorrect parameters. The EBB board will hang after a while if the duration for a move is 0 (zero). A negative number causes the EBB board to crash.

    RGDS
    Ragnar

    in reply to: Eggbot Python Standalone program. #21865
    ragstian
    Participant

    Hi.

    Thanks for the tip, the RoboPaint API road looks interesting. Will download the code and have a look.
    Yes, I have “patched” bits n pieces from the Inkscape eggbot extension. I am currently sending commands stand alone, without a GUI. No sign of the EBB “bug” yet. I am not testing the rotation but verify that the motor always returns to the starting position, (when the motor “misses” step the “home” position will change)

    RGDS
    Ragnar

    in reply to: Checking EBB motor voltage from Inkscape #21827
    ragstian
    Participant

    Hi Brian.

    Once again thanks for the detailed explanations, it’s appreciated!
    I am “sucking up” the info like a dry sponge!!

    For the pen arm code failing doing long moves using the SM command, most of my latest plots have been very fine detailed with a lot of short moves and very few long moves. ( Example ) I also make sure to use the “optimize” feature of the eggbot extension to limit long “air-moves”. To test Iong moves I can make some designs with a lot of long moves. What’s the reported “failure mode”? Loosing steps, failing to move, crashes? Due to the mechanical constraints of the eggbot the pen arm movement is limited to about 900 pixels, by removing the pen arm and using a circular disk (graduated in degrees) much larger pen movements can be simulated. I remember running into problems with large sheet sizes trying to plot a 128000 pixel long line from upper left to lower right corner of the sheet (canvas in Inkscape lingo), this was to make a line spiralling 40 times around the egg. At the time I attributed the problem to inkscape/eggbot/EBB_board using 16 bit numbers (max 65536 or 32768 if signed). Have not tried this experiment lately with latest versions of inkscape/eggbot/EBB_board.

    I have one question regarding the motor current setting calculations, where does the 46mA at 0 counts come from? I have studied the A4983 motor driver data sheet but could not find any relevant info. (Reading datasheets is difficult (for me at least), try the TI Tiva™ TM4C123GH6PZ Microcontroller datasheet – 1452 pages!)

    Quote: “You can see the changes yourself if you compare SVN 289 with SVN 290.”
    Again, where to find? ;-)

    Here are my new eggbot.py and eggbot.inx files eggbot.zip

    Please be aware that this only works on EBB firmware version 2.2.3 and higher.
    EMS does not recommend to upgrade past version 2.0.1 d.t. a possible
    pen arm movement bug in the newer versions.

    RGDS
    Ragnar

    in reply to: Why are my circles not jointed? #21860
    ragstian
    Participant

    Hi.

    Is the thin tapered line at the start or end of a plotted line?
    If at the beginning it is most likely due to a too small delay after lowering the pen in the timing setup tab. See http://bit.ly/1iFUjAg (How did you manage to get your posted image to show?)
    With a too low delay the egg and/or pen will start to move before the pen touches the egg.
    Make sure you “calibrate” the end of servo travel properly before starting the plot (you only have to do this once)
    I set the up position to lift the pen tip approximately 5mm off the egg and the down position to a position where the servo arm clears the pen arm by a few mm. I also set the arm and pen height to a position where the top of the pen arm is perpendicular (90°) to the vertical part of the pen arm when the pen tip rests on the egg surface.

    Please report back on progress.
    Good Luck.

    RGDS
    Ragnar

    in reply to: Checking EBB motor voltage from Inkscape #21825
    ragstian
    Participant

    Hi Brian.

    Thanks once more! Using firmware v2.2.3 I am happy to say that the reported motor voltage is no longer varying with different pot meter settings. I am very impressed with your code! I am curious about what was the “bug” in previous versions?
    (I am currently participating in the edx – Course; “Embedded systems – Shape the world”, programming a TI Launchpad (ARM chip), see http://bit.ly/1jBkc80. Challenging as I never dipped my toe in the ‘C’ before! )

    I had to edit the v_points in my code to get the correct voltage reported. I set the 0 count voltage to 0.0V and the 1023 count voltage to 36.3V ((3.3V/4700Ω)*51700Ω). The measurement is almost spot on with a count value of 333 reporting a voltage of 11.99V. Actual voltage applied is 12.21 which would account for the voltage drop over the diode. With the motors enabled the reported voltage falls to 11.88V due to a slightly larger drop over the diode.

    To get “my” code to report correct replace the v_points with this; v_points = [(0,1),(36.3,1023)]
    (As the slope is now linear I am re-writing the code, the table interpolate is no longer needed, stay tuned for update.)

    A am also curious about the pen arm “failing” code, I have plotted several “hours” of eggs without noticing any problems using version 2.2.1.

    Thanks for the explanation on the motor current, will study it closer when time permits.

    I am impressed with your coding skills and learn a lot by reading your code!

    RGDS
    Ragnar

    in reply to: Checking EBB motor voltage from Inkscape #21823
    ragstian
    Participant

    Hi Brian.

    Thanks for the nice words and the long answer with a very nice explanation on how your code works.
    I figured most of the details as you have explained from your very well commented code!

    I would love to test the 2.2.3 code but I have one “small” problem, I can’t find it!
    The highest version I can find is 2.2.1, here; http://bit.ly/1peWqOi. Where do I find the 2.2.3 version?

    I understand the implications of testing the new “cutting edge” versions but as long as I can revert back to a “proven” version I find it exciting.

    One question on the current measurement, when measuring the current vs counts I measured the coil having the highest current (for simplicity I measured the voltage across the coil and calculated the current). My values came out lower than stated in the EBB command reference documentation. See here for a plot; http://bit.ly/QlA0iq. Looking at the values I realized they are “off” by a constant. The difference might be close to √2 = 1.41 less which to me implies the current setting is for peak current through the coil and my measured values are the RMS values. Is this correct? I have not had time to study the data sheet for the Allegro 4983 motor driver chips yet but will do in order to get a better understanding of the “inner” workings of the EBB board.

    Keep up the good work!
    RGDS
    Ragnar
     

    in reply to: Checking EBB motor voltage from Inkscape #21821
    ragstian
    Participant

    Hi.

    The extension is now updated to include current setting as well.
    Link to new version; http://bit.ly/1dvSQO7

    My spare board which had firmware 2.0.1 reported too low voltage, works ok after upgrading to 2.1.5.
    The reported voltage is still dependent on the current-potmeter setting, is this due to a bug in the firmware – using the incorrect reference voltage for the DA converter? Would be nice if the source code for the EBB board was open-source. ;-)
    ( Edit; the source IS open – YIPPIE !!, found it here; http://bit.ly/1l7M0OG :-) )

    The EBB reports current setting = 0 for the first 10-15 degrees of rotation of the pot from fully counter-clockwise (min current) position, the extension will now “catch” this.

    Please report errors and bugs.

    RGDS
    Ragnar

    in reply to: motor can’t hold up pen arm #21812
    ragstian
    Participant

    Hi Todd.
    I am in Texas – just a little too far from NH to drop it off!
    I am sure the EMSS guys will sort you out – their customer care is excellent!

    RGDS
    Ragnar

    in reply to: Checking EBB motor voltage from Inkscape #21820
    ragstian
    Participant

    Ho.

    Ok, here’s a link to a zip file containing the eggbot.py and eggbot.inx.
    http://bit.ly/1juocaa
    Code will work on EBB hardware v1.3 and above. (The white boards from EMSL are
    v2.0, and all boards from SparkFun are v2.0 and above)

    Another small change I made a while ago, on reporting the EBB version the com port settings will be listed as well, you will have to make the window larger to see it. Handy to know which com port to use when sending commands directly to the eggbot.

    When making a table for the current measurement I discovered the reported motor voltage is dependent on the setting of the current potmeter, my input voltage was 12.22V and the lowest reported motor voltage was 6.97V!
    This with the pot meter set fully counter-clockwice for 0 current. (The silkscreen on the board is incorrect! Counter-clockwice rotation will decrease the current.)
    Max reported motor voltage was 14.46V at a motor current of 1.04A.
    Any idea on why the reported motor voltage is dependent on the current potmeter setting? The two readings (A & V) uses their own AD input on the microcontroller.
    I am not sure of the board revision on my eggbot as there are no version info on the board. Board layout date is 10/27/2010. Maybe my board version is too old?
    Update: from the schmalhaus web page; “As of hardware version 1.4, the name changed to EiBotBoard”. My board has the “EiBotBoard” printed, board must be at least V1.4.

    RGDS
    Ragnar

    in reply to: motor can’t hold up pen arm #21810
    ragstian
    Participant

    Hi Todd

    Where in the world are you? I have two spare motors in my drawer. (Plus a spare EBB board).

    RGDS
    Ragnar

    in reply to: motor can’t hold up pen arm #21806
    ragstian
    Participant

    Hi.

    This sounds like too little current through the motor windings. Too little current could be caused by too low motor drive voltage. Check the motor supply voltage first.
    If OK then adjust the current pot meter.
    Check the holding torque of the “egg-motor” if this is weak as well the voltage to the board is too low. On my bot I can hardly move the egg-coupler with power on (enable motors from the “manual” tab in the Inkscape egg-bot dialog).

    If the “egg-motor” holding torque is OK but not the pen-motor, try swapping the motor wiring so the pen output is driving the egg-motor and the egg output is driving the pen-motor. If the problem moves to “the other motor” the board output is bad, if the pen-motor is still bad the motor (or wiring) is bad.
    Chances are you will find a bad connection (or even incorrect wiring) while performing the above swap.

    Please give feedback on the progress.

    The color of the pen arm motor wiring is brown-green-yellow-red going from the bottom of the board, (Brown is closest to the servo connectors)

    RGDS
    Ragnar

Viewing 15 posts - 46 through 60 (of 62 total)