Introduction
Want to make your CupCake even more awesome? Then why not make it wireless! Be the first on your block to have a Bluetooth enabled factory and say goodbye to wires. :)
(Note: With this mod, you will be able to wirelessly use the control panel, start/stop builds, etc, but you must do your actual builds from SD card as there is too much latency to print via Bluetooth.)
Tools
So to get started, here are all the tools you'll need:
- 1 CupCake CNC (Gen3 Electronics)
- Wire Cutters
- Wire Strippers
- Jumper Wire
- Soldering iron with your favorite solder
- Break Away Female Headers
- Bluetooth Mate
The Bluetooth Mate and the Break Away Female Headers can be purchased from SparkFun. Buying both of those parts will cost you about $66. Not too bad to make your bot wireless. :)
Now that we have the parts list out of the way, let's begin! (evil scientist laugh here)
Remove the RepRap Motherboard
First, let's disconnect the RepRap motherboard and take it off the bot.
- Start pulling the connectors off
- Carefully unbolt the board
- Done!
Bluetooth Mate Connector
Now that the RepRap motherboard is off, let's get to making our connector for the Bluetooth Mate.
Get out the female headers and your clippers and cut a 6 pin header off.
- The tools for this step
- Snip 6 pins off
When you're finished it should look like this.
Heat up the soldering iron and get ready to now solder the 6 pin header to the Bluetooth Mate.
When soldering on the connector the orientation should look like the picture below. The female inserts are on the side of the PCB where you see the little Bluetooth module.
Now that we have the right orientation, let's solder those pins!
Great! Now that the Bluetooth Mate is all ready to go, it's time to work on getting the RepRap board ready. Since the serial connection on the motherboard isn't providing VCC to power the module, we're going to connect the VCC and GND pins on the serial connector to the free VCC and GND pins on the RepRap board.
Modify RepRap Motherboard
(Note: Once you have made this modification, do not try to use your USB serial cable without disconnecting the red VCC wire first. In theory, it might be okay, but if one of your regulators is off by a hair, bad things could happen.)
Cut two wires about 11cm in length and strip both of the ends.
Take the RepRap board and flip it over. Solder the red wire into the VCC hole and the black wire onto the GND hole located right under the ribbon connectors for the stepper motors (only the red wire is necessary, the black ground wire is optional). Here's a picture to help show what's going on.
Once you have those soldered on, take the other ends and connect them to the VCC and GND of the serial connector. Here's a picture to show where they should go.
This is what it should look like when you're done.
Now that we have our RepRap motherboard and Bluetooth Mate ready to go, let's connect them together and then put the RepRap board back onto the bot.
Connect Everything Back Up
Sweet! Our little CupCake is now super fly. :) Now take a quick break because we're all most finished. The next thing we have to do is get the Bluetooth Mate talking to the computer and then getting ReplicatorG able to connect to it. I'll go over how to set this up for Mac and Windows computers.
Setup Bluetooth Mate and ReplicatorG on a Mac
To get your Mac talking to the Bluetooth Mate, first turn on your CupCake so the Bluetooth board is powered. Then go to System Preferences.
Once there, click on the Bluetooth icon.
On this menu click on the + button on the left to setup a new device.
After a few seconds your computer should locate the Bluetooth module and it will be named FireFly-DC9A.
Once you've selected the device, click continue. It will now try to pair but will probably come back with an message saying it was unsuccessful. No worries. From here click on Passcode Options.
On this dialog, select "Use a specific passcode" and type in 1234 in the input box next to it.
After clicking ok, it should successfully pair. Your computer is now talking to the Bluetooth module! :)
Now that the computer is talking to the Bluetooth Mate, we need to slow its baud rate down a bit so that the RepRap motherboard can successfully communicate with it. By default the Bluetooth module is set at a baud rate of 115200. We need it running at 38400.
So to do this, open up a brand new terminal window. Now before we start typing anything, there's something I should point out. In order for us to change the baud rate we need to put the Bluetooth Mate into command mode first. This can only be done within 60 seconds of when the module is first powered. So we'll go ahead and get our terminal window ready with what we're going to type and then we'll reset the CupCake.
In the terminal window type: screen /dev/tty.FireFly-DC9A-SPP
Now before you press enter, reset your CupCake. Once you've done that, quickly press enter once the machine has powered back on. You may not be able to connect the first few times so keep trying until your 60 seconds is up. To know if you have successfully connected, a little green LED should be light on the Bluetooth Mate.
Once you're in and connected, type $$$. The Bluetooth module should respond with CMD.
If you get no response, you might have lost your 60 second window of opportunity. If so, exit Screen by pressing Control-a and then Control-\ and then try the above steps again.
Great, so now we are in command mode. We don't need to worry about time limits anymore. :) From here, go ahead and press 'd' then 'enter'. A bunch of information should be displayed on your screen about the device.
Now let's change the baud rate. Type in SU,38 and then press enter. The module should respond back with an AOK. If you get an ERR response, make sure you typed it in correctly.
Guess what? We're now done with the Bluetooth mate! It's now ready to communicate with the CupCake. From here, type '- - -' to exit out of command mode and then press Control-a and then Control-\ to exit Screen.
Go ahead and reset your CupCake so the new changes will take effect on the Bluetooth Mate. Fire up ReplicatorG and go into Machine > Serial Port.
You should see /dev/tty.FireFly-DC9A-SPP as an option. Click on it and you should then be connected! If it's not connecting, it sometimes takes a few times for it to finally work. After you get it to successfully connect, ReplicatorG connects to it really fast.
Setup Bluetooth Mate and ReplicatorG on a PC
To get your Windows PC talking to the Bluetooth Mate, first turn on your CupCake so the Bluetooth board is powered. Then click on Start > Settings > Control Panel.
Once there, click on Bluetooth Devices.
On this dialog click Add Wireless Device to setup a new device.
After a few seconds your computer should locate the Bluetooth module and it will be named FireFly-DC9A.
Once you've selected the device, click next. It will now ask you to select a pairing option. Choose "Enter the device's paring code".
On this dialog, type in 1234 and then click Next.
After clicking Next it should successfully pair. Your computer is now talking to the Bluetooth module! :) If windows is showing an error that it couldn't pair successfully, try it again. It took me a couple of times before it worked.
Once you're done adding the device, you should see the Bluetooth Devices menu again and in the list you should see our newly added device. Double clikc on it and then select the Services tab. Make sure SPP is checked and take note of the COM port number. On my computer it was 3. You can close all of these windows.
Now that the computer is talking to the Bluetooth Mate, we need to slow its baud rate down a bit so that the RepRap motherboard can successfully communicate with it. By default the Bluetooth module is set at a baud rate of 115200. We need it running at 38400.
So to do this, we're going to use Putty to configure it. Putty is a free telnet client that is great for communicating with serial devices. Download it here. Before we start using Putty, there's something I should point out. In order for us to change the baud rate we need to put the Bluetooth Mate into command mode first. This can only be done within 60 seconds of when the module is first powered. So we'll go ahead and get Putty ready and then we'll reset the CupCake.
In Putty, select the Session category on the left and then click the Serial radio button under connection type. From here, type in COM3, or whatever your Bluetooth COM port number is, and then type 115200 in the Speed text box.
Now before you click Open, reset your CupCake. Once you've done that, quickly click the Open button when the machine has powered back on. To know if you have succesfully connected, a little green LED should be light on the Bluetooth Mate.
Once you're in and connected, type $$$. The Bluetooth module should respond with CMD.
If you get no response, you might have lost your 60 second window of opportunity. If so, exit Putty and then try the above steps again.
Great, so now we are in command mode. We don't need to worry about time limits anymore. :) From here, go ahead and press 'd' then 'enter'. A bunch of information should be displayed on your screen about the device.
Now let's change the baud rate. Type in SU,38 and then press enter. The module should respond back with an AOK. If you get an ERR response, make sure you typed it in correctly.
Guess what? We're now done with the Bluetooth mate! It's now ready to communicate with the CupCake. From here, type '- - -' to exit out of command mode and then close Putty.
Go ahead and reset your CupCake so that the new changes will take effect on the Bluetooth mate. Fire up ReplicatorG and go into Machine > Serial Port.
You should see your Bluetooth COM port as an option and in my case it is COM3. Click on it and you should then be connected! If it's not connecting, it sometimes takes a few times for it to finally work. After you get it to successfully connect, ReplicatorG connects to it really fast.
It's Over!
Well that's it. Hopefully this little tutorial helped get your CupCake talking wirelessly. Living in the future is awesome! :)