1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Using Arduino board on Robo R2 project in process

Discussion in 'Mods and Upgrades' started by Lance Weston, Mar 27, 2019.

  1. Lance Weston

    Lance Weston Member

    Joined:
    Jun 2, 2018
    Messages:
    61
    Likes Received:
    11
    I have the software working for Fans, Bed, Extruder, Steppers, Endstops, thermisters. In short everything I need to use the board. I have not yet tested Auto level or filament sensor. All functions working on the LCD. Will go through a print on the bench, will exercise all steppers, heaters and the fan. The PID functions nicely on both heaters.

    To do: Auto level and filament sensor.

    I modified the Ramps board: remove D1, move the 5amp PTC into the 11 amp PTC position and replace the 5amp PTC with a fuse holder (11amp fuse) The original code was modified to reassign the Bed to D9 and the Extruder to D10, and the fan to D8. I have included a zip of the working code.

    D9 and D10 are now 24 volts for the heaters and D8 is 12v for the extruder fans.

    I have included below a mark up of the Arduino that shows the hookup.

    The 5v regulator on the Arduino can not handle the current. I am using a 24v->5v step down (eBay $2) that powers both the Rasberry Pi and the Arduino. You have to make the Arduino power cable from a micro USB cable. The Arduino cable uses standard two pin connectors. The 12v no longer has much current so I use a step down 24v->12v, the 12v is less than 1amp with all fans on full.
     

    Attached Files:

    #1 Lance Weston, Mar 27, 2019
    Last edited: Apr 12, 2019 at 5:20 PM
    Geof and mark tomlinson like this.
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    20,643
    Likes Received:
    6,938
    Looks good. My only concern would be to verify that the 5v lines to the LCD are in fact still in spec.
    I can imagine there may be level-shifter issues, but that could just be me over-thinking it :)

    Looks good so far.
     
    Geof likes this.
  3. Lance Weston

    Lance Weston Member

    Joined:
    Jun 2, 2018
    Messages:
    61
    Likes Received:
    11
    The Robo R2 does exactly the same thing. It uses a micro sd cable running to a 5v supply on the main board to power the Rasberry Pi. The Rasberry Pi carries the 5v up to the LCD through the cable, or in my instance direct plug in.
     
    mark tomlinson likes this.
  4. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    20,643
    Likes Received:
    6,938
    Yea, I know how the C2 does it (the R2 is slightly different in that it uses HDMI too where the C2 just uses the GPIO, or at least mine does).
     
  5. Lance Weston

    Lance Weston Member

    Joined:
    Jun 2, 2018
    Messages:
    61
    Likes Received:
    11
    What I really need is someone that knows how the Robo 2 does the PID. Does it issue a GCODE command go do PID or does it do the PID in the Ardiuno by fetching status and sending on/off commands? Can I get a log of the the command sequence?
     
  6. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    20,643
    Likes Received:
    6,938
    Good luck with that :)
    My suspicion is that it uses an OctoPi plugin for that (there are some out there).
    If not then they coded it up into the RoboPi custom LCD stuff.
    In either case it does the GCode to Marlin directly from the LCD or OctoPi

    Supposition only, I have no proof.
     
  7. Lance Weston

    Lance Weston Member

    Joined:
    Jun 2, 2018
    Messages:
    61
    Likes Received:
    11
    Jason kindly sent me the latest code. It compiled and worked now all functions work perfectly. Untested as of yet are the filament sensor and the auto level. I don't use them but I will get around to trying to get them to work.
     
  8. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    20,643
    Likes Received:
    6,938
    Arduino code or the Pi?
     
  9. Lance Weston

    Lance Weston Member

    Joined:
    Jun 2, 2018
    Messages:
    61
    Likes Received:
    11
    He sent me new Arduino code. If you get a Rasberry Pi you could make an R1 into an R2. You just need a Rasberry Pi Image. All of the limits are in the Arduino code and the Bed PID works well.
     
  10. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    20,643
    Likes Received:
    6,938
    Thanks :)

    I sort-of did that with a project a year ago where I cloned the SD card from the C2 and modified it for the R1.
     
  11. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,687
    Likes Received:
    3,476
    RoboLCD does not do PID control, that is handled completely by Marlin firmware. The Wizard in RoboLCD just sends the mainboard M301 and M304 commands for the firmware to execute PID tuning. All the rPi does is runs OctoPrint and the screen plugin will send other Mcode or Gcode commands, based on menu selections, to the mainboard. It does no processing itself, it isn't like Klipper which does a lot of processing on the rPi so the mainboard and Marlin firmware doesn't have to.
     
  12. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,687
    Likes Received:
    3,476
    pconsole.py is the app that handles most of sending the commands to the mainboard, it is part of the RoboLCD OctoPrint plugin. Also Octopi is just a simple distribution preconfigured OctoPrint with a few add on's. It too does not do any actual print processing, other than parsing Gcode files and sending them one command at a time to the mainboard.
     

Share This Page