Evan Rust
Published © GPL3+

Cake Decorating Robot

Use the DIY Universal CNC Machine v1.5 to decorate cakes using icing.

AdvancedFull instructions provided20 hours2,127
Cake Decorating Robot

Things used in this project

Hardware components

DIY Universal CNC Machine
The base machine
×1
NEMA 17 Stepper Motor
OpenBuilds NEMA 17 Stepper Motor
×1
Driver DRV8825 for Stepper Motors for Theremino System
Driver DRV8825 for Stepper Motors for Theremino System
×1
Custom Photon Stepper Driver Board
Optional
×1
DFRobot Raspberry Pi 3 Model B+
×1
DFRobot 5" TFT Raspberry Pi Touchscreen
×1

Software apps and online services

Particle Online IDE
GRBL

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

DIY Universal CNC Machine

Paste Extruder

Schematics

Photon Stepper Driver Board

Code

Particle Code

C/C++
// This #include statement was automatically added by the Particle IDE.
#include <AccelStepper.h>

void extrude(const char *event, const char *data);

AccelStepper stepper(1,3,2);

bool run = false;
bool reverse = false;

void setup() {
    bool success = Particle.function("extrude",extrudeIt);
    stepper.setMaxSpeed(4000);
    stepper.setSpeed(1000);
}

void loop() {
    if(run){
        if(reverse){
        stepper.setSpeed(-400);
        }
        else{
            stepper.setSpeed(400);
        }
        stepper.runSpeed();
    }
    else{
        stepper.move(0);
    }
}

int extrudeIt(String extra){
    if(String(extra)=="start"){
        run = true;
        reverse = false;
    }
    else if(String(extra)=="stop"){
        run = false;
    }
    else if(String(extra)=="back"){
        run = true;
        reverse = true;
    }
    return 1;
}

Control Page

HTML
<html>
<head>
<script type="text/javascript" src="//cdn.jsdelivr.net/particle-api-js/5/particle.min.js">
</script>
	
<script>
	const access_token = "access token here";
	var particle = new Particle();
	var publishEvent;
	function move(dir){
		publishEvent = particle.callFunction({deviceId: 'device ID here',name: 'extrude', argument: dir,auth: access_token});
	}
	
</script>
</head>
<body>
	<div>
	<input type="button" value="up" onclick="move('back');return false">
	<input type="button" value="stop" onclick="move('stop');return false">
	<input type="button" value="down" onclick="move('start');return false">
	</div>
</body>
</html>

Credits

Evan Rust

Evan Rust

120 projects • 1053 followers
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.

Comments