Blog posts about Education, CyberSecurity, Digital Citizenship, Privacy, InternetSafety, curation, PKM, PLN, blogging, Global Collaboration, Coaching, Collaboration, eSkills, eLeadership, Coding, MakerED, MakerSpace, Social Media, How to learn, learning to learn
Make objects rotating with a Stepper-Motor | Tips and Tricks
Well, in a previous tutorial <===> https://gustmees.wordpress.com/2018/09/19/halloween-project-with-skull-arduino-blinking-leds-and-scrolling-eyes-maker-makered-makerspaces/ <===> we created a Halloween Skull and it was fix, didn’t rotate. Fun? YES, BUT more fun when it is rotating by using a Stepper-Motor; looks then as it would observe, control the space around it 😉 And it is very easy to create, only a Stepper-Motor, an Arduino NANO and a bit Code; the rest is a bit manual work to fix mechanically the motor. And with the right tools the mechanical work is a piece of cake 😉. We will discuss ONLY the mechanical works and for the the code (Sketch) for the Arduino, please look at the following tutorial:
When fixing a small object there isn’t any problem, you just drill a hole of the diameter of the axis of the Stepper-Motor and fix it with hot glue or instant glue. BUT, when it comes to make rotating larger objects it will become unstable!! We need then also a larger support plate to fix the object. I used two techniques, one with a copper-plate of 0.8 mm (was still in my cellar for 30 years…) and/or a single-sided copper-Epoxy plate. Copper-plates are expensive and single-sided copper-Epoxy plates are on a less expensive price. They are about 0.65-1€/piece on Amazon.
First of all chose on what material you would like to fix the Stepper-Motor: this could be metal, plastic, cardboard or wood. As I like recycling, I ask in the Supermarket to get an empty wooden wine box. The Supermarket sometimes opens a six-pack of wine bottles in a wooden case (box) and they are happy NOT to recycle it themselves 😉 Here below an example for a Halloween project…
.
Wooden box front view
Click image, please, to enlarge.
Wooden box rear view
Click image, please, to enlarge.
Mounting and fixing of the Stepper-Motor
Click image, please, to enlarge.
Mounting and fixing of an object
Click image, please, to enlarge.
Skull glued on copperplate with Stepper-Motor
Click image, please, to enlarge.
Skull is fixed on the wooden box – happy-Halloween-rotating-skull
Click image, please, to enlarge.
.
Desription:
Drill a hole with a 6 mm drill in your support, then use the 32 mm Step-Drill to make the hole diameter fit to the diameter of the Stepper-Motor. Fix the Stepper-Motor. I used a copper-plate for having a large surface to fix the chosen rotating object. The axis from the Stepper-Motor is made from brass and that fits very well with copper for soldering them together. For the soldering you need an 80 Watt solder iron with a temperature of 430° C (806° F). Before you start soldering: clean the copper-plate, take off the patina first!! Same step for the single-sided Copper-Epoxy plate!!
.
Single-sided Copper-Epoxy plate
Single-sided Copper-Epoxy plate
Click image, please, to enlarge.
Single-sided Copper-Epoxy plate
Single-sided Copper-Epoxy plate
Click image, please, to enlarge.
Mounting and fixing of the Stepper-Motor
Click image, please, to enlarge.
Mounting and fixing of an object
Support for Xmas decoration
Click image, please, to enlarge.
Support for Xmas decoration
Support for Xmas decoration
Click image, please, to enlarge.
Support for Xmas decoration
Support for Xmas decoration
Click image, please, to enlarge.
.
Desription:
Above you see an example for a Xmas project, tutorial will follow soon, stay tuned 😉
.
L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness andSecurityEnhancementStructure)..
The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).
How-To Start: requirements and where to buy the Raspberry PI
Being since years a BIG fan of Arduino and doing a LOT of projects with it, I was thinking about to start ALSO with the Raspberry PI. Here below my advice and thoughts….
As actually there is a NEW version available, THE “Raspberry PI 4”, which ISN’T compatible mostly with other versions (as far as I understood…), AND that the “Desktop Kit” ISN’T available yet, I STOP here and waiting for WHEN it is available to make a decision IF I will START with it!!!
Keywords necessary for me to create this Blog post:Xmas gift, where to buy, tutorials, Raspberry PI, how to get started, Starter kit,
.
.
L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness andSecurityEnhancementStructure)..
The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).
Well, in a previous tutorial <===> https://gustmees.wordpress.com/2018/09/19/halloween-project-with-skull-arduino-blinking-leds-and-scrolling-eyes-maker-makered-makerspaces/ <===> we created a Halloween Skull and it was fix, didn’t rotate. Fun? YES, BUT more fun when it is rotating by using a Stepper-Motor; looks then as it would observe, control the space around it 😉 And it is very easy to create, only a Stepper-Motor, an Arduino NANO and a bit Code; the rest is a bit manual work to fix mechanically the motor. And with the right tools the mechanical work is a piece of cake 😉 Let us have first a look of the parts and the costs, followed by the mechanical works and then the code (Sketch) for the Arduino.
First of all chose on what material you would like to fix the Stepper-Motor: this could be metal, plastic, cardboard or wood. As I like recycling, I ask in the Supermarket to get an empty wooden wine box. The Supermarket sometimes opens a six-pack of wine bottles in a wooden case (box) and they are happy NOT to recycle it themselves 😉 Here below an example for a Halloween project…
.
Wooden box front view
Click image, please, to enlarge.
Wooden box rear view
Click image, please, to enlarge.
Mounting and fixing of the Stepper-Motor
Click image, please, to enlarge.
Mounting and fixing of an object
Click image, please, to enlarge.
Skull glued on copperplate with Stepper-Motor
Click image, please, to enlarge.
Skull is fixed on the wooden box – happy-Halloween-rotating-skull
Click image, please, to enlarge.
.
Desription:
Drill a hole with a 6 mm drill in your support, then use the 32 mm Step-Drill to make the hole diameter fit to the diameter of the Stepper-Motor. Fix the Stepper-Motor. I used a copper-plate for having a large surface to fix the chosen rotating object. The axis from the Stepper-Motor is made from brass and that fits very well with copper for soldering them together. For the soldering you need an 80 Watt solder iron with a temperature of 430° C (806° F). Before you start soldering: clean the copper-plate, take off the patina first!!
.
The wiring
.
Stepper-Motor example
.
The wiring is actually very simple, please look below:
.
Click image, please, to access the tutorial and the source of the image.
.
The Code
Please find below the Sketch (Code) which is very simple
.
Click image, please, to access the source of the code.
L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness andSecurityEnhancementStructure)..
The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).
Servo Motor Position displayed on 0.96 inch 128X64 I2C OLED
WE were playing around already with OLED displays in previous tutorials <===> https://gustmees.wordpress.com/?s=oled <===> where WE created an Analog-Digital Clock a Temperature/Humidity Monitor with “Heat-Index” and Text messages on the OLED. In this tutorial WE will display the angle of a rotating Servo-Motor on an OLED.
This is actually very easy and WE will learn also (for those who want so…) the different coding for OLEDs here below:
Click the image, please, to access the source of the image and tutorials.
.
TIP
Fix the Servo-Motor on cardboard or on a wooden, plastic, plate. Glue a white paper on it and mark the angles on the paper. This would be a nice project for schools 😉
Play around with the code to add some more angles ===> LEARNing-By-Doing 😉
L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness andSecurityEnhancementStructure)..
The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).
WE were playing around already with OLED displays in previous tutorials <===> https://gustmees.wordpress.com/?s=oled <===> where WE created an Analog-Digital Clock and a Temperature/Humidity Monitor with “Heat-Index”. In this tutorial WE will display text on an OLED.
This is actually very easy and WE will learn also (for those who want so…) the different coding for OLEDs here below:
L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness andSecurityEnhancementStructure)..
The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).
Temperature & Humidity monitor using Arduino NANO + DHT22 + 0.96 inch 128X64 I2C OLED
WE were playing around a lot already with I2C-LCD displays <===> https://gustmees.wordpress.com/?s=i2c+lcd <===> but not yet with I2C-OLEDs. In this tutorial WE will create a <===> Temperature & Humidity monitor using Arduino NANO + DHT22 + 0.96 inch 128X64 I2C OLED <===> which displays the temperature in °F AND °C, as well as it displays the “Heat Index“.
FIRST of all, let us talk about the “Heat Index“, what it is and WHY it could be important to display it:
Let us have a look on the wiring and check the below Fritzing, please. It shows a DHT11 Sensor instead of a DHT22 Sensor, but the wiring is the same. It shows ALSO a 220 Ohm resistor instead of a 10K resistor!! Use a 10K resistor please!!
.
.
Once finished the wiring, WE will need to go for the coding by using a Sketch, we will use a already done Sketch, which WE can transform to our needs from:
IF you use “°Fahrenheit” you can use it without any changes, but IF you use “°Celsius” in your country WE will need to make some changes in the code, which WE will discuss the How-To here below.
First step: you can change the text, IF wanted: Original says "DHTxx test!", I changed it to what you see below; GET creative ;)
.
Click image, please, to enlarge
.
SO, here below the changes to make to display in “°Celsius“:
Click image, please, to enlarge
.
You might need to add certain libraries, see below please which ones will GET needed, please.
.
.
IF a newbie, please check the below tutorial for the How-To:
L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness andSecurityEnhancementStructure)..
The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).
We will use the tutorial from <===> Arduino datalogger with SD card, DS3231 and DHT22 sensor, where we will NOT use the datalogger for our project to make it as easy as possible; courageous ones, once the project is working for them, may add the datalogger 😉 In that tutorial you will find also the code…
Check the schematic above please to know how to wire it; first we will do it on a breadboard and later we could solder it… Do the wiring as shown, without the Datalogger-SDCard-Module. See PIC below, please.
.
.
In the above image you will see an DHT11 Sensor (blue case) as at the time I didn’t have it yet (was ordered…) a DHT22 Sensor (white case) as shown on the finished project. As the project works we can now solder everything together on a strip-board, choosing a case; I used a cardboard box with the dimensions of 140 mm X 130 mm X 60 mmm, fixing the LCD2004 and the DHT22-Sensor on the front of the cardboard box.
.
Components soldered on a Stripboard
.
Soldering cables on the DHT22 sensor and isolating pins with heatshrink tube
.
Soldering cables on the I2C adapter of the LCD2004 and isolating pins with heatshrink tube
.
Fixing the LCD2004 display on the frontpanel and the distance bolts
.
Final assembling of the parts
.
The finished project
.
.
As you can see in above image, I added some text with a Dymo tape, looks better 😉
The Sketch (Code) for the project
One thing missing, the sketch (code). Please find it below and open it , copy it and paste it to the Arduino IDE:
L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness andSecurityEnhancementStructure)..
The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).
WHO doesn’t have that error already with LCD-Displays: Once uploaded (compiling) the code to the Arduino IDE there could be some errors happening, it happens to me… Please check PIC below:
Click image, please, to enlarge
.
Well I made some searches on the internet and I found the right answer on a forum about this error, which says that one should scan the I2C Address of the device and replace the “lcd.init();” by “lcd.begin (0x3F,16,2);” whereby “0x3F” is the I2C Address of my LCD1602/I2C module. I scanned to find out the I2C Addess with this sketch, please check here:
Here below the results of the scan of the I2C-Address, shown in the Serial-Monitor of the Arduino IDE:.
Click image, please, to enlarge.
.
Click image, please, to enlarge.
.
SO, make sure to FIRST scan the I2C-Address through the above mentioned Sketch, will save you a lot of stress! 😉
TIP: Use a DYMO, print out the I2C-Addresses and glue them on the backside of the LCD1602 Display, so you know for next projects WHAT I2C-Address the module has! 😉 In a couple of weeks you wouldn’t remind it anymore!
.
Click image, please, to enlarge.
.
Resolving the ERROR message
Coming back to resolve our ERROR-message and how to resolve it:
Please check the PIC below:
.
Click the image, please, to enlarge.
.
Check the lines marked with ***************************, in my case it is lines 36 and 40-52! Change it as it is displayed above, save it and upload it; it should work correctly now!
.
Stay tuned for next blog posts and enjoy it 😉
Have FUN with your “LEARNing-By-Doing project” and try out ALSO the other examples 😉
.
Keywords necessary for me to create this blog post: Arduino, Coding, Maker, MakerED, MakerSpaces, Learning By Doing, Learning To Learn, PracTICE, LCD-Displays, I2C,
.
.
L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness andSecurityEnhancementStructure). L’auteur était aussi gagnant d’un concours en électronique en 1979 ( Pays germaniques ) et voyait son projet publié dans le magazine électronique “ELO”.
The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).
The author was also a winner of an electronics contest (Germanic countries) in 1979 and got his project published in the “Electronics Magazine ELO”.
Well, after a couple of years online and checking Maker, MakerED projects on YouTube and elsewhere I encountered a LOT of projects WHICH DIDN’T work and later I found out the right addresses to follow WHERE I could say THAT’s the guys to follow to make sure NOT wasting time and efforts!!!
Here below a list of professional accounts and Blogs worth to follow:
L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness andSecurityEnhancementStructure).
.
The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).
Well, I made some searches on the internet and I found the right answer on a forum about this error, which says that one should scan the I2C Address of the device and replace the “lcd.init();” by “lcd.begin (0x3F,16,2);” whereby “0x3F” is the I2C Address of my LCD1602/I2C module. I scanned to find out the I2C Addess with this sketch, please check here:
Here below the results of the scan of the I2C-Address, shown in the Serial-Monitor of the Arduino IDE:.
Click image, please, to enlarge.
.
Click image, please, to enlarge.
.
SO, make sure to FIRST scan the I2C-Address through the above mentioned Sketch, will save you a lot of stress! 😉
TIP: Use a DYMO, print out the I2C-Addresses and glue them on the backside of the LCD1602 Display, so you know for next projects WHAT I2C-Address the module has! 😉 In a couple of weeks you wouldn’t remind it anymore!
.
Click image, please, to enlarge.
.
Resolving the ERROR message
Coming back to resolve our ERROR-message and how to resolve it:
Please check the PIC below:
.
Click the image, please, to enlarge.
.
Check the lines marked with ***************************, in my case it is lines 36 and 40-52! Change it as it is displayed above, save it and upload it; it should work correctly now!
.
.
L’auteur Gust MEES est Formateur andragogique / pédagogique TIC, membre du “Comité Conseil” de “Luxembourg Safer Internet” (LuSI), appelé maintenant BEESECURE, partenaire officiel (consultant) du Ministère de l’éducation au Luxembourg du projet ”MySecureIT“, partenaire officiel du Ministère du Commerce au Luxembourg du projet ”CASES” (Cyberworld Awareness andSecurityEnhancementStructure).
The author Gust MEES is ICT Course Instructor, ”Member of the Advisory Board” from “Luxembourg Safer Internet” (LuSI), BEESECURE, Official Partner (Consultant) from the Ministry of Education in Luxembourg, project “MySecureIT“, Official Partner from the Ministry of Commerce in Luxembourg, project “CASES” (Cyberworld Awareness and Security Enhancement Structure).
Check my #curation to find best articles, blogs and courses about #education #itsecurity #CyberSecurity #EdCollCoach #GlobalEDU #cyberbullying, #AR #RA #augmentedreality #health #science #QR #qrcodes in EN, FR, DE…
Play the FREE Game and Learn about Cyber Security and Coding
App Advisor
App Advisor helps safe-guard your personal data by telling you exactly which apps you should be cautious of, before they become a threat to your privacy.
Click image to use this free service and find out of your installed Apps are “privacy-friendly” or check new Apps before installing them!