Adding 802.11 wireless networking to your ShapeOko is easy thanks to the really neat RN-VX WiFly module
For those of you who might have tried this using Xbee’s fear not, this mod really works, what’s more its cheaper and you get the benefit of controlling your ShapeOko from all your PC’s etc. and LESS WIRES
I choose the Arduino Wireless Proto Shield to mate the RN-Vx to the Uno, this shield is nice as it has a switch that allows you to choose the communications setting to the Uno, either via the WiFly or from the USB port. It also has a small prototyping area that I used to create a 12V power supply to the Uno, I did this using a LM7812 that I had, it works fine without getting hot
One of the concerns I had is that the Wireless Proto Shield does not have an IOREF pin, I held the PCB to the light and could see there were no traces where the pin would go, so I simply drilled a hole through the PCB and extended the IOREF pin on the Grbl Shield to reach the Uno, I am not sure if I could have left it floating.
I was unable to easily source a WiFly with a SMA connector so I modified the “Wire antenna” version and attached a antenna from an old router. In my first version I simply used the wire antenna this worked well, however I recently had a glitch and decided to add the antenna, my thoughts were this would remove the shielding effect of the steel carriage plate, and to possibly distance the RF from the servo drivers.
Now that you have seen the pictures, its time to get down to the steps needed to make this work. The first step you need to do BEFORE assembly is to configure the RX-VN WiFly module. I did this by connection the WiFly to a generic XBee Explorer Dongle. Since I primarily use Linux I choose to use miniterm and telnet to test and configure the WiFly. On Windows I think that RealTerm might be a good choice since you should be able to talk to both ends of the wiFly module.
The setup of the WiFly module is comprehensively covered in the documentation from Microchip, in my case I use a DHCP server so I choose that config. The most important setting of all is set sys printlvl 0 this should probably be the last setting you do before the final save as you probably want to see debug messages when setting up whilst GRBL does not.
My settings were ..
- set ip dhcp 1
- set wlan auth 8
- set wlan join 1
- set wlan passphrase guess
- set wlan ssid openssid
- set sys printlvl 0
As I mentioned earlier I suggest you don’t set printlvl to zero until you are sure your module is working. If all settings are correct you can use reboot in the serial terminal and you should see all your connection information. You can then use telnet shapeoko 2000 and should be able to type messages between the serial terminal and the telnet session. The last step would be to set the printlvl to zero and save the config again. Your WiFly is now ready to be connected to the ShapeOko.
In a perfect world software would be written to access any communications device in our world most of the GRBL streaming solutions assume a TTY (serial) port, this is true for Universal GCode sender and GrblHoming. To talk to the ShapeOko we need a TCP<->Serial virtual port. On Linux this is easily done via socat, I have created a shell script that contains
sudo socat pty,link=/dev/ttyS4,raw,echo=0,group=dialout,perm=0660 tcp:shapeoko:2000
On Windows I have successfully used com0com, I setup COM2 to be paired with CNCB0 then I used the hub4com utility as follows
com2tcp-rfc2217 \\.\CNCB0 shapeoko 2000
Roving Networks appears to have been acquired by Microchip so you may find that links from your shield suppliers are no longer valid, I can not find the Microchip link to the WiFly hence the use of Sparkfun link.