MakerCarve is a Shapeoko 2 compatible machine with some modification listed bellow:
1. Mechanical Kit
A. Tapped SlideSlot aluminium rail extrusions are used instead of MakerSlide
B. All plates are made of aluminium
C. End plates are 5mm in thickness to increase stiffness
D. 2020 aluminium extrusions are 527mm in length
2. Electronic Kit
A. The grblShield is replaced by CNC Shield
B. Belt locking torsion springs are used
3. Software
A. GRBL Controller (G-Code Sender) is preferred to Universal-G-Code-Sender
To enable MakerCarve function well, the Arduino Uno R3 must be uploaded with grbl firmware (hex file) and properly configured. To upload grbl hex file, XLoader is used.
A. GRBL Homepage
B. Quick GRBL (Arduino G-Code Interpreter) Setup Guide For Windows
C. GRBL Configuration Page
To assembly, methods and tools used in Shapeoko Rebuild are recommended.
To engrave or to carve, the free open source F-Engrave is used.
2015/04/24
MakerCarve - A Shapeoko 2 Compatible CNC Router/Carving/Engraving Machine
Labels:
2,
Carve,
Carving,
CNC,
Compatible,
Engrave,
Engraving,
GRBL,
GRBL Controller,
Machine,
MakerCarve,
router,
Shapeoko,
Shield,
Universal-G-Code-Sender,
XLoader
2015/04/21
SlideSlot - An Aluminium Extrusion Combines MakerSlide And V-Slot As An Alternative To The Rail On Shapeoko 2
SlideSlot is an Aluminium Extrusion Combines MakerSlide and V-Slot, Both wheels used on MakerSlide and V-Slot can be used on SlideSlot.
The section and dimension of SlideSlot Aluminium Extrusion is illustrated below:
Here's the photo:
For fastening belt on MakerSlide based camera slider (dolly) or Shapeoko CNC router, M5 flat (thin) hex nut is used in the v-grooved rail. On the long side of the section, M5 hex nut is used for fastening.
The section and dimension of SlideSlot Aluminium Extrusion is illustrated below:
Here's the photo:
For fastening belt on MakerSlide based camera slider (dolly) or Shapeoko CNC router, M5 flat (thin) hex nut is used in the v-grooved rail. On the long side of the section, M5 hex nut is used for fastening.
Labels:
Alternative,
Alternatives,
Aluminium,
Camera,
CNC,
Dolly,
Extrusion,
MakerSlide,
Rail,
Shapeoko,
Shapeoko 2,
Slider,
SlideSlot,
V-Groov,
V-Grooved,
V-Slot
2015/04/19
Shapeoko 2 Parts List
This is a memorandum about parts use in Shapeoko 2 (Out of Production). Inventables now sales Shapeoko 2 compatible X-Carve and Shapeoko sales Shapeoko 3.
1. Packing List (Included in the Full Kit Received)
2. Mechanical Kit
3. Full Kit
1. Packing List (Included in the Full Kit Received)
2. Mechanical Kit
3. Full Kit
Labels:
Electronics,
Full,
Inventables,
Kit,
List,
Mechanical,
Packing,
Parts,
Shapeoko,
X-Carve
2015/04/17
Shapeoko 2 Quick Assembly Notes
I have bought and assembled a set of Shapeoko 2 kit. This is a memorandum for quick assembly.
Update: If you follow linked diagram to assembly MakerCarve, it's better to have the parts list of MakerCarve (posted on April 26, 2015) at hand to make sure which parts used in shapeoko 2 have been changed. As the MakerSlide is replaced with SlideSlot, the T-Nuts are changed to M5 flats nut and M5 nuts respectively.
0. Electronics Wiring
http://docs.shapeoko.com/content/sketches/electronics_layout.svg
1. V-Wheel Assembly
http://docs.shapeoko.com/content/tPictures/25203-02-100.svg
2. Idler Assembly
http://docs.shapeoko.com/content/tPictures/25197-02-100.svg
3. Motor Mount Carriage Assembly
http://docs.shapeoko.com/content/tPictures/PS20022-100.svg
4. Z-Axis Carriage Assembly
http://docs.shapeoko.com/content/tPictures/PS20021-100.svg
5. Spindle Carriage Assembly
http://docs.shapeoko.com/content/tPictures/PS20029-100.svg
Update: For delrin lead nut installation, follow the film on youtub 10:18 - 12:26.
6. Z-Axis Rail Assembly
http://docs.shapeoko.com/content/tPictures/PS20028-100.svg
7. Z-Axis Sub Assembly
http://docs.shapeoko.com/content/tPictures/PS20030-100.svg
8. Sub Gantry Assembly
http://docs.shapeoko.com/content/tPictures/PS20031-100.svg
9. X-Axis Assembly
http://docs.shapeoko.com/content/tPictures/PS20023-100.svg
10. Complete Gantry View
http://docs.shapeoko.com/content/tPictures/PS20025_16.png
11. Y-Axis Assembly
http://docs.shapeoko.com/content/tPictures/PS20026-100.svg
12. Work Area Assembly
http://docs.shapeoko.com/content/tPictures/PS20024-100.svg
13. Frame Assembly
http://docs.shapeoko.com/content/tPictures/Shapeoko_2_16.png
Update: If you follow linked diagram to assembly MakerCarve, it's better to have the parts list of MakerCarve (posted on April 26, 2015) at hand to make sure which parts used in shapeoko 2 have been changed. As the MakerSlide is replaced with SlideSlot, the T-Nuts are changed to M5 flats nut and M5 nuts respectively.
0. Electronics Wiring
http://docs.shapeoko.com/content/sketches/electronics_layout.svg
1. V-Wheel Assembly
http://docs.shapeoko.com/content/tPictures/25203-02-100.svg
2. Idler Assembly
http://docs.shapeoko.com/content/tPictures/25197-02-100.svg
3. Motor Mount Carriage Assembly
http://docs.shapeoko.com/content/tPictures/PS20022-100.svg
4. Z-Axis Carriage Assembly
http://docs.shapeoko.com/content/tPictures/PS20021-100.svg
5. Spindle Carriage Assembly
http://docs.shapeoko.com/content/tPictures/PS20029-100.svg
Update: For delrin lead nut installation, follow the film on youtub 10:18 - 12:26.
6. Z-Axis Rail Assembly
http://docs.shapeoko.com/content/tPictures/PS20028-100.svg
7. Z-Axis Sub Assembly
http://docs.shapeoko.com/content/tPictures/PS20030-100.svg
8. Sub Gantry Assembly
http://docs.shapeoko.com/content/tPictures/PS20031-100.svg
9. X-Axis Assembly
http://docs.shapeoko.com/content/tPictures/PS20023-100.svg
10. Complete Gantry View
http://docs.shapeoko.com/content/tPictures/PS20025_16.png
11. Y-Axis Assembly
http://docs.shapeoko.com/content/tPictures/PS20026-100.svg
12. Work Area Assembly
http://docs.shapeoko.com/content/tPictures/PS20024-100.svg
13. Frame Assembly
http://docs.shapeoko.com/content/tPictures/Shapeoko_2_16.png
2014/11/09
Arduino RF Wireless Message Display Using I2C LCD Keypad Shield
The function of this sketch is same as the sketch posted on May. 11, 2014, but using I2C LCD Keypad Shield as the output device.
Sketch
/*
SimpleReceiveI2CLCD
This sketch displays text strings received using VirtualWire
Connect the Receiver data pin to Arduino pin 11
Modified by Befun Hung on Nov. 09, 2014
Use I2C LCD Keypad Shield as the output
*/
#include <VirtualWire.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// #define BACKLIGHT_PIN 13
LiquidCrystal_I2C lcd(0x20); //Set the LCD I2C address
// LiquidCrystal_I2C lcd(0x38, BACKLIGHT_PIN, POSITIVE);
byte message[VW_MAX_MESSAGE_LEN]; // a buffer to store the incoming messages
byte messageLength = VW_MAX_MESSAGE_LEN; // the size of the message
unsigned long counter = 1;
void setup()
{
// pinMode(BACKLIGHT_PIN, OUTPUT);
// digitalWrite(BACKLIGHT_PIN, HIGH);
// set up the LCD's number of columns and rows:
lcd.begin(16, 2); //initialize the lcd
// Print a message to the LCD.
lcd.home(); //go home
lcd.print("Device is ready!");
//
Serial.begin(9600);
Serial.println("Device is ready");
// Initialize the IO and ISR
vw_setup(2000); // Bits per sec
vw_rx_start(); // Start the receiver
}
void loop()
{
if (vw_get_message(message, &messageLength)) // Non-blocking
{
lcd.clear();
Serial.print(counter);
Serial.print(": ");
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 0);
lcd.print(counter);
lcd.print(":");
lcd.setCursor(0,1);
for (int i = 0; i < messageLength; i++)
{
Serial.write(message[i]);
lcd.print(char(message[i]));
}
Serial.println();
counter++;
}
}
Sketch
/*
SimpleReceiveI2CLCD
This sketch displays text strings received using VirtualWire
Connect the Receiver data pin to Arduino pin 11
Modified by Befun Hung on Nov. 09, 2014
Use I2C LCD Keypad Shield as the output
*/
#include <VirtualWire.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// #define BACKLIGHT_PIN 13
LiquidCrystal_I2C lcd(0x20); //Set the LCD I2C address
// LiquidCrystal_I2C lcd(0x38, BACKLIGHT_PIN, POSITIVE);
byte message[VW_MAX_MESSAGE_LEN]; // a buffer to store the incoming messages
byte messageLength = VW_MAX_MESSAGE_LEN; // the size of the message
unsigned long counter = 1;
void setup()
{
// pinMode(BACKLIGHT_PIN, OUTPUT);
// digitalWrite(BACKLIGHT_PIN, HIGH);
// set up the LCD's number of columns and rows:
lcd.begin(16, 2); //initialize the lcd
// Print a message to the LCD.
lcd.home(); //go home
lcd.print("Device is ready!");
//
Serial.begin(9600);
Serial.println("Device is ready");
// Initialize the IO and ISR
vw_setup(2000); // Bits per sec
vw_rx_start(); // Start the receiver
}
void loop()
{
if (vw_get_message(message, &messageLength)) // Non-blocking
{
lcd.clear();
Serial.print(counter);
Serial.print(": ");
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 0);
lcd.print(counter);
lcd.print(":");
lcd.setCursor(0,1);
for (int i = 0; i < messageLength; i++)
{
Serial.write(message[i]);
lcd.print(char(message[i]));
}
Serial.println();
counter++;
}
}
2014/10/29
Arduino Sketch for Address Settable RF Wireless Power Supply Socket/Switch
Updated Sketch (Nov. 15,2014)
// Released by abocanegra on Dec. 11, 2009 using 4 pins, "DIP Switch 8 Position to Address Sensor" in Arduino Forum
// This sketch uses VirtualWire
// Connect the Receiver data pin to Arduino pin 11
// Modified by Befun Hung on Nov. 14, 2014 by combining sketches on May. 11, 2014 (Arduino RF Wireless Message Display)
// and Jul. 30, 2014 (Use DIP Switch To Set Arduino Device Net ID And Node ID for Wireless Communication - Updated Sketch)
// and removing LCD Keypad Shield display function as a new sketch for Arduino addressable RF wireless power supply socket
// Modified by Befun Hung on Nov. 12, 2014 to use
// 4 digital pins(D2-D5) to set node ID1 and
// 4 digital pins(D6-D9) to set node ID2 by using 10K pull-up resistors.
// Totally 8x16x16=2,048 devices can be used for wireless communication
// For practical use 8x10x10=800 devices can be controlled using digital key of 3x4 telephone keypad
// Wire and DIP switch connections from high bit to low bit are A1, A2, A3, D2, D3, D4, D5, D6, D7, D8 and D9
// A0 is reserved for analog sensor or digital sensor/actuator
// A4-A5 are reserved for I2C
// D0-D1 are reserved for RX/TX
// D13 is used for singal output
// Don't run this sketch on Arduino Pro Mini, it may reboot repeatedly owing to bootloader not supporting watchdog
#include <VirtualWire.h>
// include avr/wdt for watchdog reset
#include <avr/wdt.h>
// include <EEPROM.h> to save switch staus to EEPROM
#include <EEPROM.h>
// keys to turn switch on and off
#define keyOn '*'
#define keyOff '#'
//Create and Define Global Variables
int bits=4, netID, nodeID1, nodeID2;
int dipNet[] = {15, 16, 17}; // DIP Switch Pins for Net ID
int dipNode1[] = {2, 3, 4, 5}; // DIP Switch Pins for Node ID1
int dipNode2[] = {6, 7, 8, 9}; // DIP Switch Pins for Node ID2
byte message[VW_MAX_MESSAGE_LEN]; // a buffer to store the incoming messages
byte messageLength = VW_MAX_MESSAGE_LEN; // the size of the message
unsigned long counter = 1;
// digital pin 13 connected with a 1K resistor and a LED
int led = 13;
// Address of EEPROM for saving switch status and variable to store value
int address = 5;
int value;
void setup()
{
Serial.begin(9600);
int i;
pinMode(A1, INPUT);
pinMode(A2, INPUT);
pinMode(A3, INPUT);
netID = netAddress();
// delay(100);
Serial.print("Net ID: ");
Serial.println(netID);
for(i = 0; i<bits; i++){
pinMode(dipNode1[i], INPUT); // sets the digital pin 2-5 as input
}
nodeID1 = node1Address(bits);
// delay(100);
Serial.print("Node ID1: ");
Serial.println(nodeID1);
for(i = 0; i<bits; i++){
pinMode(dipNode2[i], INPUT); // sets the digital pin 2-5 as input
}
nodeID2 = node2Address(bits);
// delay(100);
Serial.print("Node ID2: ");
Serial.println(nodeID2);
Serial.println("Device is ready");
// Initialize the IO and ISR
vw_setup(2000); // Bits per sec
vw_rx_start(); // Start the receiver
//initialize the digital 13 pin as output
pinMode(led, OUTPUT);
// When the receiver is unstable and reboot, reading stored status from EEPROM
value = EEPROM.read(address);
if (value == '1')
{
digitalWrite(led, HIGH);
}
if (value == '0')
{
digitalWrite(led, LOW);
}
}
void loop()
{
if (vw_get_message(message, &messageLength)) // Non-blocking
{
Serial.print(counter);
Serial.print(": ");
for (int i = 0; i < messageLength; i++)
{
Serial.write(message[i]);
}
// if length of received message is less than transmitter sent meaning the receiver is unstable
if (messageLength < 4)
{
software_Reboot();
}
else
{
// netID and nodeID are numbers and message is charactor array, so convention is required
if ((message[0] == (netID + '0')) && (message[1] == (nodeID1 + '0')) && (message[2] == (nodeID2 + '0')))
{
if (message[3] == keyOn)
{
digitalWrite(led, HIGH);
EEPROM.write(address, '1');
}
else
{
if (message[3] == keyOff)
{
digitalWrite(led, LOW);
EEPROM.write(address, '0');
}
}
}
}
Serial.println();
counter++;
}
}
// Software reboot function
void software_Reboot()
{
wdt_enable(WDTO_15MS);
while (1)
{
}
}
//Create Net Address from DIP Switch (3 positions used A1-A3)
byte netAddress(){
int i,j=0;
//Get the switches state
j = (j << 1) | (! digitalRead(A1)); // read the input pin
j = (j << 1) | (! digitalRead(A2)); // read the input pin
j = (j << 1) | (! digitalRead(A3)); // read the input pin
return j; //return address
}
//Create Node1 Address from DIP Switch (4 positions used D2-D5)
byte node1Address(int k){
int i,j=0;
//Get the switches state
for(i=0; i<k; i++){
j = (j << 1) | (! digitalRead(dipNode1[i])); // read the input pin
}
return j; //return address
}
//Create Node1 Address from DIP Switch (4 positions used D6-D9)
byte node2Address(int k){
int i,j=0;
//Get the switches state
for(i=0; i<k; i++){
j = (j << 1) | (! digitalRead(dipNode2[i])); // read the input pin
}
return j; //return address
}
Sketch
// Released by abocanegra on Dec. 11, 2009 using 4 pins, "DIP Switch 8 Position to Address Sensor" in Arduino Forum
// This sketch uses VirtualWire
// Connect the Receiver data pin to Arduino pin 11
// Modified by Befun Hung on Oct. 29, 2014 by combining sketches on May. 11, 2014 (Arduino RF Wireless Message Display)
// and Jul. 30, 2014 (Use DIP Switch To Set Arduino Device Net ID And Node ID for Wireless Communication)
// and removing LCD Keypad Shield display function as a new sketch for Arduino addressable RF wireless power socket
// The sketch uses 3 analog pins(A1-A3) to set net ID and 8 digital pins(D2-D9) to set node ID by using 10K pull-up resistors.
// Totally 8x256=2,048 devices can be used for wireless communication
// When using a 3x4 telephone keypad, 8x10(0-9)=80 devices can be used
// A0 is reserved for analog sensor or digital sensor/actuator
// A4-A5 are reserved for I2C
// D0-D1 are reserved for RX/TX
// D13 is used for singal output
#include <VirtualWire.h>
// include avr/wdt for watchdog reset
#include <avr/wdt.h>
// include <EEPROM.h> to save switch staus to EEPROM
#include <EEPROM.h>
// keys to turn switch on and off
#define keyOn '1'
#define keyOff '0'
//Create and Define Global Variables
int bits=8;
byte netID, nodeID;
int dipNet[] = {15, 16, 17}; //DIP Switch Pins for Net ID
int dipNode[] = {2, 3, 4, 5, 6, 7, 8, 9}; //DIP Switch Pins for Node ID
byte message[VW_MAX_MESSAGE_LEN]; // a buffer to store the incoming messages
byte messageLength = VW_MAX_MESSAGE_LEN; // the size of the message
unsigned long counter = 1;
// digital pin 13 connected with a 1K resistor and a LED
int led = 13;
// Address of EEPROM for saving switch status and variable to store value
int address = 5;
int value;
void setup()
{
Serial.begin(9600);
int i;
pinMode(A1, INPUT);
pinMode(A2, INPUT);
pinMode(A3, INPUT);
netID = netAddress();
Serial.print("Net ID: ");
Serial.println(netID);
for(i = 0; i<bits; i++){
pinMode(dipNode[i], INPUT); // sets the digital pin 2-9 as input
}
nodeID = nodeAddress(bits);
Serial.print("Node ID: ");
Serial.println(nodeID);
Serial.println("Device is ready");
// Initialize the IO and ISR
vw_setup(2000); // Bits per sec
vw_rx_start(); // Start the receiver
//initialize the digital 13 pin as output
pinMode(led, OUTPUT);
// When the receiver is unstable and reboot, reading stored status from EEPROM
value = EEPROM.read(address);
if (value == '1')
{
digitalWrite(led, HIGH);
}
if (value == '0')
{
digitalWrite(led, LOW);
}
}
void loop()
{
if (vw_get_message(message, &messageLength)) // Non-blocking
{
Serial.print(counter);
Serial.print(": ");
for (int i = 0; i < messageLength; i++)
{
Serial.write(message[i]);
}
// if length of received message is less than transmitter sent meaning the receiver is unstable
if (messageLength < 3)
{
software_Reboot();
}
else
{
// netID and nodeID are numbers and message is charactor array, so convention is required
if ((message[0] == (netID + '0')) && (message[1] == (nodeID + '0')))
{
if (message[2] == keyOn)
{
digitalWrite(led, HIGH);
EEPROM.write(address, '1');
}
else
{
if (message[2] == keyOff)
{
digitalWrite(led, LOW);
EEPROM.write(address, '0');
}
}
}
}
Serial.println();
counter++;
}
}
// Software reboot function
void software_Reboot()
{
wdt_enable(WDTO_15MS);
while (1)
{
}
}
//Create Net Address from DIP Switch (3 positions used)
byte netAddress(){
int i,j=0;
//Get the switches state
j = (j << 1) | (! digitalRead(A1)); // read the input pin
j = (j << 1) | (! digitalRead(A2)); // read the input pin
j = (j << 1) | (! digitalRead(A3)); // read the input pin
return j; //return address
}
//Create Node Address from DIP Switch (8 positions used D2 - D9)
byte nodeAddress(int k){
int i,j=0;
//Get the switches state
for(i=0; i<k; i++){
j = (j << 1) | (! digitalRead(dipNode[i])); // read the input pin
}
return j; //return address
}
// Released by abocanegra on Dec. 11, 2009 using 4 pins, "DIP Switch 8 Position to Address Sensor" in Arduino Forum
// This sketch uses VirtualWire
// Connect the Receiver data pin to Arduino pin 11
// Modified by Befun Hung on Nov. 14, 2014 by combining sketches on May. 11, 2014 (Arduino RF Wireless Message Display)
// and Jul. 30, 2014 (Use DIP Switch To Set Arduino Device Net ID And Node ID for Wireless Communication - Updated Sketch)
// and removing LCD Keypad Shield display function as a new sketch for Arduino addressable RF wireless power supply socket
// Modified by Befun Hung on Nov. 12, 2014 to use
// 4 digital pins(D2-D5) to set node ID1 and
// 4 digital pins(D6-D9) to set node ID2 by using 10K pull-up resistors.
// Totally 8x16x16=2,048 devices can be used for wireless communication
// For practical use 8x10x10=800 devices can be controlled using digital key of 3x4 telephone keypad
// Wire and DIP switch connections from high bit to low bit are A1, A2, A3, D2, D3, D4, D5, D6, D7, D8 and D9
// A0 is reserved for analog sensor or digital sensor/actuator
// A4-A5 are reserved for I2C
// D0-D1 are reserved for RX/TX
// D13 is used for singal output
// Don't run this sketch on Arduino Pro Mini, it may reboot repeatedly owing to bootloader not supporting watchdog
#include <VirtualWire.h>
// include avr/wdt for watchdog reset
#include <avr/wdt.h>
// include <EEPROM.h> to save switch staus to EEPROM
#include <EEPROM.h>
// keys to turn switch on and off
#define keyOn '*'
#define keyOff '#'
//Create and Define Global Variables
int bits=4, netID, nodeID1, nodeID2;
int dipNet[] = {15, 16, 17}; // DIP Switch Pins for Net ID
int dipNode1[] = {2, 3, 4, 5}; // DIP Switch Pins for Node ID1
int dipNode2[] = {6, 7, 8, 9}; // DIP Switch Pins for Node ID2
byte message[VW_MAX_MESSAGE_LEN]; // a buffer to store the incoming messages
byte messageLength = VW_MAX_MESSAGE_LEN; // the size of the message
unsigned long counter = 1;
// digital pin 13 connected with a 1K resistor and a LED
int led = 13;
// Address of EEPROM for saving switch status and variable to store value
int address = 5;
int value;
void setup()
{
Serial.begin(9600);
int i;
pinMode(A1, INPUT);
pinMode(A2, INPUT);
pinMode(A3, INPUT);
netID = netAddress();
// delay(100);
Serial.print("Net ID: ");
Serial.println(netID);
for(i = 0; i<bits; i++){
pinMode(dipNode1[i], INPUT); // sets the digital pin 2-5 as input
}
nodeID1 = node1Address(bits);
// delay(100);
Serial.print("Node ID1: ");
Serial.println(nodeID1);
for(i = 0; i<bits; i++){
pinMode(dipNode2[i], INPUT); // sets the digital pin 2-5 as input
}
nodeID2 = node2Address(bits);
// delay(100);
Serial.print("Node ID2: ");
Serial.println(nodeID2);
Serial.println("Device is ready");
// Initialize the IO and ISR
vw_setup(2000); // Bits per sec
vw_rx_start(); // Start the receiver
//initialize the digital 13 pin as output
pinMode(led, OUTPUT);
// When the receiver is unstable and reboot, reading stored status from EEPROM
value = EEPROM.read(address);
if (value == '1')
{
digitalWrite(led, HIGH);
}
if (value == '0')
{
digitalWrite(led, LOW);
}
}
void loop()
{
if (vw_get_message(message, &messageLength)) // Non-blocking
{
Serial.print(counter);
Serial.print(": ");
for (int i = 0; i < messageLength; i++)
{
Serial.write(message[i]);
}
// if length of received message is less than transmitter sent meaning the receiver is unstable
if (messageLength < 4)
{
software_Reboot();
}
else
{
// netID and nodeID are numbers and message is charactor array, so convention is required
if ((message[0] == (netID + '0')) && (message[1] == (nodeID1 + '0')) && (message[2] == (nodeID2 + '0')))
{
if (message[3] == keyOn)
{
digitalWrite(led, HIGH);
EEPROM.write(address, '1');
}
else
{
if (message[3] == keyOff)
{
digitalWrite(led, LOW);
EEPROM.write(address, '0');
}
}
}
}
Serial.println();
counter++;
}
}
// Software reboot function
void software_Reboot()
{
wdt_enable(WDTO_15MS);
while (1)
{
}
}
//Create Net Address from DIP Switch (3 positions used A1-A3)
byte netAddress(){
int i,j=0;
//Get the switches state
j = (j << 1) | (! digitalRead(A1)); // read the input pin
j = (j << 1) | (! digitalRead(A2)); // read the input pin
j = (j << 1) | (! digitalRead(A3)); // read the input pin
return j; //return address
}
//Create Node1 Address from DIP Switch (4 positions used D2-D5)
byte node1Address(int k){
int i,j=0;
//Get the switches state
for(i=0; i<k; i++){
j = (j << 1) | (! digitalRead(dipNode1[i])); // read the input pin
}
return j; //return address
}
//Create Node1 Address from DIP Switch (4 positions used D6-D9)
byte node2Address(int k){
int i,j=0;
//Get the switches state
for(i=0; i<k; i++){
j = (j << 1) | (! digitalRead(dipNode2[i])); // read the input pin
}
return j; //return address
}
Sketch
// Released by abocanegra on Dec. 11, 2009 using 4 pins, "DIP Switch 8 Position to Address Sensor" in Arduino Forum
// This sketch uses VirtualWire
// Connect the Receiver data pin to Arduino pin 11
// Modified by Befun Hung on Oct. 29, 2014 by combining sketches on May. 11, 2014 (Arduino RF Wireless Message Display)
// and Jul. 30, 2014 (Use DIP Switch To Set Arduino Device Net ID And Node ID for Wireless Communication)
// and removing LCD Keypad Shield display function as a new sketch for Arduino addressable RF wireless power socket
// The sketch uses 3 analog pins(A1-A3) to set net ID and 8 digital pins(D2-D9) to set node ID by using 10K pull-up resistors.
// Totally 8x256=2,048 devices can be used for wireless communication
// When using a 3x4 telephone keypad, 8x10(0-9)=80 devices can be used
// A0 is reserved for analog sensor or digital sensor/actuator
// A4-A5 are reserved for I2C
// D0-D1 are reserved for RX/TX
// D13 is used for singal output
#include <VirtualWire.h>
// include avr/wdt for watchdog reset
#include <avr/wdt.h>
// include <EEPROM.h> to save switch staus to EEPROM
#include <EEPROM.h>
// keys to turn switch on and off
#define keyOn '1'
#define keyOff '0'
//Create and Define Global Variables
int bits=8;
byte netID, nodeID;
int dipNet[] = {15, 16, 17}; //DIP Switch Pins for Net ID
int dipNode[] = {2, 3, 4, 5, 6, 7, 8, 9}; //DIP Switch Pins for Node ID
byte message[VW_MAX_MESSAGE_LEN]; // a buffer to store the incoming messages
byte messageLength = VW_MAX_MESSAGE_LEN; // the size of the message
unsigned long counter = 1;
// digital pin 13 connected with a 1K resistor and a LED
int led = 13;
// Address of EEPROM for saving switch status and variable to store value
int address = 5;
int value;
void setup()
{
Serial.begin(9600);
int i;
pinMode(A1, INPUT);
pinMode(A2, INPUT);
pinMode(A3, INPUT);
netID = netAddress();
Serial.print("Net ID: ");
Serial.println(netID);
for(i = 0; i<bits; i++){
pinMode(dipNode[i], INPUT); // sets the digital pin 2-9 as input
}
nodeID = nodeAddress(bits);
Serial.print("Node ID: ");
Serial.println(nodeID);
Serial.println("Device is ready");
// Initialize the IO and ISR
vw_setup(2000); // Bits per sec
vw_rx_start(); // Start the receiver
//initialize the digital 13 pin as output
pinMode(led, OUTPUT);
// When the receiver is unstable and reboot, reading stored status from EEPROM
value = EEPROM.read(address);
if (value == '1')
{
digitalWrite(led, HIGH);
}
if (value == '0')
{
digitalWrite(led, LOW);
}
}
void loop()
{
if (vw_get_message(message, &messageLength)) // Non-blocking
{
Serial.print(counter);
Serial.print(": ");
for (int i = 0; i < messageLength; i++)
{
Serial.write(message[i]);
}
// if length of received message is less than transmitter sent meaning the receiver is unstable
if (messageLength < 3)
{
software_Reboot();
}
else
{
// netID and nodeID are numbers and message is charactor array, so convention is required
if ((message[0] == (netID + '0')) && (message[1] == (nodeID + '0')))
{
if (message[2] == keyOn)
{
digitalWrite(led, HIGH);
EEPROM.write(address, '1');
}
else
{
if (message[2] == keyOff)
{
digitalWrite(led, LOW);
EEPROM.write(address, '0');
}
}
}
}
Serial.println();
counter++;
}
}
// Software reboot function
void software_Reboot()
{
wdt_enable(WDTO_15MS);
while (1)
{
}
}
//Create Net Address from DIP Switch (3 positions used)
byte netAddress(){
int i,j=0;
//Get the switches state
j = (j << 1) | (! digitalRead(A1)); // read the input pin
j = (j << 1) | (! digitalRead(A2)); // read the input pin
j = (j << 1) | (! digitalRead(A3)); // read the input pin
return j; //return address
}
//Create Node Address from DIP Switch (8 positions used D2 - D9)
byte nodeAddress(int k){
int i,j=0;
//Get the switches state
for(i=0; i<k; i++){
j = (j << 1) | (! digitalRead(dipNode[i])); // read the input pin
}
return j; //return address
}
2014/09/21
Camera Slider / Dolly - MakerSlide + Arduino + CNC Shield + A4988 Driver + 42BYGH4417 Stepper Motor
One dimension movement is the most basic practice to position. By following the design of simple camera slider by Bart Dring from Inventables, I have made my own camera dolly and changed the pulley and belt of gt2 specification for easy steps calculation.
The use of CNC Shield is optional, it is used just for easy extension to y-axis and z-axis.
Connection
1. Stack CNC Shield on Arduino Uno or Mega2560
2. Connect CNC Shield to power supply with voltage 8-35V
3. Connect CNC X axis to 42BYGH4417 stepper motor
Photo
// simple stepper motor control
// only x axis is used for dolly
#define EN 8 / / stepper motor enable
#define X_DIR 5/ / x axis direction control
#define Y_DIR 6/ / y axis direction control
#define Z_DIR 7/ / z axis direction control
#define X_STP 2/ / x axis step control
#define Y_STP 3/ / y axis step control
#define Z_STP 4/ / z axis step control
/*
// step(): to control direction and steps of stepper motor
// parameter: dir for direction control,
// dirPin maps to DIR pin of stepper motor,
// stepperPin maps to STEP pin of stepper motor
// return value: none
*/
void step(boolean dir, byte dirPin, byte stepperPin, int steps)
{
digitalWrite(dirPin, dir);
delay(50);
for (int i = 0; i < steps; i++) {
digitalWrite(stepperPin, HIGH);
delayMicroseconds(800);
digitalWrite(stepperPin, LOW);
delayMicroseconds(800);
}
}
void setup (){
// setup stepper motor I/O pin to output
pinMode(X_DIR, OUTPUT); pinMode(X_STP, OUTPUT);
pinMode(Y_DIR, OUTPUT); pinMode(Y_STP, OUTPUT);
pinMode(Z_DIR, OUTPUT); pinMode(Z_STP, OUTPUT);
pinMode(EN, OUTPUT);
digitalWrite(EN, LOW);
}
void loop (){
// 200 steps per turn
step(false, X_DIR, X_STP, 1800); // run 360 mm
step(false, Y_DIR, Y_STP, 200);
step(false, Z_DIR, Z_STP, 200);
delay(1000);
step(true, X_DIR, X_STP, 1800); // run 360 mm in reverse direction
step(true, Y_DIR, Y_STP, 200);
step(true, Z_DIR, Z_STP, 200);
delay(1000);
}
The use of CNC Shield is optional, it is used just for easy extension to y-axis and z-axis.
Connection
1. Stack CNC Shield on Arduino Uno or Mega2560
2. Connect CNC Shield to power supply with voltage 8-35V
3. Connect CNC X axis to 42BYGH4417 stepper motor
Photo
Connections
Dolly In Motion
Sketch// simple stepper motor control
// only x axis is used for dolly
#define EN 8 / / stepper motor enable
#define X_DIR 5/ / x axis direction control
#define Y_DIR 6/ / y axis direction control
#define Z_DIR 7/ / z axis direction control
#define X_STP 2/ / x axis step control
#define Y_STP 3/ / y axis step control
#define Z_STP 4/ / z axis step control
/*
// step(): to control direction and steps of stepper motor
// parameter: dir for direction control,
// dirPin maps to DIR pin of stepper motor,
// stepperPin maps to STEP pin of stepper motor
// return value: none
*/
void step(boolean dir, byte dirPin, byte stepperPin, int steps)
{
digitalWrite(dirPin, dir);
delay(50);
for (int i = 0; i < steps; i++) {
digitalWrite(stepperPin, HIGH);
delayMicroseconds(800);
digitalWrite(stepperPin, LOW);
delayMicroseconds(800);
}
}
void setup (){
// setup stepper motor I/O pin to output
pinMode(X_DIR, OUTPUT); pinMode(X_STP, OUTPUT);
pinMode(Y_DIR, OUTPUT); pinMode(Y_STP, OUTPUT);
pinMode(Z_DIR, OUTPUT); pinMode(Z_STP, OUTPUT);
pinMode(EN, OUTPUT);
digitalWrite(EN, LOW);
}
void loop (){
// 200 steps per turn
step(false, X_DIR, X_STP, 1800); // run 360 mm
step(false, Y_DIR, Y_STP, 200);
step(false, Z_DIR, Z_STP, 200);
delay(1000);
step(true, X_DIR, X_STP, 1800); // run 360 mm in reverse direction
step(true, Y_DIR, Y_STP, 200);
step(true, Z_DIR, Z_STP, 200);
delay(1000);
}
Labels:
42BYGH4417,
A4988,
Arduino,
Camera,
CNC,
Dolly,
Driver,
MakerSlide,
Motor,
Shield,
Slider,
Stepper
Subscribe to:
Posts (Atom)








