Presentation is loading. Please wait.

Presentation is loading. Please wait.

NGT-601 : faya-nugget Combo Pack

Similar presentations


Presentation on theme: "NGT-601 : faya-nugget Combo Pack"— Presentation transcript:

1 NGT-601 : faya-nugget Combo Pack
Creative Innovation Series NGT-601 : faya-nugget Combo Pack (for ETS-9000)

2 Important Note! For ALL experiments, please set the signal level switch to TTL position.

3 Suggest Learning Topic Order
Appendix A Arduino Installation Basic RGB LED DC Motor Basic Logic Gates Appendix B faya Nano Overview IR Transmitter & Receiver Touch Slider Appendix C Nano Installation Step Motor Appendix D Brick Post Installation Light Sensor Appendix E Brick Cap Installation Humidity & Temperature Sensor Appendix F Power Wire Usage IR Distance Sensor Appendix G Signal Wires Usage Color Sticker IR Pulse Sensor Advanced Appendix H Project Setup

4 Humidity and Temperature Sensor
faya-nugget RGB LED DC Motor Touch Slider Basic Logic Gates IR Transmitter IR Receiver Light Sensor Step Motor Color Sticker Humidity and Temperature Sensor IR Distance Sensor IR Pulse Sensor

5 RGB LED 1.7V ~ 5V 2.8V ~ 5V 2.8V ~ 5V Use R port to control intensity of Red LED Use G port to control intensity of Green LED Use B port to control intensity of Blue LED Topic Select

6 Exercise Objective: Description: Module List: RGB LED
Using Data Switches on ETS-9000 to control the status of RGB LED Description: SW7 turns ON  Light up R SW6 turns ON  Light up G SW5 turns ON  Light up B SW0 turns ON  Light up R/G/B (Random) Module List: 1. fayaduino Nano x 1 2. RGB LED x 1 3. 8 Bits Data Switches (ETS-9000) Check Result - click to play

7 Connection RGB LED Arduino RGB LED D8 R D7 G D6 B Arduino ETS-9000 A1
Data Switch – SW9 A2 Data Switch – SW8 A3 Data Switch – SW7 D2 Data Switch – SW0

8 File Name : rgb_led_1.ino
Source Code RGB LED File Name : rgb_led_1.ino L37~39 : (1) ransom(1,10) will return a random value between 1and 10. (2) The result of random(1,10)%2 will be either 1 or 0. (3) 1 = turn on LED ; 0 = turn off LED

9 File Name : rgb_led_1.mov
Exercise Result RGB LED File Name : rgb_led_1.mov Click to play the movie

10 DC Motor Input analog signal (DC voltage) at SIG port to control motor speed. Input digital signal (HIGH/LOW) at DIR port to control motor direction. Topic Select

11 Exercise Objective: Description: Module List: DC Motor
Using Pulse Switch and Data Switch to control the power and direction of the DC Motor Description: Pressing PA  DC Motor turns ON Releasing PA  DC motor turns OFF SW7 turns ON  DC Motor run counter-clockwisely SW7 turns OFF  DC Motor run clockwisely Module List: 1. fayaduino Nano x 1 2. DC Motor x 1 3. 8 Bits Data Switches (ETS-9000) 4. Pulse Switch (ETS-9000) Check Result - click to play

12 Connection DC Motor Arduino DC Motor D11 SIG Arduino ETS-9000 D2
Pulse Switch – PA DC Motor ETS-9000 DIR 8 Bits Data Switches SW9

13 File Name : dc_motor_1.ino
Source Code DC Motor File Name : dc_motor_1.ino L21 : analog value 900 = (900/1024) x 5 = 4.39V

14 File Name : dc_motor_1.mov
Exercise Result DC Motor File Name : dc_motor_1.mov Click to play the movie

15 Basic Logic Gates HI / LOW HI / LOW …….. …….. HI / LOW HI / LOW
This module provides a handy logic gates for the creation of combinational logic. Topic Select

