Building Sensors for Robots with fischertechnik – A Guide for Students

kristielAll Topics, fischertechnik, Unity Game Development

Share this Post

Our awesome team of co-op students (Arsalan, Survesh, Ashutosh, and Charles ) have taken on a challenge to create an app that enables users to customize their own fischertechnik robot and apply sensors to it. You can learn how to create your own app by following along to see how our interns tackled this task. The project consists of 3 main phases: construction of the robot, construction of digital models on Inventor and the creation of the app using Unity. Here we will discuss first phase of the project: construction of the physical model of the robot using fischertechnik.

Creating a Robot using fischertechnik

Sensors for fischertechnikThe goal of this phase is to create a real life basic model of the fischertechnik robot, then to program and mount a variety of sensors on it. Our team successfully finished this model which features a two wheel drivetrain, encoder wires, and sensing systems. The two-wheel drivetrain is lightweight and allows for greater mobility because with 2 wheels there is only 1 pivot point. The purpose for the encoder wires in the robot is to provide motion control system on the motors, information on position, count, speed and direction. This is important as we need the robot to move in a linear pattern as well as be able to turn properly with the coordination of the motors. They also used sensors as a part of the basic model to test their functions and our programs based on it. They then wired these sensors into the the ROBO TX controller which is a microcontroller that controls the functions of the robot. By using this controller and a variety of parts, they managed to complete the physical model of the Robot to a point where it was ready to be programmed.

For starters their idea was to create individual programs for each of the sensors, and then mount them on the robot. Each sensor was mounted individually because they needed to see if any of the programs for each sensor were faulty. This allowed them to learn about each function of the sensors.

Sensors Created for Robot

Potentiometer: Basically, this is a variable resistor with three terminals. It’s function is to translate rotary or linear motion into change in resistance. In general potentiometers are used for adjusting the volume level on a radio or even changing channels on some types of television sets. While programming using ROBO Pro software, the potentiometer icon has a range in the ROBO Pro program: 0-5000 ohms. We programmed the potentiometer to accelerate the motors clockwise when its past 4500 ohms and accelerate counterclockwise 2500 ohms. When the potentiometer is at 0 ohms the motor stops.

Trail Sensor: This sensor follows a line that you program it to follow. Our team programmed the sensor to distinguish between a black and a white trail. The program can use multiple decision elements to determine what to do with its trail inputs, such as turning left, right or moving straight. Helpful Tip: Use white paper and black electrical tape for reliable trail readings. This is important as the trail sensor picks up strong contrast more effectively which allows it to follow a path precisely.

Photo Resistor (Light Dependent Resistor/LDR): This resistor/sensor changes its resistance with exposure to light; the stronger the light source the greater the change. Some real life examples would be glow-in-the-dark watches or even streetlamps that operate when the sun goes down. They programmed the robot to accelerate slower as well turn on the light bulb when it encounters darkness. When the robot encounters light, it accelerates faster and the light bulb turns off. It is important to work in an area where there is contrast between light and darkness so that photoresistor can detect the change easily.

Ultrasonic Sensor: These sensors use high-frequency sound pulses to measure distance, it also consists of a transmitter and receiver. Some real life examples of this sensor would be sonar and it is also used in many medical and industrial applications. While programming on ROBO Pro the ultrasonic sensor gives an input ranging from 0-1000 cm.  We programmed the sensor to turn the robot away from an object when it is less than 25 cm away from it.

Helpful Tip : Learning from Mistakes

During this project, our team ran into a variety of problems that they want to help you avoid.

Number one: You should have constant communication between anyone working on separate aspects of the project. For example, if someone is building the robot, they should tell the programmer how many motors there are. If the programmer isn't informed and doesn't ask, then their program might only be applicable for one motor.

Number two: It’s a good habit to get into is saving your work online or on your personal USB. There could be parts of the project that you can do at home, such as manuals, design sketches, programming codes, or a link to a relevant website that needs to be explored. If you work in a team, then you should send out regular updates on the work you have completed and what needs to be completed. You can keep your team posted by having meetings at work or online messages.

Number three: Another important habit is to look for feedback on your work. If you work in a team, then you can ask your team members to evaluate the logic of your program, or the correctness of your building. If you do not work in a team, then try to ask a friend who is knowledgeable about technology and programming, or consult a website. The fischertechnik website can provide answers to questions relating to the building and wiring of the robot. If your trouble is with programming, you may do some additional research on sensors and the programming behind them.

Roadblocks and Bridges

When you are making something as complicated as this robot expect a few roadblocks. On the first attempt the team realized they had the wiring done backwards. They discovered this problem by testing the program on the ROBO Pro interface and determining which outputs were working in correlation with which inputs. If your input is meant for a clockwise command, but your output responds by stating that the motor will turn counterclockwise, then you'll know that the wiring is incorrect, and that the program is not the source of error. Using the "Test" function in ROBO Pro is your best guide at detecting problems. In the instance that your error is relevant to programming logic, then you should use the TX controller and run the program. Sometimes, a motor won't run, not because the program is wrong, but because the speed of the motors is too low. Try to tinker with several settings with programming errors: increase and decrease speeds, use a different battery or recharge your current one, or just check if the flowchart is even connected properly in ROBO Pro. An error in programming doesn't have to be an error in logic; keep testing and keep evaluating.          

All in all, when you've been confronted with a project like this, then you should focus on coordinating yourself (and your partners, if applicable). Our team learned to manage themselves and their resources well, stay organized, pay attention to details, and collaborated. These attributes are most useful in making this project happen. Stay tuned for the next update from our Studica co-op student team, where they will move on to replicating all of this work into Autodesk Inventor to create what will become the Unity assets.

Share this Post