Saturday 26 April 2014

BeagleBone Black Linuxcnc with RAMPS 1.4 (part 1)

Recently I saw a news about using BBB connect to RAMPS-FD with LinuxCNC,  But problem is the RAMPS-FD is  still expensive compare to RAMPS 1.4.   I say to myself, why not just use RAMPS?


The first thing I do is to look for way to make RAMPS compatible with 3.3v (not sure why I did it, seem like BBB does have 5v tolerance).  There is a detail discussion on how to convert 5v version of RAMPS to 3.3v for Arduino DUE in the Deltabot forum, it very simple hack, basically remove 5v connection from the RAMPS board, and reconnect all of the to 3.3v, then replace the MOSFET that support 5V to 3V input.   Detail of modification could be found here.

I did some cost cutting by replacing PSMN1R1-30L with IRLB8743PBF, it $3.5 vs $1.20, else everything is the same as discuss in the forum. Here is the picture where I remove the MOSFET:


The problem is how to connect BBB to RAMPS, the original design is to RAMPS-FD, and try find a diagram that show the pinout of RAMPS connection to Mega, and I can't!!  It seem like there is no pinout information.  After a lot of googling.... I give up and create the diagram myself.


With that. all I have to do to connect the board with BBB, which I will update in my part 2 of my BBB to RAMPS 1.4 adventure.  Here is the finish board waiting to be connected.



Sunday 6 April 2014

How to get EusLisp compile in Macosx

I was reading about robotic IDE and found this very interesting Japanese robotic development environment call EusLisp.  As usual I just want to play with it.  But it not easy to find information on how to install, seem like it not really popular outside of Japan.



OK.  Here is the step to get it compile:

1) Download the file:

  •      I use this command to get the file from svn, and it base on Trunk R671:
     svn checkout svn://svn.code.sf.net/p/euslisp/code/trunk euslisp-code     
  •      then cd to the lisp directory once it finish downloading:
     cd euslisp-code/EusLisp

     You can checkout the README file included in lisp directory for detail on how to install.. or continue with my description...

2) Setup make/compile environment variable:

  •     In the terminal.  Type in this in the terminal, make sure you are in csh (type csh in terminal to make it c-shell).

   setenv MACHINE x86_64   
   setenv EUSDIR $PWD
   setenv XLIB /usr/X11R6/lib
   setenv PUBBINDIR /usr/local/bin
   cd lisp

3) Edit the makefile and compile file for MacOSX:


  • First link the Makefile.Darwin to Makefile:

    ln -s Makefile.Darwin Makefile
  • update X11 library path to Mac path, I use vi to replace path:
    vi Makefile.Darwin
  • Inside VI run this command to replace the X11 path, original file point to /opt/X11 but in Mac, it in /usr/X11R6:
    :%s/\/opt\/X11/\/usr\/X11R6/g
    :wq
  • Next fix the wrong compile flag in comp/comp.l, it should be -falign-functions but instead it set to -malign-functions :
    vi comp/comp.l

  • Inside VI run this command to replace the error flag:

    :%s/-malign-functions/-falign-functions/g
    :wq

4) Build
    
     make all

Now you can try the build by running this command:

$EUSDIR/Darwin/bin/eusgl


If run successful, you will see this screen in you terminal.



JSK EusLisp have better demo, and the step to fix the build problem is the same.  Include is the JSK EusLisp demo:

Particle Demo




IRT Viewer Demo
Hand Grasp IK Demo