16 Exercise Objective: Description: Module List: Basic Logic Gates
Understand how to use Basic Logic Gates module Description: NOT Gate : Input = TTL Generator Output = LED L0 XOR Gate : Input = 2 Pulse Switch Output = LED L3 Module List: 1. fayaduino Nano x 1 2. Basic Logic Gates x 1 3. Function Generator (ETS-9000) 4. 8 Bits Data Switch (ETS-9000) Check Result - click to play

17 Connection Basic Logic Gates Basic Logic Gates ETS-9000 NOT_I
Function Generator TTL NOT_O 8 Bits LED L11 XOR_I1 Data Switch SW9 XOR_I2 Data Switch SW8 XOR_O 8 Bits LED L8 Arduino ETS-9000 GND Function Generator GND Important : You must connect Arduino GND to Function Generator GND to output signal.

18 File Name : basic_logic_gates_1.mov
Exercise Result Basic Logic Gates File Name : basic_logic_gates_1.mov Click to play the movie

19 Touch Slider Red Blue Orange Green Press Copper Pad  HI
Release Copper Pad  LOW P7 P6 P5 P4 P3 P2 P1 P0 Red Blue Orange Green LOW HI Topic Select

20 Exercise Objective: Description: Module List: Touch Slider
Using fayaduino Nano and Touch Slider Module to create a tiny digital piano. Description: When touching one of the buttons on Touch Slider Module, the Arduino receive the signal and send corresponding frequency to the Speaker on ETS-9000 Module List: 1. fayaduino Nanox 1 2. Touch Slider x 1 3. Speaker (ETS-9000) Check Result - click to play

21 Connection Touch Slider Arduino Touch Slider D12 P0 D11 P1 D10 P2 D9
ETS-9000 D2 Speaker- Up GND Speaker-Low

22 File Name : touch_slider_1.ino
Source Code Touch Slider File Name : touch_slider_1.ino L18~L20: Create a note array storing the frequency of each notes. The value of the each not frequency is defined at pitches.h L32~L33: reading D5~D12 again and again L35: play corresponding note. For example, if D5 == HIGH  P7 touched  Play notes[0] = Note_C4 = DO if D8 == HIGH  P4 touched  Play notes[3] = Note_G4 = FA

23 File Name : touch_slider_1.mov
Exercise Result Touch Slider File Name : touch_slider_1.mov Click to play the movie

24 IR Transmitter & Receiver
start Transmitter Receiver After signal changes from HIGH to LOW, the module transmits serial signal from transmitter to receiver. Topic Select

25 IR Transmitter & Receiver
Exercise IR Transmitter & Receiver Objective: Using IR Transmitter and Receiver to transmit pulse data and show the result at 8 Bits LED Display on ETS-9000 Description: When pressing Pulse Switch PA, the LED lights up from 0 to 7 repeatedly Module List: 1. fayaduino Nano x 1 2. IR Transmitter x 1 3. IR Receiver x 1 4. Pulse Switch (ETS-9000) 5. 8 Bits LED Displays (ETS-9000) Check Result - click to play

26 IR Transmitter & Receiver
Connection IR Transmitter & Receiver ETS-9000 IR Transmitter Pulse Switch - A Din Arduino IR Transmitter D2 Dout Arduino ETS-9000 D5 8 Bits LED –L4 D6 8 Bits LED – L5 D7 8 Bits LED – L6 D8 8 Bits LED – L7 D9 8 Bits LED – L8 D10 8 Bits LED – L9 D11 8 Bits LED – L10 D12 8 Bits LED – L11

27 IR Transmitter & Receiver File Name : ir_transmitter_receiver_1.ino
Source Code IR Transmitter & Receiver File Name : ir_transmitter_receiver_1.ino Arduino ETS-9000 D5 8 Bits LED – 0 D6 8 Bits LED – 1 D7 8 Bits LED – 2 D8 8 Bits LED – 3 D9 8 Bits LED – 4 D10 8 Bits LED – 5 D11 8 Bits LED – 6 D12 8 Bits LED – 7 L33~43 : (1) interrupt service routine for interrupt pin D2 (2) counterFlag is same as digital pin connect to LED 0~7

