Dejan Nedelkovski over at HowToMechatronics shared detailed tutorial on how servo motors work and how to control servos using Arduino and PCA9685 PWM driver:
There are many types of servo motors and their main feature is the ability to precisely control the position of their shaft. A servo motor is a closed-loop system that uses position feedback to control its motion and final position.
In industrial type servo motors the position feedback sensor is usually a high precision encoder, while in the smaller RC or hobby servos the position sensor is usually a simple potentiometer. The actual position captured by these devices is fed back to the error detector where it is compared to the target position. Then according to the error the controller corrects the actual position of the motor to match with the target position.
In this tutorial we will take a detailed look at the hobby servo motors. We will explain how these servos work and how to control them using Arduino.
On April 18th, a team from Arduino Education made it to the museum Ciudad de las Artes y las Ciencias in Valencia to participate in the CTC Valencia Fair. A total of 1,200 students (out of 1,500 people in attendance) participated in the five-hour-long event where the students exhibited what they had been producing over the last couple of months.
CTC, the Creative Technologies in the Classroom initiative
CTC started as a project in the region of Castilla La Mancha in Spain. I was asked what kind of process could be implemented in order to bring teachers and school up to speed with new educational technologies. Back then, in 2012, I had been teaching students from many different disciplines, mostly at the university level: interaction design, medicine, engineering, product design, mathematics, multimedia, fine arts… I had also been working with upper secondary school teachers from Spain, Argentina, and Sweden in the creation of small curriculums introducing interactive technologies a part of more transversal teaching in subjects like science and design.
When asked by the people in charge at the regional centre for educators in Castilla La Mancha, I suggested a quick iterative design process that began with a collective survey to teachers in 25 schools and followed by a curriculum suggestion on topics that they considered relevant. The most complex aspect in this process was how to design interventions in the way of implementing this programme so that I could incorporate the teachers’ as well as the students’ opinions and debug the content as we went. CTC has over 25 different mid-size experiments designed to help a class get acquainted to work in a project-based learning methodology through an iterative process.
The first CTC fair brought together over 400 students from all over Castilla La Mancha that presented 100-plus projects. Almost five years later, we have witnessed yet another incredible fair with very nice results, only this time in Valencia.
What has changed
CTC now includes experiments with wireless technology, accelerometers, capacitive sensing, motors, lights, and other interesting tricks, thanks to using the Arduino 101 board that comes with BLE, an IMU, and some other goodies. Students are introduced to programming using Processing and the Arduino IDE. But not everything is coding, given our pedagogic approach, they learn how to work in groups, search for technical information, organize time, and present their results…
On the Arduino side, we have jumped from having a good old WordPress site to enable communication between the students, to a full-fledged platform that is being augmented with new materials and courses on a yearly basis. The content works for both the classic IDE and the more modern Create IDE. At the same time, we have implemented a hotline where teachers can ask questions directly to Arduino’s support specialists. Of course, there is a forum just for teachers to talk to one another and the Arduino forum still supporting them; but we have learned that teachers like one-to-one communication because each school is somehow different in terms of equipment, network facilities, classrooms and policies, and social environment–teachers, students, and their families.
We have learned about complex deployments; for example, in Valencia there is a special Linux distribution called Lliurex that we had to hack in order to get the IDE running properly. During a previous project in Andalucia, teachers had no administration password to the computers! Well, we did figure things out and got the project to work. So big kudos to our support team that had to get out the hacker hoodie and code a clever solution!
Also, for the CTC webinars we make on a bi-weekly basis, we have changed our online seminar backend to have a much more efficient one. Now our calls allow full interaction with the participants that can be invited to talk and share screens when needed instead of simply having a chat line back.
Valencia is cool, isn’t it?
We had a CTC fair at the Ciudad de las Artes y las Ciencias, a museum by Santiago Calatrava in the shape of a huge boat put upside-down. There are fountains surrounding the building, the weather was amazing (remember I am coming from Sweden, where we just had the worst winter in 10 years, so anything over 15°C is good at this point), the organizers from CEFIRE (the teacher organization in Valencia’s region) made a great preparation of the location, schools arrived on time, the show went fine-great-FABULOUS… so yes, Valencia is cool, and the so was the CTC fair.
On stage we could see almost 30 projects being presented by the students, while we conducted a two and a half-hour livecast for those interested in seeing the projects from anywhere in the world. We held 15 interviews, but unfortunately we couldn’t show everything happening, considering that there were a more than 150 projects on display!
The following video is a summary of livestream from the museum; for your benefit, we have chosen some highlights of the broadcast I conducted throughout the day.
The interviews were conducted in Spanish, which is another reason for the summary; but if you are interested in the actual interviews, check out the following video.
Some seriously nice projects
I cannot stop being surprised by the amount of creativity students show when making projects. Even if I attend an average of five events of this nature per year, I keep on finding projects that make an impression in me. Students are always challenging any pre-conceptions I might have about what could be done with something as simple as an Arduino board. The one thing teachers keep on saying again and again is that it was them, the students, that pushed the process forward, that once they got started with the course, it was hard not to get carried away by the students initiative. The role of the teachers is playing the realist, trying to make sure the projects come to an end. That said, here some of the things I saw while walking around in the fair.
Probably the most impressive project I came across was a model of the Hogwart’s castle inspired by the Harry Potter movies. It took the students four months to build the entire project. It was a replica of the castle, so heavy that it needed four people to carry it around. It had dragons flying around one tower, the lights could be turned on and off… there was even a fountain with running water! The whole mode could be controlled via Bluetooth from an Android tablet. In total, the model took three months to construct, the students said, while making the electronics and software work took one month.
On the other side of the spectrum, I could play with a small arm wrestling toy made by a single student that took only 5 hours to build. You can check out the interview with the student in the above-posted videos. While the project seems to be simple, it is clear that the student had become quite knowledgeable in the craft of making projects, since he had figured everything for the project on his own without any external help.
One last project I would like to talk about was a small drawing machine comprised of mechanics from DVD drives that could replicate small drawings (less than 10x10cm big) using a pen. The students explained that it barely worked the night before, but that they finally figured out the calibration process minutes before leaving for the fair. The results, as you can see on the video interviews, are quite remarkable. They can export drawings using the open source program Inkscape in a format (G-code) their machine can understand, this allows them to trace any kind of vectorized drawing and reproduce it with their machine.
There were a lot more projects, take a look at the videos and pictures in this blog post. We will be presenting some others as part of the Arduino Livecast series in the the future. If you want to know more, just subscribe to Arduino’s YouTube channel and you will get weekly notifications on our videos.
The CTC Valencia project has been possible thanks to the generous contribution of EduCaixa, the on-site collaboration of the technical body at CEFIRE, the kind support of the regional government of Valencia – the Generalitat -, and the help of our old friend Ultralab.
From everyone involved in the project, big thanks to Ismael and Oscar, who believed in the project and pushed for it. Personally I want to thank Nerea who coordinated the project, and Roxana who was there making it happen from Arduino on a weekly basis; also Carla and Carlos who covered up when needed. Finally to Laura, who worked long evenings on top of everything else to make all of graphics needed for the fair.
At a more technical level, we have a new revision to the look and feel of the CTC project site coming, and it is looking awesome. Marcus, Gabrielle, Luca and everyone working with the UX in Arduino are creating one of the best-looking educational experiences ever. If not only the content is good, but if it feels good and looks good, then the experience will be excellent!
Do you want CTC in your world?
If you want to be part of the CTC initiative, visit Arduino Education’s website, subscribe to the Arduino Education Newsletter [at the bottom of that site], or send us a request for more information via email: firstname.lastname@example.org.
While it’s hard to beat today’s mobile devices functionality-wise, if you need a phone built like a tank and designed for voice communication and voice communication only, you can’t go wrong with the Western Electric Model 500 rotary telephone. As maker “bicapitate” shows on Imgur, these models include a generous amount of space inside, enough room in fact for an Arduino Uno along with a tiny Adafruit FONA module for cellular capabilities.
While project details are slim, it appears that the Uno takes pulses from the rotary input, then makes calls via the FONA. A DC motor drives the bell to indicate a call is being made, and the original headset, possibly modified with a new speaker and mic, is used for audio. It now also includes a LiPo battery, allowing you to use this wherever convenient—while still slamming the headset down with authority!
If you ever wanted to to see what Symmetra’s sentry turrets from Overwatch would look like in real life, now you can thanks to Mr. Volt. The YouTuber has produced a pair of them powered by a LiPo battery and controlled with an Arduino Mega, utilizing a relay shield to provide enough power to each laser.
In theory, the turrets can each be aimed with a servo motor and sense objects with an infrared range finder. The main control feature, however, is an arcade button that controls firing, along with a big red e-stop switch to cut things off as needed.
After a couple weeks of tinkering, my first iteration of Symmetra’s turrets are alive! They may be 3D-printed instead of hard light constructs, but I still think they’re pretty cool. Each turret holds a 2W 445nm laser and RGB (Dotstar) LEDs. They’re controlled by an Arduino Mega and some relays.
You can see it demonstrated popping balloons at just after the 8:30 mark in the video below. Also, please be sure to use the necessary precautions when working with lasers. For his part, Mr. Volt decided to build his own FPV rig out of a welding helmet!
How can you help advance Industry 4.0 using the Arduino ecosystem? From robots and predictive maintenance to remote control and data acquisition, we’ve teamed up Distrelec to launch a new Automation & Robotics Contest challenging our community to create innovative solutions that can make the industry faster, cheaper, more flexible, and efficient.
Participants are required to tap into our extensive range of IoT boards like the MKR1000 WiFi and MKR GSM 1400, libraries, and online platform to bring their ideas to life. Industrial automation projects could target energy management, remote monitoring, machine safety, or predictive maintenance, for example, using Arduino Createto set up, control, and connect your Arduino, Intel, and Arm-based devices. Robotics projects could include designs for surveillance drones, robotic arms, rovers, or autonomous transportation, leveraging feature-rich boards like the Mega and Due to prototype advanced systems.
If you want to keep something at a certain temperature, say a block of aluminum, you’ll need a thermocouple and some sort of heating element. While you could turn a heater on and off abruptly in a sequence appropriately known as “bang-bang,” a more refined method can be used called PID, or proportional-integral-derivative control. This takes into account how much the temperature is outside of a threshold, and also how it’s changing over time.
What I want, is the aluminum block below to have let’s say, exactly 100 degrees. I’ll control the real temperature using a K type thermocouple. To read the data I’ll use the MAX6675 breakout module and control the PID algorithm with and Arduino. Finally, to apply power we will make a small circuit using a MOSFET or maybe a TRIAC in case of high AC voltages. This will be a close loop. The thermocouple measures the real values, the Arduino creates the signal applied to the MOSFET and this transistor will control the power of a heating element inside of the aluminum block and once again the thermocouple will measure the value, that’s why it’s a close loop.
Be sure to check it out for an introduction to this powerful control scheme!