AR logo.png

ANNIN ROBOTICS

0
  • HOME

  • TUTORIALS

  • DOWNLOADS & MANUALS

  • ROBOT KITS

  • FORUM

  • BLOG

  • CONTACT

  • More

    preview-blocker.popup
    1. ROBOT FORUM
    2. Robot Builds
    3. 3D Printed AR2+α
    Search
    Zach Allen
    Nov 28, 2018
      ·  Edited: Nov 28, 2018

    3D Printed AR2+α


    The photo on the left shows the robot rotated 180deg on the base (for storage). The right shows the robot in a partially assembled state.


    I purchased the CAD (SolidWorks) files from Chris’s website so I could make some design modifications and then 3D print. I wanted to be able to export high-res STLs, so curved surfaces were curved rather than triangulated. I printed everything on my Prusa i3 MK3 (8” square build surface) with IC3D Red PET-G. All in, not considering reprinting any parts, it was just north of 70 hours of print time and under 2kg of filament.


    Maybe the most visible design modification is at the base. I integrated the base and the J1 Turret, as well as the support ribs. This took the longest to print, at around 15 hours.


    Due to the build surface constraint, I had to cut the J2 arm in half. For increased rigidity, I made the walls taller, similar to the supports Chris recommends when printing. I made some overlaps and printed a separate, bolt-on stringer to tie them together. It’s still a little wobbly, so I may revisit the design.


    The modification with maybe the most design work is with the J5 actuation. I changed from the lead-screw-driven system to a bevel-gear-driven system. Initial (no load) testing shows pretty good prospect. By tensioning the belt, the J5 extended arm is slightly bent (it’s plastic...), so I may revisit this and go to a more direct-drive system. But for now I’m happy with how it’s working.


    By changing to the bevel gear drive, I used a geared stepper, which sticks out the back of the J4 arm further. To utilize this space, I incorporated the J4 hub into the J5 motor mount.


    For the J5 drive pivot on the J6 assembly, I had a hard time getting enough torque on the J5 drive pulley set screw without cracking the plastic. I modified the whole J6 design for ease of printing (modular instead of all-in-one) and used the leftover 8mm keyed shaft from J3 to fix the pulley. So far so good!


    As for the electronics...that’s the next part of the fun. I plan to make a custom PCB that acts like a shield for the Arduino Mega. It will have screw terminals for the motor driver control wires, as well as for external IO. I’ll also include 2 DC-DC step-down converters to take the 24V from the power supply and output 12V for the Arduino and 5V for the RPi (see next paragraph). That way I can eliminate the 5V power supply. This concept needs validation, so I’ll update this post once I get it sorted out.


    For actual control, I’ve modified the AR2 software to work on the RaspberryPi. I’m planning to use an RPi Zero W. I have it set up as a wireless access point, so I can access the GUI with a tablet via the free VNC Viewer app (android and iOS). Initial testing shows good prospect, but I need to validate that the RPi can handle the processing. If it works, I’ve got a headless unit - no Windows computer required!


    That’s all for now, I’ll continue to update this post as I make more progress. Let me know if you have any questions!


    -Zach

    35 comments
    Chris Annin
    Nov 29, 2018

    Nice work. Its awesome to see what you have done. Thanks for posting this. Please keep us updated on your progress. I’ve had a number of people asking about adapting the software for raspberry pi - if you could post a how to, a lot of people would be very interested. Thanks again.

    Zach Allen
    Nov 29, 2018

    Absolutely, I’ll get that together. It’ll take a few days, but I’d be happy to share. I’ll email you the source files so you can post on github.

    Paul
    Dec 4, 2018

    Nice work!

    0
    Zach Allen
    Dec 11, 2018  ·  Edited: Dec 11, 2018

    Update for today:

    I finally got everything wired up temporarily to test the functionality before continuing. One important note is that I didn’t wire the limit switches per Chris’s instructions. I used only 2 wires, one connected to COM and the other to NO. For the limit switch to work properly with the code, it needs to be pulled to ground (LOW) when open, and at 5V (HIGH) when closed. The 3rd wire (connected to NC) to ground accomplishes that. I did it slightly differently. Since I didn’t have a ground connection, I changed the Arduino code such that the switch closed would be to ground (LOW) and open is at 5V (HIGH) using the Arduino’s internal pull-up resistor. The code was pretty easy to modify - all of the calPin digitalRead commands had to have HIGH/LOW flipped. This reduced the physical wiring. I’m not sure if I’ll keep it this way, or if I’ll incorporate pull-down resistors on the shield I’m going to start working on shortly. Probably the latter...but this got me going along in the meantime.


    I’ve been testing everything on Windows, but once I get a little further along I’ll test the full functionality on the RaspberryPi. And then I’ll provide a tutorial on how to get the RPi going.


    I saw that Chris posted the 2.0 software, so I may go through that to make it RPi compatible, but for now the focus will be on 1.5. I’m pretty sure I won’t include the Xbox controller functionality on the Pi, but it’ll be helpful to have the trajectory mapping that’s he’s included.



    0
    Chris Annin
    Dec 11, 2018

    Awesome. Great feedback, thank you

    0
    Zach Allen
    Dec 31, 2018  ·  Edited: Dec 31, 2018


    I made some progress with the electronics. I designed a custom shield for the Arduino to incorporate some different components. I have the 24V coming to the board at the bottom, then I have 2 buck converters to get 12V to the Arduino and 5V to the Pi. I ran out of headers so I still need to solder the Pi to the board. I know I had some I/O I wanted to add (buttons, switches, sensors, etc) so I implemented 4 molex connectors also. And then I used screw terminals for the calibration, Pul/Dir wires, and additional I/O. I’m waiting for the resistors to arrive for the limit switches, and then I’ll be able to put it through the paces.


    On another note, I’m thinking about reworking the whole J1 assembly. It will be introducing more cost (I ordered a $140 bearing), but it may give me better stiffness with the 3D printed assembly at J1. More to come on that later...

    Chris Annin
    Dec 31, 2018

    looks good. The shield looks really good. I was thinking about making a shield to step all logic to 3.3v so I could use a Due down the road but haven't had time to mess with it. Ive also wondered in the past if I could run solely on a Pi and us the GPIO instead of the arduino but im not sure if step timing would be reliable. Let me know if you can provide instructions for getting the software to run on the Pi -had a few people asking. Thanks for your help and for posting your progress.

    Zach Allen
    Dec 31, 2018

    Sorry for the delay in getting out instructions for the Pi. I was waiting for this board to arrive to make sure the pi worked before sharing the source file. Work and the holidays reduced my evening hours haha.


    I‘m not familiar with the Pi at all, so I’m not sure if it can do all the step commands. Since my shield uses adjustable buck converters, it can do whatever voltage is needed. I can pull out the headers for my personal customization, update the layout (I forgot to label all of the I/O on the right side...) and share the eagle files, if anyone is interested.


    The 5V buck converter is exclusively for powering the Pi. The 5V for the Pul/Dir and the calibration are all from the 5V pin on the Arduino. I didn’t want to disrupt all of that logic, I just didn’t want another cable plugging into the already cramped Pi Zero W.

    Zach Allen
    Dec 31, 2018

    I’m not familiar with the Due; for this application, what are the benefits over the mega?

    Chris Annin
    Jan 1, 2019

    its nearly the same board with much faster processor - it uses an ARM processor instead of AVR so it runs at 3.3v which is a pain since most stepper drivers are 5v.

    Zach Allen
    Jan 1, 2019

    Gotcha. Yeah, 12 step-ups for the pul/dir doesn’t sound like a great thing.

    0
    Víctor Manuel Castañares Martín
    Feb 4, 2019

    Could you load the arduino mega skecth directly into the arduino Due or do you have to make a new sketch? To be able to excite the drivers, since the drivers of the AR2 are excited with 4v minimum, could be used for example DRV8825 drivers, which reach up to 2.5A and use 3.3V as well, or could optocouplers such as 6N136 be used to make Relay between the Due to 3.3 and the drivers to 5v? The truth is that using a Due, the movements would be more fluid, as happens with the Delta type printers, the 8-bit arduino are a bit short in calculation speed to interpolate the axes.

    0
    Chris Annin
    Feb 4, 2019

    @Víctor Manuel Castañares Martín yes you can load the sketch to the due but as you point out you would have to use 8825 drivers or Gecko drives.

    0
    Load more replies
    Zach Allen
    Jan 1, 2019

    I've never used GitHub before, so I'm still trying to learn how it all works. But I made a fork of the AR2 project and uploaded the board Gerber files as well as images of the board layout:

    https://github.com/AllenPrototype/AR2


    I ordered my boards through JLCPCB.com, and got 10 boards for $20 shipped to Ohio, USA.


    If anyone has any questions, let me know!

    Zach Allen
    Jan 4, 2019

    Update on the RPi AR2 controller... I’m planning to test with the robot today, and if all works I’ll put together a tutorial.

    Zach Allen
    Jan 4, 2019

    I got it wired up and it works! I’m ecstatic. I tried to upload a video to YouTube, but there was an error. I’ll try again later. @Chris Annin, I’ll get to work on the how-to

    Chris Annin
    Jan 4, 2019

    that sounds great. thank you.

    0
    Zach Allen
    Mar 20, 2019

    Hi, Everyone!


    I haven't posted in a while, but if anyone is following this and is wondering about how to get the software to work on their Raspberry Pi, @Chris Annin pulled my code/documentation into his repository: https://github.com/Chris-Annin/AR2/tree/master/RaspberryPi


    Updates:


    I'm still working through my somewhat-modified 3D printed AR2 robot, but have recently shifted focus to the stepper drivers. In @Max Favre's build log, we discussed using Trinamic's motion control drivers for the stepper motors. There's a product on the market called SlushEngine, which is an open-source project by Roboteurs - you can check out their website and GitHub repo here: https://roboteurs.com/, https://github.com/Roboteurs/slushengine. This product seems like a great option, but at a pretty steep price, especially compared to the drivers @Chris Annin picked from StepperOnline.


    I'm working on making a driver system similar to the SlushEngine, but with TMC5160 drivers by Trinamic. They offer a lot of impressive functionality, but I won't go into all of that in this post. They offer a small form-factor, as well as high amp-per phase current. Additionally, they offer 256 microsteps per step, which gives them very smooth and precise operation. One of the best selling points for this application, which the SlushEngine also offers, is direct positioning. As in, the motion controller is built into the chip, and you only have to give it a position command and it does all the hard work internally. That means no step-direction, no Arduino required, and no real-time OS (e.g. RPi Raspbian OS).


    I've modified the SlushEngine project for the TMC5160s, but it's very much a work in progress. It works entirely (and exclusively) on the Raspberry Pi, which aligns with my goal for the project - drive the AR2 with only a Raspberry Pi, preferably the $5 RPi Zero W. My milestone tonight was getting the library at a point where a very short Python script would make the motor run 5 rotations (arbitrarily picked) back and forth.


    While I want to tap into the functionality of the drivers more, I'm going to start a parallel path of adapting my already published RPi code with this new driver. Overall I think the AR2 software, written in Python, will work great with these drivers. The drivers have inputs for limit switches, so the home position can be recorded by the driver. This should greatly simplify the homing scheme.


    One of the trickiest parts I believe I will deal with is syncing all the motors. Meaning getting all the motors to run the same amount of time, regardless of how many steps they have to take. There's no problem getting them all to start at the same time but for precise and complex motions, having some sort of CNC-esque logic will make this a lot better.


    Overall, I'm quite impressed by these drivers, and hopefully I can get this library matured and integrate it into the AR2 software quickly.


    Another important piece of the pie is obviously the driver circuit board. Now that I have a working prototype with Trinamic's pre-built breakout board, I will begin to tackle designing the PCB, sourcing the parts, and assembling it all. I'm not sure the price-point will get below the StepperOnline drivers, but it will hopefully be cheaper than the SlushEngine.


    Since I'm building off the SlushEngine project, instead with Trinamic's famed silent stepper drivers, I'm calling the project "ShushEngine". I'm bad at coming up with names, so let me know if anyone has any better ideas. You can find my GitHub repo where I'll be constantly updating the code at: https://github.com/ZJAllen/ShushEngine


    Here's a quick video showing the motor spinning with the code written behind it.


    matthew flego
    Mar 20, 2019

    ShushEngine is super cool. I remember that you mentioned somewhere in the forum that you dev in eagle. Do I have that Correct? Would love to help work on this with you If you need / want a contributor. Please DM me at some point. Regardless I’d love to do a hangouts session with @Julian Holcroftyou and @Max Favre. Also, so glad your tackling this project; excellent contribution and very excited for this development.

    0
    Zach Allen
    Mar 20, 2019

    @matthew flego I made the Arduino shield in Eagle, but will probably move all future work to Kicad. I’ve never used Kicad, but hopefully I can pick it up quickly. The reason for the switch is the free version of Eagle limits to 80x100 mm (hopefully I remembered that that correctly) and the ShushEngine board will need to be larger than that.

    0
    matthew flego
    Mar 20, 2019

    @Zach Allen makes sense to me. I have the oportunity to learn KI CAD shortly through a makerspace in town. we’ll see what happens. Are you farmilliar with CAElinux?

    0
    Zach Allen
    Mar 21, 2019

    Another part of the project in the works...


    Víctor Manuel Castañares Martín
    Mar 29, 2019

    Wow, you're doing a huge job.

    My English is not very good, there are things that I have not understood well. With your Shusengine, what do you do is load the arduino control into a RPi? Do you eliminate arduino from the control part, as well as the drivers that Chriss uses in your project, no? I was talking to him about the possibility of using Arduino Due 32 bits and tmc drivers like those used in 3d printers. With the Shusengine theme, when loading the control in the RPi, would you also load the Chris control software for PC in the same RPi or should you continue using a PC to control the AR2?

    I'm waiting to start the construction of AR2 printed on PET-G too, you had to give horizontal expansion (I use CURA) to improve the tolerances of the bearings? Greetings and great work! I look forward to your progress.

    0
    Zach Allen
    Mar 29, 2019

    Hi! Thanks for checking out my post. I’ll try to clarify some of your questions about the ShushEngine. Currently, it’s very much a work in progress - it is not yet ready to be used with the AR2 software. As the ShushEngine code is written, it is set up to run only on the RPi. However, it could be modified to work on the Arduino, since both RPi and Arduino have SPI communication. My goal, however, is to eliminate the Arduino, and incorporate the ShushEngine library into Chris’s AR2 software exclusively on the RPi.


    I have modified Chris’s program to work on the RPi, and that is in a separate folder in Chris’s GitHub repository.


    The current program Chris wrote is configured for a Step/Dir command to the drivers, which requires a real-time-clock, like on the Arduino - the Pi does not have that. The advantage of the Arduino Due is that it has a faster clock speed, so the Step/Dir commands can be faster (at least that’s how I understand it). The Trinamic drivers can use Step/Dir, but I’m taking advantage of the their built-in motion controller - only a position (in microsteps) is required.


    I didn’t need to scale anything when 3D printing - all of the bearings fit great. But pending on your printer you may need to make some tweaks. Maybe do some test prints to check the fit before doing the full print.


    Hopefully that clarifies your question, but let me know if you have other questions!

    0
    Víctor Manuel Castañares Martín
    Mar 29, 2019

    @Zach Allen

    The downside of Arduino is that it is mono thread (I do not know if it is well said in English). That it can not do two things at once, and its processing capacity is limited since it is a microcontroller, not a microprocessor. The idea of ​​the RPi is very good, what I do not know is if it will be able to work and manage the control of the engines and the directions and at the same time execute the python control software. All this has a problem, and that is that you should have waited to have it all complete to teach it, since now I am very nervous and anxious to see it work that way hahaha How much filling have you put to the print of the robot parts? Best regards

    0
    Zach Allen
    Mar 29, 2019

    @Víctor Manuel Castañares Martín The advantage of the Trinamic drivers is that it doesn’t need Pi processing power. You can tell it ”go to x microsteps” and the trinamic chip worries about getting it there instead of the Pi. So the AR2 software can do what it needs to do while the drivers control the motors. That’s the idea, at least. I still have work to do implementing it.


    For most of my parts, I printed with 20% infill. I’d recommend doing all the joint pivots (onto which the needle part of the tapered bearings go) at 80-100%.

    0
    Load more replies
    Víctor Manuel Castañares Martín
    May 5, 2019

    Hello Zach, I am anxious to know how the Sush project is going!

    Mitchell Lichtenberg
    May 18, 2019

    Wow, so nice. The RPi + Arduino looks like a great combination. I'm thinking of a carrier board too (just posted in my build) but this is clearly a good way to go.


    Did you have to do lots of filtering on your buck converters? I'm always a little leary of powering stuff off the same supply as the steppers (I've fought with this on my home CNC machine), finally ended up with a separate logic supply. The AR2 has much smaller steppers, perhaps there is less to worry about.


    You got me thinking; I should consider putting a RPi on my carrier too :-)


    /Mitch.


    0
    Zach Allen
    Aug 14, 2019

    Alright friends, sorry for the long radio silence. Just wanted to give a quick update...


    While I’m still in the process of developing the ShushEngine, I’ve got a revised driver board/Arduino shield I want to try out. This picture is pretty low-res, but maybe you’ll be able to pick up on a couple things.


    It uses the TMC5160 SilentStepStick breakout boards, which still uses Step/Dir. So it should still work with Chris’s original software! Next, I’ve got a jumper toward the top of the board, which allows you to pick “MEGA” or “DUE”. That’s right, I’m going to try to make it work with the DUE. I’m not 100% sure it'll work, because I’ve never used a DUE, but I’ll give it a shot. The jumper basically selects between 3.3V and 5V logic. The TMC5160s can work with either. And the board keeps the 3”x100mm size from the last version (not sure why I mixed units on it, but whatever). I’ll keep everyone posted on how this works. If it does, it’ll save a TON of space.

    0
    Zach Allen
    Aug 21, 2019

    I got the boards in yesterday and started assembling them tonight. There are some tight fits, which I’ll address in the next version. All of the drivers are mounted, the 2 buck converters are on the back (nested between the board and the Arduino), and I made a custom USB-B to micro-USB cable to jump between the Pi and the Arduino. I‘ll have to finish assembly and then test it out another day. Stay tuned!

    0
    janos.bujtar
    Oct 8, 2019

    Hi Zach,


    Thank you very much for porting the program to RPI.


    I just tried to use your version of the control software, but I have an issue:

    when I want to calibrate one axis at a time (J1 for example) then the axis moves to limit switch, then waits for something forever. Running the AR2.py from console and hitting Ctrl +C I see that at line nr. 962 (calvalue = ser.readline()) is the last line executed.


    I can move axes on "Main Controls" tab without problems

    Also, no issues when I use the program from Windows.


    Do you have any ideas, what could cause that behaviour


    BTW, I had to change the serial speed in the RPI version to 115200, because that's the default speed of Arduino.


    Best regards: Janos




    0