28 IR Transmitter & Receiver File Name : ir_transmitter_receiver_1.mov
Exercise Result IR Transmitter & Receiver File Name : ir_transmitter_receiver_1.mov Click to play the movie

29 Step Motor Step : 1 2 3 4 A : 1 0 0 0 B : 0 1 0 0 A : 0 0 1 0
CCW CW Step : A : B : A : B : Step Pulse Input step pulse at four phase A, B, /A, /B to control the distance, speed, and direction of the Step Motor. Rotor Step Angle (1-2Phase on) : 5.625° Rotor Step Angle (1 Phase on ) : 11.25° Gear Ratio : 64:1 LED A, B, /A, /B represents the status of corresponding phase being driven. Topic Select

30 Exercise Objective: Description: Module List: Step Motor
Using Data Switches on ETS-9000 to control speed and direction of the Step Motor Description: SW0 turns ON/OFF  rotate clockwisely / counter-clockwisely SW1 turns ON  speed + 100 SW2 turns ON  speed + 200 SW3 turns ON  speed + 300 SW4 turns ON  speed + 400 Module List: 1. fayaduino Nano x 1 2. Step Motor x 1 3. 8 Bits Data Switches (ETS-9000) Check Result - click to play

31 Connection Step Motor Arduino ETS-9000 D6 SW0 D5 SW1 D4 SW2 D3 SW3 D2
B A3 /A A4 /B

32 File Name : step_motor_1.ino
Source Code -1 Step Motor File Name : step_motor_1.ino L45~48 : Use SW0 to decide motor direction (HIGH = CW ; LOW = CCW) L50~54 : Use SW1~4 to decide motor speed SW1  speed +100 SW2  speed +200 SW3  speed +300 SW4  speed +400

