Learn how to program the E6 controller to control the fan’s speed and oscillation.
Learn to use conditional statements to program the touch sensor to toggle the fan on & off, adjusting the speed and rotating.
Understand the functions of a large motor, servo motor and a touch sensor.
In this lesson, we’ll explore the oscillating fan robot, which uses the Intelligence Storm (E6) controller, large motor, servo motor and touch sensor to create a functional and interactive device.
This robot mimics the motion of a traditional fan while incorporating elements of programming and robotics.
We’ll dive into the mechanics of the oscillating fan, explore its components, and learn how to program the E6 controller to bring our robot to life.
By the end of the lesson, you will not only understand how to create a working oscillating fan robot but also appreciate the broader applications of this technology.
Similar to linear force, torque is also a type of force, but instead of causing an object to move in a straight line, it causes it to rotate.
Torque is a measure of a force that causes rotation around an axis. Just as force causes an object to accelerate in linear kinematics, torque causes an object to have angular acceleration.
In the context of fan, torque is the force that makes the fan blades spin.
The E6 motor generates torque. This torque is the twisting force that drives the E6 motor's shaft to rotate.
Oscillation refers to the repetitive variation, typically in time, of some measure about a central value or between two or more different states.
It is a periodic motion that moves back and forth around an equilibrium position. Common example include an oscillating fan.
A type of oscillation characterized by a restoring force proportional to the displacement from the equilibrium position. The motion can be described using sine or cosine functions.
Oscillations that decrease in amplitude over time due to energy loss (e.g., friction or air resistance).
Oscillations that occur when an external force is applied to a system, which can lead to resonance if the frequency of the external force matches the system's natural frequency.
In an oscillating fan, the movement of the fan blades is caused by a motor that continuously applies force to rotate them. This force keeps the blades moving back and forth (oscillating) across a specified range, regardless of whether they return to a central equilibrium position.
The fan's oscillation occurs in a periodic manner, meaning it regularly moves back and forth over a set interval of time. The motor drives this consistent motion.
The mechanism that allows oscillation (typically a gear or crank system) converts the rotational motion of the motor into the side-to-side motion of the fan head.
Depending on the design of the fan, there may be some damping factors at play. For instance, friction in the motor and mechanical components might gradually reduce the oscillation if the motor were to stop, but in normal operation, the motor continuously drives the oscillation.
Larger and heavier.
Generate more torque, making them ideal for heavier loads and applications requiring greater force.
Offer slower speed but higher torque, making them suitable for applications that need strong force, like driving wheels or lifting heavy objects.
Smaller in size and lighter.
Provide less torque compared to large motors, making them suitable for lighter loads.
Ideal for tasks that require quick movement with less power, such as moving smaller gears or components.
The touch sensor detects physical contact. It can be pressed or released, providing two main states: "pressed" (true) and "not pressed" (false).
The touch sensor can be configured for various modes, including a single push (button) or continuous touch detection.
This coding block should be the first block of your code.
This coding block detects if the left button is pressed.
This coding block detects if the right button is pressed.
This coding block is used to check whether the touch sensor connected to Port 1 (P1) has been activated.
It acts like an infinite while (true) loop & It's part of the Control category.
It keeps executing the code inside it until the program is explicitly stopped
The If () Then block will run certain blocks of code only when a specific condition is true.
Try this program in RoboCode 4.0
Write a program for fan as following:
When you press the left button, the fan will stop moving
When you press the right button, the fan will increase in speed from slow (1), medium (2) and fast (3).
Hint: Create a variable name fanspeed and use operators to solve it.
Answer:
Write a program for fan as following:
When you press the touch sensor, your fan will oscillate to left & right.
When you press the left button, your fan will stop.
Answer: