Creative Innovation Series NGT501 Bubble Maker NGT501 Bubble
Creative Innovation Series NGT-501 : Bubble Maker
NGT-501 : Bubble Maker Objective: Using Arduino, Touch Button, DC Motor, and Step Motor to create a robot to blow bubbles automatically. Description: An Arduino based bubble maker is created with a Touch Button, a DC Motor, and a Step Motor. When user touch the Touch Button, the Step Motor move bubble wand to soak in bubble water sink. After couple of seconds, the Step Motor aim the bubble stick to DC Motor Fan to blow bubbles. Module List: 1. UNO x 1 2. Arduino Interface Board x 1 3. Touch Button x 1 4. DC Motor x 1 5. Step Motor x 1
Hardware List 1. Bubble Water 2. Bubble Wand 3. Bubble Water Tank 4. UNO 5. Arduino Interface Board 6. Step Motor 7. DC Motor 8. Touch Button 9. Brick Set 10. Bolt / Nut / Screw Column 11. Signal Wire Set 12. B Type USB Cable 13. Brick Post / Fan Blade 14. Power Wire 15. Brick Plate
1/2/3. Bubble Water / Wand / Water Tank Bubble Water 8 Fluid Ounce (236 ml) Bubble Wand Bubble Water Tank 200 ml tank size
4. fayaduino UNO 1. Compatible to Arduino UNO 2. Use B-type USB interface
5. Arduino Interface Board With Arduino Interface Board, you will be able to : 1. Firmly mount your UNO on brick plate 2. Bridge out the power from Arduino to other faya modules.
6. Step Motor CCW CW Step : 1 2 3 4 A: 1000 B: 0100 A: 0010 B: 0001 Step Pulse 1. Input step pulse at four phase A, B, /A, /B to control the distance, speed, and direction of the Step Motor. 2. Rotor Step Angle (1 -2 Phase on) : 5. 625° 3. Rotor Step Angle (1 Phase on ) : 11. 25° 4. Gear Ratio : 64: 1 5. LED A, B, /A, /B represents the status of corresponding phase being driven.
7. DC Motor 1. Input analog signal (DC voltage) at SIG port to control motor speed. 2. Input digital signal (HIGH/LOW) at DIR port to control motor direction.
8. Touch Button 1. The default signal at OUT port is Digital LOW. 2. Touch copper foil to generate Digital HIGH at OUT port.
9. Brick Set Normal Type 1 x 1 : 12 pcs 1 x 2 : 12 pcs 1 x 3 : 12 pcs 1 x 4 : 12 pcs 2 x 2 : 8 pcs 2 x 3 : 12 pcs 2 x 4 : 24 pcs (at least) Plate Type 2 x 6 : 6 pcs 2 x 10 : 2 pcs 6 x 8 : 1 pcs 90 degree Type 1 x 1 : 10 pcs 1. LEGO brick compatible 2. Random color for each type 3. A bigger normal type brick maybe replaced by smaller brick for example, a 2 x 4 brick maybe replaced by 2 pcs of 2 x 2
10. Bolt / Nut / Screw Column Bolt Nut Screw Column These 3 components are used to fix UNO and faya Interface Board. The installation will be introduced in later side.
11. Signal Wires 1. Signal Wire is used to connect signals between Arduino and faya module pins. 2. The size of the signal wire is AWG 22
12. B Type USB cable 1. Use B Tyep USB cable to connect between fayaduino UNO and computer.
13. Brick Post / Fan Blade 1. Use brick post to interface faya modules with bricks. 2. Brick post is stackable, as shown in above pictures. 1. Install Fan Blade at shaft of DC motor
14. Power Wire Type A : Connector-to-Pins Type B : Connector-to-Connector Type B Type A 1. Power Wire is used to supply the power from one to another faya modules. Red Wire connects to Vcc and Black Wire connects to Gnd. 2. Above example shows that the power from Arduino is delivered to DC motor via Type A wire and delivered to other two modules via Type B wires.
15. Brick Plate 1. Use Brick Plate as foundation of the project. 2. Plate size : 32 x 16 3. Random Color
Assembling This section introduce the assemble of bricks and faya modules
Assemble Interface Board (I) + = Insert 4 screw columns into above holes.
Assemble Interface Board (II) + = Flip the Interface Board and use 4 nuts to lock the inserted screw columns.
Assemble Interface Board (III) + = Align 4 holes on UNO board 4 screw columns inserted in Interface Board
Assemble Interface Board (IV) + = Use 3 bolts to lock the UNO board
Assemble Brick Post (I) Assemble Brick Post for Interface Board
Assemble Brick Post (II) Assemble Brick Post for DC Motor and Touch Button.
Assemble Brick Post (II) 2 brick posts 3 brick posts (1) Assemble Brick Post for Step Motor (2) Stack 3 brick posts at each corner (3) Stack 2 brick posts at motor shaft.
Assemble Bricks Put 4 bricks with same size at above location.
Assemble Bricks (6 x 5 x 4 cuboid) Top view Side view Build a 6 x 5 x 4 cuboid at above location.
Assemble Bricks (4 x 12 x 5 cuboid) 4 12 Top view 5 Side view Build another 4 x 12 x 5 cuboid at above location. Note that this cuboid no need to be solid. You may leave some space between bricks to save some brick quantity.
Assemble Bricks (8 x 2 x 6 cuboid) 8 2 Build a 8 x 2 x 6 cuboid, where 4 bricks with 90 -degree stud are used at 4 corners. Top view 6 Front view Side view Back view
Assemble Bricks (Combine Cuboid) Combine 8 x 2 x 6 and 4 x 2 x 5 cuboid at picture location.
Assemble Bricks Assemble 2 4 x 2 bricks on the top of 8 x 2 x 6 cubid as shown above.
Assemble Step Motor Side view Front view Join the Step Motor to 8 x 2 x 6 cuboid through 4 brick posts as shown in the picture.
Assemble Step Motor Side view Front view Join the Step Motor to 8 x 2 x 6 cuboid through 4 brick posts as shown in the picture.
Assemble UNO and Touch Button Switch UNO + Interface Board Touch Button Switch 1. The white dots shown above are the location for brick post. 2. Join UNO (with Interface Board ) at left side bricks. 3. Join Touch Button Switch at right side bricks.
Assemble DC Motor (II) 1. Insert Fan Blade at DC Motor Shaft 2. Join DC Motor Module on a 8 x 6 brick plate
Assemble DC Motor (II) Place 8 x 6 plate identical to the location show above. (On the top of the bricks completed in Slide 30)
Install Bubble Wand Align to Fan Blade Connect to Step Motor’s Brick Post 1. Connect Bubble Wand’s small hole to Step Motor’s Brick Post. 2. Align the Bubble Wand’s bigger hole to the Fan Blade.
Wire Connection This section introduce the connections of power and signal wires
Power Wire Connection (I) Type A Power Wire Red pin => 5 V Black pin => GND Use Type A Power Wires to connect 5 V and GND pin from UNO to any one of Power Sockets on Interface Board. This connection will deliver the 5 V power from UNO to Interface Board.
Power Wire Connection (II) Type B Power Wire Use Type B Power Wires to connect any one of Power Sockets from Interface Board to Touch Button Module. This connection will deliver the power from Interface Board to Touch Button Switch.
Power Wire Connection (III) Type B Power Wire Use Type B Power Wires to connect Power Socket from Touch Button Module to DC Motor Module. This connection will deliver the power from Touch Button Switch to DC Motor Module.
Power Wire Connection (IV) Type B Power Wire Use Type B Power Wires to connect Power Socket from DC Motor Module to Step Motor Module. This connection will deliver the power from DC Motor Module to Step Motor Module.
Signal Wire Connection (Step Motor) UNO_A 1 UNO_A 2 UNO_A 3 UNO_A 4 Step Motor_A Step Motor_B Step Motor_/A Step Motor_/B
Signal Wire Connection (Touch Button) UNO_A 0 Touch Button Switch_OUT
Signal Wire Connection (DC Motor) UNO_D 4 DC Motor_DIR UNO_D 5 DC Motor_SIG
Source Code Bubble. Maker_1 E. ino https: //goo. gl/dz 5 YSD Copy two files [Bubble. Maker_1 E. ino] to a folder named [Bubble. Maker_1 E]
Code Explanation (Action Analysis) (5) (4) (1) (2) (3) (4) (2) (3) (5) (1) Press touch button (2) Step motor brings bubble wand to bubble sink (3) Wait 2 second for bubble wand to stick bubble water (4) Step motor brings bubble wand to motor fan (5) Motor fan blows bubble out
Code Explanation (L 52) Code L 52 is used to detect if the finger touch the button. The default touch button Vout = 0 V. However, when the finger touch between two semi-circle cooper foil, the Vout will be close to 0. 5~0. 8 Vcc depending on body resistance. Vout = 0 V (analog value = 0) Vout = 0. 5~0. 8 Vcc (analog value > 400)
Code Explanation (L 28) To ensure step motor operate under correct speed and movement, the first parameter (number of rotor steps per revolution) in stepper library must be correct. Arduino Stepper Library use 2 -Phase. On technique to drive step motor, meaning that the rotor require [32] steps to create one revolution. As the result, we put value 32 to initialize the library. 1 revolution = 360 degree 360 Step motor (28 BY-J 48) specification 11. 25 = 32 Rotor step angle (2 -Phase-On)
Code Explanation (L 45) If the parameter for stepper library setup (L 28) in previous slide is correct, it will be very easy to use set. Speed function to control its speed set. Speed(x) : number x is the RPM (Revolution Per Minute) of the rotor. Since the gear ratio between rotor and shaft is 64: 1 The RPM for shaft must divided by 64 set. Speed(768) = 768 RPM for rotor = 12 RPM for shaft (768/12) 12 RPM = 12 revolution per 60 seconds Each revolution takes 5 seconds to rotate
Code Explanation (L 54、L 56) If the parameter for stepper library setup (L 28) is correct, it will be very easy to use step function to control its movement (number of steps) step(x) : number x is the number of steps for rotor. Since the gear ratio between rotor and shaft is 64: 1, and the step angle for rotor is 11. 25°. The number of steps for shaft to rotate ONE revolution will be 2048: 1 revolution = 360 degree 360 11. 25 X 64 = 2048 Rotor step angle (2 -Phase-On) gear ratio step(-1024) = shaft rotate ½ revolution counter-clockwisely Step(1024) = shaft rotate ½ revolution clockwisely Step(521) = shaft rotate ¼ revolution clockwisely
Code Explanation (L 48、L 64、L 66) SIG DIR port is used to control the direction of the motor (LOW = clockwisely, HIGH = counter-clockwisely) SIG port is used to control the speed of the motor (from 0~255, the higher the value, the higher the speed
Code Upload (1) Connects USB cable (3) Select Proper COM Port [COMx] (4) Press [Upload] button (2) Select [Arduino/Genuino UNO] (5) Done uploading
Test your work (1) Press touch button https: //youtu. be/Z 0 Pz 0 Mofqqc (2) Step motor brings bubble wand to bubble sink (3) Wait 2 second for bubble wand to stick bubble water (4) Step motor brings bubble wand to motor fan (5) Motor fan blows bubble out Before adding real bubble water. Please make sure that all movement meets the requirement to blow the bubble.
Playing your Bubble Maker
Assemble Bricks Use some bricks at above location. This bricks are used to create a space and fix the bubble sink.
Place bubble sink and water
Blowing Bubble (I) https: //youtu. be/_-d. TBDCdn. Rk
Blowing Bubble (II) https: //youtu. be/MO 5 AYzl. ZNuw
Trouble Shooting Why my bubble maker doesn’t create as many bubble as I expect? (1) The concentration of bubble water may be too high or too low. (2) The power supplied to bubble maker may be too low. If the power is not enough, the current used to drive DC fan will be too low to create strong wind to blow bubbles out. It is strongly recommend to use at least 1 A USB power to provide enough current to drive the DC fan. . (3) Try to shift the bubble wand a little bit from the center of fan blade. This is because the center of the fan blade creates lowest wing intensityand the edge of the fan blade creates high wing intensity.
Appendix A : Arduino Installation (1) Visit (www. arduino. cc) and click SOFTWARE (2) Save file in your computer and follow the instructions to install Arduino IDE in your computer https: //www. arduino. cc/en/Guide/Windows
Appendix B : Trouble Shooting The default processor firmware is built with ATmega 328 B (Old Bootloader). If you encounter a problem during upload, change the Bootloader to upper one (ATmega 328 P) may help.
Reference Getting Started with Arduino https: //www. arduino. cc/en/Guide/Home. Page Arduino Tutorial https: //www. arduino. cc/en/Tutorial/Home. Page Arduino Programming Language Reference https: //www. arduino. cc/reference/en/ Arduino Playground http: //playground. arduino. cc/ fayalab Module specification and sample code http: //www. kandh. com. tw/products_1. php? gid=33
Technical Support contact us at fayalab@kandh. com. tw K&H MFG CO. , LTD. 5 F. , No. 8, Sec. 4, Ziqiang Rd. , Sanchong Dist. , New Taipei City 241, Taiwan R. O. C. TEL: 886 -2 -2286 -0700 FAX: 886 -2 -2287 -3066 E-Mail:education@kandh. com. tw WEB:http: //www. kandh. com. tw
- Slides: 63