33 File Name : step_motor_1.ino
Source Code -2 Step Motor File Name : step_motor_1.ino Use Arduino Stepper library [ #include<Stepper.h> ] to control step motor motor.setSpeed (x) to set the motor speed x is revolution per minute (RPM) for rotor. However, the gear ratio for this step motor is 1:64, as the result, the RPM for shaft is x/64. For example: motor.setSpeed(768) = 768 ROM for rotor = 768/65 = 12 RPM for motor shaft = 60/12 = 5 sec per revolution motor.step (y) to set motor moving steps  y is the number of steps. One revolution requires 2048 steps.

34 File Name : step_motor_1.mov
Exercise Result Step Motor File Name : step_motor_1.mov Click to play the movie

35 Light Sensor Light  Vout Light  Vout
NC = No Connection The value of output voltage Vout is proportional to the light intensity detected at light sensor. Adjust the sensitivity of light sensor from resistor trimmer. Topic Select

36 Exercise Objective: Description: Module List: Light Sensor
Using brickNano and Light sensor to measure light intensity. Description: The result of light intensity is measured and show at Digital Display from 00 to 99 on ETS-9000, the stronger the light intensity, the higher display value. Module List: 1. fayaduino Nano x 1 2 Light Sensor x 1 3. Digital Display (ETS-9000) Check Result - click to play

37 Connection Light Sensor Arduino Light Sensor A4 Vout Arduino ETS-9000
Digital Displays D0 - A D8 Digital Displays D0 - B D7 Digital Displays D0- C D6 Digital Displays D0 - D D5 Digital Displays D1 - A D4 Digital Displays D1 - B D3 Digital Displays D1 - C D2 Digital Displays D1 - D

38 File Name : light_sensor_1.ino
Source Code - 1 Light Sensor File Name : light_sensor_1.ino A B C D DEC L16~L25: Create a Table to store BCD information

39 Source Code - 2 Light Sensor 0~99 0~1023
L48: Scale the light intensity from (0~1023) to (0~99)

40 Source Code - 3 Light Sensor
L65~L66 : Calculate tens and units digit of displayNumber For example, if number = 24  tens = 124%100 / 10 = 24 / 10 = 2 units = 124 % 100 % 10 = 24 % 10 = 4 For example, if distance = 57  tens = 57%100 / 10 = 57 / 10 = 5 units = 57 % 100 % 10 = 57 % 10 = 7

41 Source Code - 4 Light Sensor units tens Display Value = 69 cm
L67~L78: D1, D0 from Digital Display to represent tens, units digit of the light sensor value.

42 Source Code - 5 Light Sensor
L86~L98 : Use bcdTable to decode the decimal number into binary number.

43 File Name : light_sensor_1.mov
Exercise Result Light Sensor File Name : light_sensor_1.mov Click to play the movie

44 Humidity & Temperature Sensor
#include<dht.h>; dht11.temperature to request temperature data dht11.humidit to request humidity data Topic Select

45 Humidity & Temperature Sensor
Exercise Humidity & Temperature Sensor Objective: Show Temperature and Humidity at Digital Display on ETS-9000 Description: When Data Switch = LOW Show Temperature at Digital Display When Data Switch = HIGH  Show Humidity at Digital Display Module List: 1. fayaduino Nano x 1 2. Humidity and Temperature Sensor x 1 3. Data Switch (ETS-9000) 4. Digital Displays Check Result - click to play

46 Humidity & Temperature Sensor Temperature & Humidity Sensor
Connection Humidity & Temperature Sensor Arduino Temperature & Humidity Sensor A0 Data Arduino ETS-9000 A5 Data Switches- SWˋ D9 Digital Displays D0 - A D8 Digital Displays D0 - B D7 Digital Displays D0 - C D6 Digital Displays D0 - D D5 Digital Displays D1 - A D4 Digital Displays D1 - B D3 Digital Displays D1 - C D2 Digital Displays D1 - D

47 Source Code Humidity & Temperature Sensor
File Name : humidity_temperature_sensor_1.ino L19 : Please copy the library [DHTlib] in your DVD to Arduino Library L54: Use function .read(DataPin) to read both temperature and humidity data L55: Use .temperature to store the temperature just read L56: Use .humidity to store the humidity just read

48 Exercise Result Humidity & Temperature Sensor
File Name : humidity_temperature_sensor_1.mov Click to play the movie

49 IR Distance Sensor Vout Light Emitter Light Receiver This device outputs the voltage corresponding to the detection distance. Distance measuring range : 20 to 150 cm Topic Select

50 Exercise Objective: Description: Module List: IR Distance Sensor
Using Nano and IR Distance Sensor to measure object distance. Description: The IR Distance Sensor detects object distance and show the result at Digital Display on ETS-9000. Module List: 1. fayaduino Nano x 1 2. IR Distance Sensor x 1 3. Digital Display (ETS-9000) Check Result - click to play

51 Connection IR Distance Sensor Arduino IR Distance Sensor A7 Vout
ETS-9000 D11 Digital Displays D2 - A D9 Digital Displays D0 - A D8 Digital Displays D0 - B D7 Digital Displays D0 - C D6 Digital Displays D0 - D D5 Digital Displays D1 - A D4 Digital Displays D1 - B D3 Digital Displays D1 - C D2 Digital Displays D1 - D

52 Source Code - 1 IR Distance Sensor
L49 : Convert analog value into voltage. Since arduino ADC scale 5V into 1024 analog value, the sensor output voltage  analog value * (5 / 1024) L50 : Since the distance is a function of output voltage, we can use [Regression Data Analysis] from excel to fit the distance-to-voltage data provided in sensor datasheet (GP2Y0A02YK.PDF) to create the equation.

53 Source Code - 2 IR Distance Sensor
L64~L66 : Calculate hundreds, tens and units digit of the distance For example, if distance = 124  hundreds = 124 / 100 = 1  tens = 124%100 / 10 = 24 / 10 = 2 units = 124 % 100 % 10 = 24 % 10 = 4 For example, if distance = 57  hundreds = 57 / 100 = 0  tens = 57%100 / 10 = 57 / 10 = 5 units = 57 % 100 % 10 = 57 % 10 = 7

54 Source Code - 3 IR Distance Sensor hundreds units tens
Distance = 165 cm Use LED1 from 8bits LED Displays and D2, D1 from Digital Display to represent hundreds, tens, units digit of the distance.

55 File Name : ir_distance_sensor_1.mov
Exercise Result IR Distance Sensor File Name : ir_distance_sensor_1.mov Click to play the movie

56 Color Sticker Din Dout Vcc Data Gnd Use 3 signal wires to cascade a longer Color Sticker. To control Color Sticker, library <FastLED.h> is required. Use CRGB class_name[NUM_LEDS] to define CRGB class Use FastLED.addLeds<WS2812B, DATA_PIN, RGB>] to setup parameters. Function [.setBrightness] is used to set brightness of all connected LEDs Function [CRGB(Red, Green, Blue)] is used to set each LED color with RGB mode. Function [CHSV(Hue, Saturation, Value)] is to set each LED color with HSV mode. Function [FastLED.show] is used to show LED with assigned color. Topic Select

57 Exercise Objective: Description: Module List: Color Sticker
Using Pulse Switche on ETS-9000 to control LED color patterns Description: LED color patterns order: Rainbow with glitter  Confetti  sinelon  bpm  juggle  fire Module List: 1. fayaduino Nano x 1 2. faya Color Sticker x 1 3. Pulse Switch (ETS-9000) Check Result - click to play

58 Connection Color Sticker Arduino Color Sticker D6 Din
(GND) (Din) (VCC) Arduino ETS-9000 D2 Pulse Switch – A To PulseSwitch-A

59 File Name : color_sticker_1.ino
Source Code - 1 Color Sticker File Name : color_sticker_1.ino (1) This exercise require FastLED library. Please copy [fastLED-3.1.6] folder and put in [Arduino / Libraries] Folder The code from this exercise is modified from the FaseLED example code [DemoReel100].

60 File Name : color_sticker_1.ino
Source Code - 2 Color Sticker File Name : color_sticker_1.ino L74~L86 : to store current LED mode. min = 0, max = 5, total 6 modes L78~L80 : debounce routine Push Button => Hold Button => Release Button delay (20) to ignore bouncing effect Use while (state) to do nothing and wait until releasing button delay (20) to ignore bouncing effect

61 Source Code - 3 Color Sticker 64 ledMode0()  Rainbow with Glitter 96
L91 : gHue is the starting color for HSV color mode. 32 is the next Hue number L93 : addGlitter(20); 20 is the number of glitter 64 96 32 128 160 224 192 256 / 8 = 32

62 Source Code - 4 Color Sticker ledMode1()  confetti
L98 : number 50 is the bright value to be decrease for example, if current brightness is 250, it will fade to 200 L99 : select a random LED L100 : set the selected LED to a random hue (0~255), full saturation and fall value

63 Source Code - 5 Color Sticker ledMode2()  sinelon
L106 : number 4 is the bright value to be decrease for example, if current brightness is 250, it will fade to 246 L107 : beatsin16 generates a 16-bit sine wave at a given BPM. 60 is number of beats per minute, and it will oscillates from number 0 to number 7 LEDs L108 : use HSV color mode to select a color

64 Source Code - 6 Color Sticker ledMode3()  bpm
L114 : use this variable to change Beats Per Minute

65 Source Code - 7 Color Sticker ledMode4()  juggle
Change parameters with underscore to see different juggle effect ledMode5()  fire Just try to change some parameters and see different effect

66 File Name : color_sticker_1.mov
Exercise Result Color Sticker File Name : color_sticker_1.mov Click to play the movie

67 IR Pulse Sensor Light Emitter Light Receiver Put the finger on the top of the sensor to get the change of blood volume at output in voltage format. The frequency of the waveform is identical to the heartbeat. Topic Select

68 Exercise Objective: Description: Module List: IR Pulse Sensor
Using IR Pulse Sensor to measure the heart rate BPM (beats per seconds) and show the result at Digital Display on ETS-9000. Description: The value of the heart rates (BPM) shows at Digital Display The sound of each heart beat output at Speaker Module List: 1. fayaduino Nano x 1 2. IR Pulse Sensor x 1 3. 8 Bits LED Display (ETS-9000) 4. Digital Display (ETS-9000) 5. Speaker (ETS-9000) Check Result - click to play

69 Connection IR Pulse Sensor Arduino IR Pulse Sensor A4 Signal Arduino
ETS-9000 D11 Digital Displays D2 - A D9 Digital Displays D0 - A D8 Digital Displays D0 - B D7 Digital Displays D0 - C D6 Digital Displays D0 - D D5 Digital Displays D1 - A D4 Digital Displays D1- B D3 Digital Displays D1- C D2 Digital Displays D1- D D13 Speaker – Up GND Speaker – Low

70 Source Code - 1 IR Pulse Sensor
L70 : the code for detecting rising edge L73 : use two rising edge to calculate waveform period L75 : heart rate = beats per minutes = frequency * 60 = = 60 / period (ms) = / period (s) input last input

71 Source Code - 2 IR Pulse Sensor
L76 : Ignore heart rates which are too high or too low. L80 : is the heart rate is valid, output a beep. L81: is the heart rate is valid, print the report at serial Monitor.

72 Source Code - 3 IR Pulse Sensor L89 : when heart rate changes
L91~L99 : alternatively store heart rate data in array L101 : always average the heart rate in this subroutine

73 Source Code - 4 IR Pulse Sensor First row shows single hear rate
Second row shows 7 heart rates Third row shows the average of 7 heart rates

74 File Name : ir_pulse_sensor_1.mov
Exercise Result IR Pulse Sensor File Name : ir_pulse_sensor_1.mov Click to play the movie

75 Appendix A : Arduino Installation
(1) Visit ( and click SOFTWARE (2) Save file in your computer and follow the instructions to install Arduino IDE in your computer Topic Select

76 Appendix B : fayaduino Nano Overview
Compatible to Arduino Nano Use miniUSB interface Topic Select

77 Appendix C : brickNano Installation (1/3)
(1) Connect fayaduino Nano to Windows PC with miniUSB cable (2) Windows should search device and install the device driver automatically. When success, A [USB Serial Port (COMx)] should and list it in Device Manager.

78 Appendix C : brickNano Installation (2/3)
(3) If windows does not install the driver automatically, please install the driver manually. (3-1) Right click and select Properties (3-3) Browse my computer for driver software (3-4) Browse folder [Arduino/drivers/FTDI USB Drivers] to complete the driver installation. (3-2) Update Driver

79 Appendix C : brickNano Installation (3/3)
(4) When driver installed successfully, the device manager and Arduino IDE should appear the COM Port number for brickNano. Topic Select

80 Appendix D : Brick Post Installation
Use brick post to interface faya modules with bricks. Brick post is stackable, as shown in above pictures. Topic Select

81 Appendix E : Brick Cap Installation
Cover the brick post with brick cap to prevent brick post loose from faya modules. Topic Select

82 Appendix F : Power Wire Usage
Type A : Connector-to-Pins Type B : Connector-to-Connector Type B Type B Type A 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. 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. Topic Select

83 Appendix G : Signal Wires Usage
Signal Wire is used to connect signals between Arduino and faya module pins. The size of the signal wire is AWG22 Topic Select

84 Appendix H : Project Setup (1/2)
VCC GND Connect Mini-USB cable from Nano to USB Port. Connect red pin of Type A Power Wire to Nano VCC Connect black pin of Type A Power Wire to Nano GND Connect connector of Type A Power Wire to other module.

85 Appendix H : Project Setup (2/2)
Connect Type B usb cable from the back of ETS-9000 to your PC usb port Topic Select

86 Reference Getting Started with Arduino
Arduino Tutorial Arduino Programming Language Reference Arduino Playground fayalab Module specification and sample code

87 Technical Support contact us at fayalab@kandh.com.tw K&H MFG CO., LTD.
5F., No.8, Sec. 4, Ziqiang Rd., Sanchong Dist., New Taipei City 241, Taiwan R.O.C. TEL:  FAX: WEB:


Download ppt "NGT-601 : faya-nugget Combo Pack"

Similar presentations


Ads by Google