loading

This instructables shows how to build a smart lamp able to connect the the Chic'on service platform. (More information on http://www.chicon.fr)

Since 2016 27th of March, a new version of chicon Ecosystem is now on line. You can turn your Android mobile phone to a chic'on compatible lamp. Go to http://www.chicon.fr/ to download the apk.

This lamp will be able to run application hosted on the Chic'on application service cloud such as:

  1. Meteo
  2. Air pollution level (France only)
  3. Time traffic
  4. Reminder.
  5. Since new version IFTTT is now compatible !
  6. Since new version Openhealth know flue, gastroenteritis, louse intensity in your region (FR only)
  7. And more...

You need :

  1. An arduino UNO
  2. Wifi Shield
  3. 3xRGB LED - common anode
  4. 2xGreen LED
  5. 2xRed LED
  6. 1x 10K Resistor for the switch
  7. 2x 50Ohm Resistors (for status led)
  8. 2x 10K Resistors (for the two ICs)
  9. 2x TLC5916 TI IC
  10. 1x switch
  11. 4x 10x10cm Plexi squares(blured)
  12. 1xquart round wood stick (around 1m5 0.8cm radius)
  13. 1x3x0.8rectangle wood stick (around 30cm.
  14. 1x wood board (around 50x50x0.3cm )
  15. A chic'on account (request on http://www.chicon.fr/) or your own chic'on server instance (source code available on github Here)

Step 1: Building Circuit

The circuit is quite simple.

It uses two tlc 5916 linked together and a small breadboard. I used the good schematic and tutorial to cascade the two IC from here

The breadboard and schematic view shows the complete circuit. You can try it before building your cube. RGB leds, switch and status led will be wired during the cube build.

You will find step by steps schematics:

  1. First : with the two ICs tlc5916
  2. Second : with the two ICs and the switch
  3. Third : with the two ICs, the switch and RGB leds
  4. Fourth : with the two ICs, the switch, RGB leds and status leds

When building your cube (see next steps), start with only the ICs wired (first schematic). You will then wire swtich, RGB leds, status leds step by step.

Step 2: Building the Cube

The Cube is made of three parts:

  1. Plexi part
  2. Led part
  3. footer part

Step 3: The Plexi Part

To build the plexi part you need:

  • 4x Plexi square (10x10cm - light must go through)
  • A quarter round wood stick.
  • Glue
  • 10x10cm square cut from the wood board to make the logo (Optional)
  • Iron sticker to color the logo (Optional)
  1. Cut the wood sticks 4x 10,8cm stick and 4x 13,8cm sticks (I add .8cm because of the stick radius length)
  2. Stick the plexis on the sticks like the enclosed picture. Leave the back empty.
  3. Cut three peace of wood in the 10x10 square to build the chic'on logo. Keep the rest of the wood sqaure it will be used later to build the LED part
  4. Add iron colered stickers on the logo parts and stick them in the middle of the front end.

Step 4: The LED Part

To build the LED part you need:

  • 2x 13x8cm rectangles of wood (To make the inner X)
  • 1x 9,5x13,2 rectangle of wood (To make the front end)
  • Loss of the logo square (To make the front end logo cover)
  • Small blocks to fix logo cover
  • 3xRGB Leds
  • 2x Green Leds
  • 2x Red leds
  • Electronic wires (grey, red, blue, green)
  1. Soldier each RGB leds on the electronic wires
  • The RED pin on a red cable
  • The GREEN pin on a green cable
  • The BLUE pin on a blue cable
  • The ANODE pin on a grey cable.

Keep around 20cm of cable, you will cut them at the right length when plugging on the circuit.

  1. Soldier in series the two Green Leds
  2. Solider in series the two Red Leds

Keep around 20cm of cable, you will cut them at the right length when plugging on the circuit.

  1. Building the X.
  • The schematic shows how to build the inner x.
  • Just take to 13x9,5 cm rectangle of wood. Make a notch to fit the two part together.
  • Drill a hole in each rectangle to pass through left and right face RGB led wires.
  • Glue them when building the front part to build a 10x9,5cm big X.
  1. Building the front
  • You need five peace of wood to build the front part.
    • One 13,2x9,5cm rectangle
    • Two 10x0,5 block to fix logo cover
    • Two logo cover (from logo cut loss)
  • Drill four holes on the 13,2 x9,5cm rectangle:
    • One for red status led wires
    • One for green status led wires and top face RGB led wires
    • One for the switch wires
  • Glue the two blocks
  • Fix red and green status leds and pass their wires
  • Fix the RGB led wires
  • Glue the two logo covers.

Step 5: The Footer Part

To build the footer part you need:

  • 1x11,6x11,6 square made from the wood board (for the bottom)
  • The rectangle wood stick
  • 1x switch
  • Your circuit
  • Electronic wires
  1. Soldier the switch on two electronic wire. Keep around 20 cm of cable
  2. Cut three peace in the rectangle wood of 10cm each
  3. Drill in the middle of one of the rectangle - diameter of the switch - it will be the front of the cube
  4. Put the switch in the hole.
  5. Glue the thee rectangle on the 11,6cm square
  6. Glue the breadboard with only the IC in place.
  7. connect the switch to the breadboard (Look at the schematic in the build the circuit step)
  8. Add the led part build at the previous step
  9. connect the RGB leds on the breadboard (Look at the scematic in the build the circuit step)
  10. Connect the status leds on the breadboar (Look at the schematic in the build the circuit step)
  11. Cover with the plexi part

Step 6: Linking the Arduino to the Breadboard

From the Arduino you have to plug:

  • +5v to the breadboard border (+5v)
  • Grd to the other breadboard border (Grd)
  • To the first IC:
    • Data (PIN 3 of the arduino - PIN 2 of the TLC5916)
    • Clock (PIN 5 of the arduino - PIN 3 of the TLC5916)
    • Latch (PIN 8 of the arduino - PIN 4 of the TLC5916)
  • Green LED to the PIN 6 of the arduino
  • Red LED to the PIN 14 of the arduino (analog 0)
  • Switch to the PIN 2 of the arduino

Step 7: The Code

The code is available at hte following github repository: https://github.com/roiKosmic/chiconCube/

You will need the shiftPWM library available at https://github.com/elcojacobs/ShiftPWM

You will also need the wifi library available in the official Arduino IDE.

The main program was cut in 4 main files:

  • json.ino : This file is decoding the json sent by the chic'on server.
  • wifiManager.ino : This file manages the wifi connection. Sending/receiving data to/from chic'on server.
  • ledPorcessing.ino : This file manages the leds (turning them on/off, intensity and colors)
  • chiconWifiPWDM_NOSD : This file is the main file.

You will need to change two values on the config file (config.h) :

  • String magicNumber = "";
  • String sNumber ="";
  • static const char ssid[] = ""

  • static const char pass[] = "";

You must instert the one you will receive once you request an access to the chic'on application cloud (see next step). If you run your own Chicon Application cloud, you should insert the value you wish in accordance with the value int the server database (look at the github chiconServer repo Here)

Step 8: Creating a Chic'on Account and Associate Your Device

To request an account,go to the registration form on http://www.chicon.fr/ and fill in the registration form.

Then log in to the site with your fresh created account and:

  • Request a serial number for your newly created cube (you will receive serial number by e-mail)
  • Add your cube to your account (you will receive the magic number)
  • Update your Arduino code with Serial number and Magic number.

Now you can configure your cube from your account page and enjoy your smart cube !

N/B: if you do not want to have a chic'on account and enjoy your smart cube, you must run your own chic'on server. Go to the chicon server github wiki and follow the how-to.

Step 9: Adding Application to Your Account

When you create an account no application are linked. You must add application to your account to be able to assign them on your device.

  • Log in with your account
  • On the application page, click add to cart button on application you want.
  • Click on "my cart" link a the top right corner and confirm your cart.
  • Application are now available on all your devices configuration page

Step 10: Associate Service to Your Device

  • On you account page, from the device list, click on the green arrow to reach the device configuration page.
  • Drag application to the center of the screen to add application to your device (ex: Weather application)
  • Fill in the different configuration popup forms (ex: Weather forecast for tommorow in Lille - North of France)
  • Reboot your Chic'on lamp for changes to take effect

The last images show my cube with the air quality application (not the weather). At that time quality of air was bad in Lille.

Step 11: Going Further

To go further, you can build your own smart lamp and connect to the chic'on application cloud as soon as you follow the chic'on smart lamp protocol and lamp specifications (described in github wiki available Here)

If you build your own lamp, please post an "instructable". Give me your lamp details (name and number of led groups) by sending an e-mail to me thanks to the chicon contact form on the website.

You can reuse the cube code and just update few peace of codes. Look at the github wiki how to build your own lamp and share it !

You can also, as long as you know a bit of php, write your own Chic'on application able to run on the public www.chicon.fr Chicon Application Cloud or on your private server.

This wiki describe how to write your own application: Here

<p>What if you wanted to connect this to an actual bulb instead of 3 LED's?</p>
<p>It depends of your bulb. </p><p>If it is a controlable bulb like a Hue Philips or Samsung, we can developp a kind of gateway. I have done a beta version of a Hue gateway, than can be installed on a Rasperry Pi (I can post the beta code on my github repo if you are interested)</p><p>If it is a Bulb without any api, you need to build your own circuit pluged to your bulb and adapt the client code. On my github, the wiki describes the protocol and how you can build your own chic'on compatible device: <a href="https://github.com/roiKosmic/chiconCube/wiki">https://github.com/roiKosmic/chiconCube/wiki</a></p>
You got featured! Told you!
<p>Yes ! Thanks to Anna (asergeeva).</p><p>I am very happy to have my first instructable featured. </p>
<p>Very nice and interresting project ! </p><p>It's exaclty what i want , I will try to build my own lamp </p><p>thank you for this contribution</p>
<p>Hello,</p><p>Thank you for your comment. Do not hesitate to ask if you need some help in your build. </p><p>If you have some ideas of additional application, I can try code them.</p>
<p>This is interesting. Thank you for sharing!</p>
<p>You are welcome. Hope you will take part to the project by buiding one cube ! :)</p>

About This Instructable

6,074views

45favorites

More by roiKosmic:Smart Lamp Chic'on Cube 
Add instructable to: