General

3.8 Women’s Day to Light the Magic Lantern by LOVE

userHead anonymous 2018-03-08 14:03:58 7733 Views0 Replies
In this Queen’s Day, Women’s Day, I prepared a special gift to her.
A lantern can only be lighted when she accept my flower.
She’s so happy, wish all girls, women could be happy and beautiful.


This is what the magic Chinese lantern looks like, designing of all best wishes, may you have the prosperity, wish you to be happy.

Talking about the beginning of this lantern, we need to back to the lantern festival activity held by DFRobot. This one, which made by me, has attracted all voters' attention. Besides the fine appearance, it can be lighted by human body energy! When all my friends(about 140 people) holding their hands, the current went through their body and finally lighting the central lantern, how magic it is! Everyone just screamed of joys, so happy.


Now let’s check the way to make it.
In hardware, I chose a DFRobot conductivity switch sensor and a DFRobot Romeo BLE mini board.

DFRobot Romeo BLE mini board
1. The board equipped with a two-way motor drive of 1.2A, perfect to control a 5W LED and a cooling fan.
2. It supports a maximum of 10V input, so I can connect to a 7.4V lithium battery.
3. It provides Bluetooth wireless burning, so if I want to modify the code, I needn’t take the lantern from the ceiling.
4. It is small and adopts a Gravity interface, convenient to connect other Gravity modules and integrate into DIY projects.


The Gravity Conductivity Sensor Switch module can be used to detect if an object has electrical conductivity. Its maximum detection value is 10MΩ. It can detect not only coins, wires, metal and other good conductors, but also the human body, fruit, plants and other conductors.

By touching the positive and negative terminals of the conductive switch, you can change the output state of the module. Use this to make interactive applications such as fruit pianos, musical wind chimes or interactive video game controllers so Super Mario using a bunch of bananas.



Hardware
1. Gravity: Conductivity Sensor Switch - DFRobot x1
2. Romeo BLE mini - Small Arduino Robot Control Board with Bluetooth 4.0 x1
3. Aluminum Heatsink Cooling Fan x1
4. High Bright LED - Warm White x1
5. FIT0137 Li-pol Battery-7.4V Lithium Battery x1
6. FIT0398 7.4V Lipo Battery Charger x1
7. FIT0151 DC Barrel Jack Adapter - Female x1

Tools
1. FIT0456 Straight/Cross Screwdriver x1
2. Wire Cutting Pliers x1
3. FIT0351-OE Flat Noodle Micro USB Cable 1.2m x1
4. Sticker
5. Computer x1

Software
1. Arduino IDE (allocated in computer)
2. Lantern_Festival.ino

Producing Steps
1. Arduino IDE (Version requirements: V1.6.+), Click to Download Arduino IDE from Arduino®.
2. Connect Romeo BLE mini board to usb interface of PC via micro usb wire, then you will find a new device. Select driver file that Arduino IDE brings itself to install. Click to check Arduino Uno drive instruction.
3. Click Tools -> Board to select Arduino Uno board when installed drive.

Click Tools -> Port to choose a newly-created serial port.
Please note that every PC has different serial port number.


Ready to go, let’s use an official example to check whether a Romeo BLE mini could be uploaded successfully.
Click File -> Example -> 01.Basics -> Blink to open Blink, click upload button that is below the Edit.

Once download successfully, you will see the notify’ Done uploading’ and L light in the Romeo BLE mini board will flash.

Hardware Connection
Wiring the copper wire, the positive anode of LED has a semicircle nick, connect it to the red wire; the negative anode should be connected to a black wire.


Connect LED to M1 positive and negative anode of Romeo BLE mini-board and connect a fan to M2 side, shown as below.


Pulling adhesive plaster of the cooling chip and stick the LED to the chip.


Install the Gravity Conductivity Sensor to D2 of Romeo BLE mini, please pay attention to corresponding color to color, add the clips.


Connect the battery to VIN positive and negative interfaces, shown as below.


Connect to PC via micro USB


Click File -> open to open Lantern_Festival.ino downloaded before in Arduino IDE, click upload arrow icon to upload code to Romeo BLE mini board.


Below is the sample code, it set LED control and fan control interfaces to output, then set electricity conductivity sensor interface as input. As follows, it reads level of electricity conductivity sensor: if the conductivity exists, the sensor output high level HIGH will control LED and fan to switch on; or power off two devices.
Code: Select all
void setup() {
  // put your setup code here, to run once:
  // make the sensorInput's pin an input:
  pinMode(sensorInput, INPUT);

  // make the Motor driver's pin an output:
  pinMode(E1, OUTPUT);
  pinMode(E2, OUTPUT);
  pinMode(M1, OUTPUT);
  pinMode(M2, OUTPUT);
  pinMode(E1, OUTPUT);

  //stop the cooling fan and turn off the LED lamp
  analogWrite (E1, 0);
  analogWrite (E2, 0);
  digitalWrite(M1, HIGH);
  digitalWrite(M2, LOW);
}

void loop() {
  // put your main code here, to run repeatedly:
  // read the Conductivity Switch Sensor input pin:
  int sensorState = digitalRead(sensorInput);

  //if Conductivity Switch Sensor output HIGH,turn on LED lamp and cooling fan.
  if (sensorState == HIGH) {
    analogWrite (E1, 255);     //PWM 100% turn on the LED lamp
    analogWrite (E2, 255);     //PWM 100% turn on the cooling fan
  }
  else {
    analogWrite (E1, 0);     //PWM  0% turn off the LED lamp
    analogWrite (E2, 0);     //PWM  0% turn off the cooling fan
  }
}
Pace battery and Romeo BLE mini board to a paper box as below.


Install fan and LED to one side of the box


Envelop the box with adhesive plastic, uncover the joints of Gravity Conductivity Sensor, LED and battery.


Fix electric parts to the lantern.
Now let’s welcome our leading role: lantern. All making materials can be bought from stationary or E-bay, Amazon, Taobao.


Fix all control equipment to the lantern.



Try to light the lantern
140 people, han in hand, when everyone holding hands, the lantern lighted.
Happy Women’s Day!