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

RoboOS test rig

Discussion in 'Software' started by OutsourcedGuru, Nov 12, 2017.

  1. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    Finally managed to get somewhere on this. Reading it like this, it looks easy but I've spent at least four hours trying to get the right set of instructions from the web.

    Details:

    1. Raspberry Pi 3
    2. 16GB microSD card
    3. a cloned image from before my recent OctoPrint mods, so it's reasonably new code
    4. Bought a PiTFT 320x240 2.8" touchscreen display at Fry's and have managed to modify the image to accept this as a monitor/touchscreen; it sits on top of the Raspi and covers the first 26 pins


    DSC_0312.png DSC_0313.png

    The Robo image already had the /boot/overlay file for this (and many others). Minimal tweaks to /boot/config.txt and running an Adafruit script to adjust the touchscreen parameters and that was it.

    Note that this is a smaller LCD than the one included on the Robo C2 and yet it's scaling just fine and even mirroring to the HDMI thanks to Victor's existing tweak in the config.txt file.

    Basically, if I were to move this rig over to the Robo C2 and plug in the Type-B USB cable to the Robo board I could run the printer from this new development rig.

    Code:
    # ssh into the Raspberry Pi as your printer's name (making sure that your printer is off of course)
    $ sudo nano /boot/config.txt
    # Add this part after the existing dtoverlay= command section
    [pi1]
    device_tree=bcm2708-rpi-b-plus.dtb
    [pi2]
    device_tree=bcm2709-rpi-2-b.dtb
    [all]
    dtparam=spi=on
    dtparam=i2c1=on
    dtparam=i2c_arm=on
    dtoverlay=pitft28-resistive,rotate=90,speed=32000000,fps=20
    $ sudo reboot
    # ssh into it again
    $ sudo curl -o /usr/local/bin/adafruit-pitft-touch-cal https://raw.githubusercontent.com/adafruit/PiTFT_Extras/master/pitft_touch_cal.py
    $ sudo chmod +x /usr/local/bin/adafruit-pitft-touch-cal
    $ sudo adafruit-pitft-touch-cal
    
     
  2. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Just connect it to a standard RAMPS/Arduino board and it should work. I have been this far also. it is decoupling all the parts from Robo that is the main issue.
     
  3. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    I suppose I could chase a RAMPS board (was looking at some today) but I'm wondering if I couldn't use another Raspi to pretend that it's a RAMPS board to mock things up. If I did, though, any suggestions on brand? I like the idea of the Volcano so it would need support for three extruders.

    Anyway, have been continuing the PhoneGap app using this as the backend.
     
  4. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    You could do that with an Arduino. No need for a RAMPS, just some relays... use D/O from the Arduino to simulate inputs to the Pi -- get a Arduino Due (which uses CMOS logic) if the 3.3v logic levels (on the Pi) are going to mess with you from the Arduihno (5v) side (although you should be relay isolated) -- you can even use an A/O to drive an A/I on the Pi :)
     
  5. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    I've got a pile of Raspis and a couple of driver boards from OSEPP. One of my next purchases will be a few NEMA17 steppers for some other project so I'll have a few to play with. I've got a couple logic converters from Adafruit (but as I suggested in another thread a 7400-series quad nand gate @ $0.47 it's pretty cheap for this). I've got a pile of relays from when Radio Shack was going out of business. Got a few of those big green connectors left over from an OSEPP project.

    I've got the details for the serial communication from OctoPrint's interface. What runs on the Robo board, anything? It responds like a serial device, that's clear. I take it that RAMPS 1.4 is a hardware spec but somewhere, there's a spec for how they talk. :researching: So this is where the MARLIN firmware is loaded, right? How about this link to build Marlin on the Raspi?

    Just read a write-up of the Arduino Due. I'd like to rule out the Raspi platform first, if possible. I'm kind of irritated by the chasm between the two platforms and hardware manufacturers camping on one or the other.

    Got the API from OctoPrint feeding data now into the app (the Files list) and making the output pretty.
     
  6. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Marlin does not actually run on a rPI it is not a supported platform. Basically it is a clear text serial communication between your host (OctoPrint in this case) and the Printer. Marlin parses the output then runs the subsequent code. It is that simple.

    That is why I suggested a under $20 RAMPS/Arduino combo since there is no muss no fuss. Remember K.I.S.S.
     
  7. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    The RAMPS does not itself do any communication, rather the Arduino it is mounted to does all of that. The Robo board is a combination of the RAMPS/Arduino functionality. That is why I said you really do not even need a RAMPS. You can do the emulation directly from the Arduino
     
  8. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
  9. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    I have a daughtercard for the Pi that allows you to embed an Arduino CPU onto the Pi (as a shield) and talk directly to it. I experimented with that* and while nifty it is not really needed.



    *that was originally how we implemented the BarBot...
     
  10. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Hey @OutsourcedGuru I just cloned the RoboOS GITHUB and stripped all references to their GITHUB and all dependencies. I don't know if it works yet, I am busy doing a bunch of other crap. But the source is here: https://github.com/WheresWaldo/WaldoLCD

    It is basically RoboOS 1.10.1 with every variable renamed and links changed. It is not a fork of their repository, it is a clone, so whatever is done in it won't want to be pushed to their repository. I also fixed the resetting of all memory in the Z Offset wizard.
     
    OutsourcedGuru likes this.
  11. Grim

    Grim New Member

    Joined:
    Nov 9, 2017
    Messages:
    11
    Likes Received:
    2
    OutsourcedGuru likes this.
  12. Kilrah

    Kilrah Well-Known Member

    Joined:
    Apr 18, 2017
    Messages:
    498
    Likes Received:
    332
    This link is just a helper script to compile the Marlin firmware you would then load onto the arduino.
    You cannot run Marlin on a Pi. It's a real-time program that requires microcontroller peripherals that are not present in typical "computing" SoCs like the one on the Pi and direct/deterministic hardware access you can't get through a general purpose OS like linux (simplified).
     
  13. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    SuperOcto seems to be just a clone of all the Robo stuff with Italian translation added. It still all points back to Robo's repositories.
     
  14. WheresWaldo

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

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    So here is something really stupid in RoboOS
    • On startup all EEPROM memory is reset to firmware defaults
    • On execution of the Z Offset wizard EEPROM memory is reset to firmware defaults.
     
    #14 WheresWaldo, Nov 18, 2017
    Last edited: Nov 18, 2017
    OutsourcedGuru likes this.
  15. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    That is ... not smart or really needed and would explain some of the cra... stuff I have seen
     
    Geof likes this.
  16. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    Sorry, it's been a little busy with this new gig I landed (coding academy as instructor). v1.0.8 of the Robo app is up. There's a fair bit of functionality there but still blasting through the To-Do list. Still a hard-coded IP address in there. Still have some work to do to test tools (bed/2nd extruder) that I don't have installed yet.

    Good stuff, though. I have to say that my version will be a lot better than theirs when it's done. I made the buttons more intuitive and bigger.

    Although I'll go the Arduino route later (so that I can code at the academy), I'm getting lots of traction right now just connecting this rig straight to the Robo board.
     
  17. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    I'll have to pull this down and check it out. Thanks.
     

Share This Page