Simple Plotter Devices

by 685915 in Circuits > Arduino

369 Views, 4 Favorites, 0 Comments

Simple Plotter Devices

plotter3.PNG

This purpose is to help you understand the fundamentals on how a simple plotter works. During this project you will understand how a two axis device can be controlled by inputs given to it.

Supplies

plotter 2.PNG

Two 28BYJ-48 Stepper Motor (https://www.amazon.ca/s?k=28BYJ-48+Stepper+Motor&ref=nb_sb_noss)

Multiple jumper wires (https://www.amazon.ca/s?k=jumper+wires&crid=28WDNSJMV5FVU&sprefix=jumper+wires%2Caps%2C172&ref=nb_sb_ss_ts-doa-p_1_12)

Arduino (https://www.amazon.ca/s?k=arduino&crid=2T4PA1RWUQN4J&sprefix=Arduino)

Bread board (https://www.amazon.ca/s?k=Breadboard&ref=nb_sb_noss_2)

Two popsicle sticks (https://www.amazon.ca/s?k=popsicle+sticks&ref=nb_sb_noss_1)

Pencil (https://www.amazon.ca/s?k=Pencil&ref=nb_sb_noss_2)

Circuit

plotter 1.PNG

Connect one of the motor to pins 2,3,4,and 5. Connect the second motor to pins 6,7,8, and 9, Connect the power and ground of the Arduino to the power rails of the breadboard. Do the same with both of the motors. Also, if you are wonder what the line in front of the pin means well they are called PWM pins. It stands for pulse width modulation. A PWM pin is responsible for creating waves that look like square and this is do by switched between on and off.

Code

plotter 4.PNG

This is the code needed to control both of the stepper motors.

Testing the Code

COM23.PNG

In order to test the code you will need to open the serial monitor in Arduino which is located top right of the sketch. Ounces you opened the serial monitor type in XC,90,5,. This will move one of the motors 90 degrees clockwise and it will go 5 rpm. If you want to move the motor counter clockwise. Just delete the C and make it an W. Also if you want to move the other motor. Just delete the X and change it to Y. If want to change the degree at which the motors moves just delete the 90 and change to what ever you desire. Finally, if want to change the speed just delete the 5 and change it. Keep in mind the motor can not go above 12 rpm.

Attach the Popsicle Sticks and Pencil to the Motors Using Tape.

Simple plotter devices with two 28BYJ-48 Stepper Motor.

Congratulations after this step you have full created your own simple plotter devices. I suggest you play around with the setting and I hope you enjoy it.