MoodBoxByFaBteam : Différence entre versions

(Cette version a été marquée pour être traduite)
Ligne 2 : Ligne 2 :
 
|Main_Picture=MoodBoxByFaBteam_000_MoodBoxByFaBteam_Introduction.jpg
 
|Main_Picture=MoodBoxByFaBteam_000_MoodBoxByFaBteam_Introduction.jpg
 
|Licences=Attribution (CC BY)
 
|Licences=Attribution (CC BY)
|Description=<translate>Modular box: minimalist weather station and jukebox with Arduino</translate>
+
|Description=<translate><!--T:1--> Modular box: minimalist weather station and jukebox with Arduino</translate>
 
|Area=Art, Decoration, Electronics, Music and Sound
 
|Area=Art, Decoration, Electronics, Music and Sound
 
|Type=Creation
 
|Type=Creation
Ligne 16 : Ligne 16 :
 
}}
 
}}
 
{{ {{tntn|Introduction}}
 
{{ {{tntn|Introduction}}
|Introduction=<translate>This modular box is a 3-tier set. Once on, it provides basic weather station information (temperature, humidity, atmospheric pressure) but becomes a "Mood box", here a jukebox actually, when properly activated.
+
|Introduction=<translate><!--T:2-->
 +
This modular box is a 3-tier set. Once on, it provides basic weather station information (temperature, humidity, atmospheric pressure) but becomes a "Mood box", here a jukebox actually, when properly activated.
  
=== Preamble ===
+
=== Preamble === <!--T:3-->
 
This project is a group project (FaB team) carried out during a French hybrid training program called "Fabrication numérique" (CNC machining and fabrication) - class of 2018, July.
 
This project is a group project (FaB team) carried out during a French hybrid training program called "Fabrication numérique" (CNC machining and fabrication) - class of 2018, July.
  
 +
<!--T:4-->
 
This final group project involves some of the know-how acquired during the training program and seals the deal. It is complementary with the "Bentolux" project which  should be documented and referenced soon on wikifab.org.
 
This final group project involves some of the know-how acquired during the training program and seals the deal. It is complementary with the "Bentolux" project which  should be documented and referenced soon on wikifab.org.
  
 +
<!--T:5-->
 
Instructions for the project were:
 
Instructions for the project were:
 
* create a new tier to the box designed and developed during the course of the training program (3 available tiers: 1 base, 1 in Plexiglas, 1 for LCD screen);
 
* create a new tier to the box designed and developed during the course of the training program (3 available tiers: 1 base, 1 in Plexiglas, 1 for LCD screen);
Ligne 28 : Ligne 31 :
 
* program with Arduino at least one user interaction (free choice).
 
* program with Arduino at least one user interaction (free choice).
  
=== Overall specifications ===
+
=== Overall specifications === <!--T:6-->
 
After some thought our group decided to create a musical tier - we called it "Mood box" - to complement the weather station using the base-tier and the LCD-tier.
 
After some thought our group decided to create a musical tier - we called it "Mood box" - to complement the weather station using the base-tier and the LCD-tier.
  
 +
<!--T:7-->
 
Expected behavior is described here below.
 
Expected behavior is described here below.
  
==== Starting the box ====
+
==== Starting the box ==== <!--T:8-->
 
When properly plugged in, the box can be started by using the switch on the front.
 
When properly plugged in, the box can be started by using the switch on the front.
  
 +
<!--T:9-->
 
Starting the box triggers the following events:
 
Starting the box triggers the following events:
 
* figurine set on top spins on its stand;
 
* figurine set on top spins on its stand;
Ligne 42 : Ligne 47 :
 
If no other action is made right away, the box goes in "sleep mode".
 
If no other action is made right away, the box goes in "sleep mode".
  
 +
<!--T:10-->
 
In "sleep mode", temperature and humidity are displayed with a custom message on LCD screen.
 
In "sleep mode", temperature and humidity are displayed with a custom message on LCD screen.
  
 +
<!--T:11-->
 
These custom messages as well as the color set for both the LED-ring and LCD screen depend on current temperature:
 
These custom messages as well as the color set for both the LED-ring and LCD screen depend on current temperature:
 
* LCD and LED-ring color varies from blue to red when temperature rises;
 
* LCD and LED-ring color varies from blue to red when temperature rises;
Ligne 49 : Ligne 56 :
 
* custom message is displayed on LCD screen according to the temperature range currently reading.
 
* custom message is displayed on LCD screen according to the temperature range currently reading.
  
==== Mood box activation and functionalities ====
+
==== Mood box activation and functionalities ==== <!--T:12-->
 
Mood box is activated when the user touches the brass bar placed on top of it - this bar is connected to a capacitive sensor set inside the box.  
 
Mood box is activated when the user touches the brass bar placed on top of it - this bar is connected to a capacitive sensor set inside the box.  
  
 +
<!--T:13-->
 
Upon activation, figurine, LED-ring and LCD wake up.
 
Upon activation, figurine, LED-ring and LCD wake up.
  
 +
<!--T:14-->
 
Cette activation est accompagnée d'une animation conjointe de la figurine, de l'anneau de LEDs et de l'écran LCD.{{Warning|If no other tap is made within 5 seconds following activation, Mood box is deactivated and goes back into sleep mode.}}
 
Cette activation est accompagnée d'une animation conjointe de la figurine, de l'anneau de LEDs et de l'écran LCD.{{Warning|If no other tap is made within 5 seconds following activation, Mood box is deactivated and goes back into sleep mode.}}
  
 +
<!--T:15-->
 
A new tap triggers play mode.
 
A new tap triggers play mode.
  
 +
<!--T:16-->
 
{{Idea|Using the bar has been made simple: the LED-ring shows current tap count as it grows - from 1 to 4 LEDS lit in white}}
 
{{Idea|Using the bar has been made simple: the LED-ring shows current tap count as it grows - from 1 to 4 LEDS lit in white}}
  
 +
<!--T:17-->
 
First time, playlist begins with the first title on the list.
 
First time, playlist begins with the first title on the list.
  
 +
<!--T:18-->
 
The potentiometer button - placed under the on/off switch on the front - is then active and serves as volume control for music.
 
The potentiometer button - placed under the on/off switch on the front - is then active and serves as volume control for music.
  
 +
<!--T:19-->
 
The brass bar remains also active and stands by pending new user interaction.
 
The brass bar remains also active and stands by pending new user interaction.
  
 +
<!--T:20-->
 
While music plays, action differs depending on how many times the bar is touched:
 
While music plays, action differs depending on how many times the bar is touched:
 
* 1 tap: "pause/play", i.e. the music is paused if playing before or begins playing if paused before and LCD displays a message accordingly;
 
* 1 tap: "pause/play", i.e. the music is paused if playing before or begins playing if paused before and LCD displays a message accordingly;
Ligne 73 : Ligne 88 :
 
During play time, LED-ring lights up in a rainbow sequence and figurine spins on top of its stand.
 
During play time, LED-ring lights up in a rainbow sequence and figurine spins on top of its stand.
  
 +
<!--T:21-->
 
Note: Each time a play/pause/next/previous action is taken into account, figurine spins in other direction.
 
Note: Each time a play/pause/next/previous action is taken into account, figurine spins in other direction.
  
==== Deactivating the Mood box ====
+
==== Deactivating the Mood box ==== <!--T:22-->
 
After activating the Mood box or when the music is stopped, if the bar remains idle for more than 5 seconds, sleep mode kicks in and deactivation occurs.
 
After activating the Mood box or when the music is stopped, if the bar remains idle for more than 5 seconds, sleep mode kicks in and deactivation occurs.
  
 +
<!--T:23-->
 
Note: When exiting sleep mode and resuming playing music, the player starts from where it was when deactivated.</translate>
 
Note: When exiting sleep mode and resuming playing music, the player starts from where it was when deactivated.</translate>
 
}}
 
}}
Ligne 90 : Ligne 107 :
 
|Step_Picture_03=MoodBoxByFaBteam_012_MoodBoxByFaBteam_OutilsEtMateriaux_IMG_4014.jpg
 
|Step_Picture_03=MoodBoxByFaBteam_012_MoodBoxByFaBteam_OutilsEtMateriaux_IMG_4014.jpg
 
|Step_Picture_04=MoodBoxByFaBteam_011_MoodBoxByFaBteam_OutilsEtMateriaux_IMG_4011.jpg
 
|Step_Picture_04=MoodBoxByFaBteam_011_MoodBoxByFaBteam_OutilsEtMateriaux_IMG_4011.jpg
|Material=<translate>Necessary materials are listed here below by category.
+
|Material=<translate><!--T:24-->
 +
Necessary materials are listed here below by category.
  
==== For the box ====
+
==== For the box ==== <!--T:25-->
 
* poplar plywood 3mm-thick for laser cutting
 
* poplar plywood 3mm-thick for laser cutting
 
{{Idea|Poplar is pretty cheap and allows precise and fast laser cutting}}
 
{{Idea|Poplar is pretty cheap and allows precise and fast laser cutting}}
Ligne 104 : Ligne 122 :
 
* colored PLA (according to maker's preference) for the figurine and/or scenery set on top of the box
 
* colored PLA (according to maker's preference) for the figurine and/or scenery set on top of the box
  
==== Electronic supplies ====
+
==== Electronic supplies ==== <!--T:26-->
 
* 1 Arduino Uno Rev.3
 
* 1 Arduino Uno Rev.3
 
* 1 MW power supply: 1500mA Rotary Switch Adaptor
 
* 1 MW power supply: 1500mA Rotary Switch Adaptor
Ligne 117 : Ligne 135 :
 
* 1 Seeed Studio "Base Shield V2"
 
* 1 Seeed Studio "Base Shield V2"
  
==== Misc. ====
+
==== Misc. ==== <!--T:27-->
 
* wood glue, to assemble and joint laser cut parts of the box tiers
 
* wood glue, to assemble and joint laser cut parts of the box tiers
 
* cyanoacrylate glue
 
* cyanoacrylate glue
 
* some screws to fasten sensors and other components inside the box tiers
 
* some screws to fasten sensors and other components inside the box tiers
 
* cables and jumper wires</translate>
 
* cables and jumper wires</translate>
|Tools=<translate>Tools used during this project are hereby grouped by use.
+
|Tools=<translate><!--T:28-->
 +
Tools used during this project are hereby grouped by use.
  
==== CAD & programming ====
+
==== CAD & programming ==== <!--T:29-->
 
* Inkscape, 2D CAD software to create and adapt cutting and engraving patterns for the box
 
* Inkscape, 2D CAD software to create and adapt cutting and engraving patterns for the box
 
* TinkerCAD, Blender or any 3D CAD software to create or modify figurine and other box printable components
 
* TinkerCAD, Blender or any 3D CAD software to create or modify figurine and other box printable components
Ligne 130 : Ligne 149 :
 
{{Idea|All 2D- and 3D- source files (.svg, .stl) are available on this page's "Files" tab. }}
 
{{Idea|All 2D- and 3D- source files (.svg, .stl) are available on this page's "Files" tab. }}
  
==== Machines & tools ====
+
==== Machines & tools ==== <!--T:30-->
 
* laser cutter, usually available in FabLabs
 
* laser cutter, usually available in FabLabs
 
{{Warning|Regarding the wood panels to be laser cut, the more plane - hence not warped -  they are the better for precision cut. When buying those panels of plywood, don't hesitate to tell the vendor they will be used for laser cutting.}}
 
{{Warning|Regarding the wood panels to be laser cut, the more plane - hence not warped -  they are the better for precision cut. When buying those panels of plywood, don't hesitate to tell the vendor they will be used for laser cutting.}}
Ligne 141 : Ligne 160 :
 
{{ {{tntn|Separator}}}}
 
{{ {{tntn|Separator}}}}
 
{{ {{tntn|Tuto Step}}
 
{{ {{tntn|Tuto Step}}
|Step_Title=<translate>2D design (new tier for the box)</translate>
+
|Step_Title=<translate><!--T:31--> 2D design (new tier for the box)</translate>
|Step_Content=<translate>Goal was to create a new tier to the original box by using laser cutting of course but also laser engraving.
+
|Step_Content=<translate><!--T:32-->
 +
Goal was to create a new tier to the original box by using laser cutting of course but also laser engraving.
  
 +
<!--T:33-->
 
An engraving pattern was found.
 
An engraving pattern was found.
  
 +
<!--T:34-->
 
This image file was reproduced using Inkscape and Beziers curves.
 
This image file was reproduced using Inkscape and Beziers curves.
  
 +
<!--T:35-->
 
This newly designed pattern was then added to the cutting pattern.</translate>
 
This newly designed pattern was then added to the cutting pattern.</translate>
 
|Step_Picture_00=MoodBoxByFaBteam_103_MoodBoxByFaBteam_Etape1_Plan_de_base_comment_.jpg
 
|Step_Picture_00=MoodBoxByFaBteam_103_MoodBoxByFaBteam_Etape1_Plan_de_base_comment_.jpg
Ligne 154 : Ligne 177 :
 
}}
 
}}
 
{{ {{tntn|Tuto Step}}
 
{{ {{tntn|Tuto Step}}
|Step_Title=<translate>3D design</translate>
+
|Step_Title=<translate><!--T:36--> 3D design</translate>
|Step_Content=<translate>The components to be 3D-printed are the following:
+
|Step_Content=<translate><!--T:37-->
 +
The components to be 3D-printed are the following:
 
* access door for the base tier alongside with the main switch and potentiometer
 
* access door for the base tier alongside with the main switch and potentiometer
 
* button to cover the potentiometer toothed wheel
 
* button to cover the potentiometer toothed wheel
Ligne 169 : Ligne 193 :
 
}}
 
}}
 
{{ {{tntn|Tuto Step}}
 
{{ {{tntn|Tuto Step}}
|Step_Title=<translate>Laser engraving ad cutting of the new box tier</translate>
+
|Step_Title=<translate><!--T:38--> Laser engraving ad cutting of the new box tier</translate>
|Step_Content=<translate>Laser cutting - and engraving - has been carried out within the EdFab in Saint-Denis, France, under the kindly direction of Lola and Arthur: big thanks to both of them!
+
|Step_Content=<translate><!--T:39-->
 +
Laser cutting - and engraving - has been carried out within the EdFab in Saint-Denis, France, under the kindly direction of Lola and Arthur: big thanks to both of them!
  
 +
<!--T:40-->
 
2 other identical tiers have been made using SqyLab facility in La Verrière, France, with the benevolent help of Francis in discovering yet a new source file pre-processing due to a different machine. An equal big thanks to him!
 
2 other identical tiers have been made using SqyLab facility in La Verrière, France, with the benevolent help of Francis in discovering yet a new source file pre-processing due to a different machine. An equal big thanks to him!
  
 +
<!--T:41-->
 
{{Idea|Once the new tier is engraved and cut, one can choose to paint, decorate and customize it at will.}}</translate>
 
{{Idea|Once the new tier is engraved and cut, one can choose to paint, decorate and customize it at will.}}</translate>
 
|Step_Picture_00=MoodBoxByFaBteam_304_MoodBoxByFaBteam_Etape3_mood_box_d_coupe_laser.png
 
|Step_Picture_00=MoodBoxByFaBteam_304_MoodBoxByFaBteam_Etape3_mood_box_d_coupe_laser.png
Ligne 181 : Ligne 208 :
 
}}
 
}}
 
{{ {{tntn|Tuto Step}}
 
{{ {{tntn|Tuto Step}}
|Step_Title=<translate>3D-printing</translate>
+
|Step_Title=<translate><!--T:42--> 3D-printing</translate>
|Step_Content=<translate>All printings needed for the project were made on a Prusa i3 MK3.
+
|Step_Content=<translate><!--T:43-->
 +
All printings needed for the project were made on a Prusa i3 MK3.
  
 +
<!--T:44-->
 
Those are shown as opposite:
 
Those are shown as opposite:
 
* base tier
 
* base tier
Ligne 200 : Ligne 229 :
 
}}
 
}}
 
{{ {{tntn|Tuto Step}}
 
{{ {{tntn|Tuto Step}}
|Step_Title=<translate>Wiring diagram</translate>
+
|Step_Title=<translate><!--T:45--> Wiring diagram</translate>
|Step_Content=<translate>Sensors and other elements are connected to the base-shield set on top of the Arduino Uno as described here after with port numbers.
+
|Step_Content=<translate><!--T:46-->
 +
Sensors and other elements are connected to the base-shield set on top of the Arduino Uno as described here after with port numbers.
  
==== Input ====
+
==== Input ==== <!--T:47-->
 
* Potentiometer: analog input A0
 
* Potentiometer: analog input A0
 
* Capacitive sensor: analog input A1
 
* Capacitive sensor: analog input A1
Ligne 214 : Ligne 244 :
 
** SCK: 13
 
** SCK: 13
  
==== Output ====
+
==== Output ==== <!--T:48-->
 
* LCD: I2C port
 
* LCD: I2C port
 
* MP3 player: D2
 
* MP3 player: D2
 
* LED-ring: D3
 
* LED-ring: D3
  
==== Motor ====
+
==== Motor ==== <!--T:49-->
 
* Step motor
 
* Step motor
 
** IN 1: 10
 
** IN 1: 10
Ligne 226 : Ligne 256 :
 
** IN 4: 8
 
** IN 4: 8
  
==== Power supply ====
+
==== Power supply ==== <!--T:50-->
 
It's important to notice that all in all, components need a lot of power to work properly. There is not enough power available through USB connection (about 5V) and a 9V battery will be depleted faster than you'd like.
 
It's important to notice that all in all, components need a lot of power to work properly. There is not enough power available through USB connection (about 5V) and a 9V battery will be depleted faster than you'd like.
  
 +
<!--T:51-->
 
This is why we used an adaptor that can be plugged into a wall-socket and deliver enough power steadily.
 
This is why we used an adaptor that can be plugged into a wall-socket and deliver enough power steadily.
 
{{Warning|Don't forget to set the power supply rotary switch on 9V in order to get the right power for your box.}}</translate>
 
{{Warning|Don't forget to set the power supply rotary switch on 9V in order to get the right power for your box.}}</translate>
Ligne 237 : Ligne 268 :
 
}}
 
}}
 
{{ {{tntn|Tuto Step}}
 
{{ {{tntn|Tuto Step}}
|Step_Title=<translate>Arduino programming</translate>
+
|Step_Title=<translate><!--T:52--> Arduino programming</translate>
|Step_Content=<translate>Programming  was a bit tricky due to Arduino native sequential working.
+
|Step_Content=<translate><!--T:53-->
 +
Programming  was a bit tricky due to Arduino native sequential working.
  
 +
<!--T:54-->
 
Workarounds must have been found in order to animate several parts of the box not only sequentially but also simultaneously.
 
Workarounds must have been found in order to animate several parts of the box not only sequentially but also simultaneously.
  
 +
<!--T:55-->
 
The first 3 screenshots as shown opposite exhibit declarations for each component of the box and the MoodBox tier.
 
The first 3 screenshots as shown opposite exhibit declarations for each component of the box and the MoodBox tier.
  
 +
<!--T:56-->
 
Main program is a loop which executes the sequence as requested with regards to user interaction. Each sequence is identified with a number:
 
Main program is a loop which executes the sequence as requested with regards to user interaction. Each sequence is identified with a number:
 
* 0: sequence where nothing happens
 
* 0: sequence where nothing happens
Ligne 251 : Ligne 286 :
 
Waiting time management, especially for counting how many times the bar was touched, is using the millis() function to avoid using the delay() function where the whole program is put on hold.
 
Waiting time management, especially for counting how many times the bar was touched, is using the millis() function to avoid using the delay() function where the whole program is put on hold.
  
 +
<!--T:57-->
 
To bypass the sequential functioning, the AccelStepper.h library was used as well as combined commands programmed within routines called from the main loop. This allows for example simultaneousness for both LED-ring effects and step motor spinning.
 
To bypass the sequential functioning, the AccelStepper.h library was used as well as combined commands programmed within routines called from the main loop. This allows for example simultaneousness for both LED-ring effects and step motor spinning.
  
 +
<!--T:58-->
 
{{Idea|This is the trick used in code to prevent stopping the motor from spinning while waiting for a signal from the brass bar.}}
 
{{Idea|This is the trick used in code to prevent stopping the motor from spinning while waiting for a signal from the brass bar.}}
  
==== Libraries ====
+
==== Libraries ==== <!--T:59-->
 
Main program calls libraries functions specific to sensors and components used in the box. Those are listed below:
 
Main program calls libraries functions specific to sensors and components used in the box. Those are listed below:
 
* LCD: "rgb_lcd.h"
 
* LCD: "rgb_lcd.h"
Ligne 274 : Ligne 311 :
 
}}
 
}}
 
{{ {{tntn|Tuto Step}}
 
{{ {{tntn|Tuto Step}}
|Step_Title=<translate>Assembling, testing and finishing off</translate>
+
|Step_Title=<translate><!--T:60--> Assembling, testing and finishing off</translate>
|Step_Content=<translate>Arduino Uno, potentiometer and main switch  are connected to the power supply inside and on the base tier of the box (lower tier).
+
|Step_Content=<translate><!--T:61-->
 +
Arduino Uno, potentiometer and main switch  are connected to the power supply inside and on the base tier of the box (lower tier).
  
 +
<!--T:62-->
 
LCD screen is installed in side the LCD tier (middle tier).
 
LCD screen is installed in side the LCD tier (middle tier).
  
 +
<!--T:63-->
 
MoodBox tier (upper tier) is composed as described here below.
 
MoodBox tier (upper tier) is composed as described here below.
  
 +
<!--T:64-->
 
On box walls are fixed:
 
On box walls are fixed:
 
* the step motor used to animate the figurine - its controller card can be seen on the left on the overview picture as shown opposite
 
* the step motor used to animate the figurine - its controller card can be seen on the left on the overview picture as shown opposite
Ligne 299 : Ligne 340 :
 
}}
 
}}
 
{{ {{tntn|Tuto Step}}
 
{{ {{tntn|Tuto Step}}
|Step_Title=<translate>Now let's dance!</translate>
+
|Step_Title=<translate><!--T:65--> Now let's dance!</translate>
|Step_Content=<translate>MoodBox tier is now up and able to run.
+
|Step_Content=<translate><!--T:66-->
 +
MoodBox tier is now up and able to run.
  
 +
<!--T:67-->
 
Please refer to Introduction and overall specifications to properly use it!
 
Please refer to Introduction and overall specifications to properly use it!
  
 +
<!--T:68-->
 
Thank you for your interest :)</translate>
 
Thank you for your interest :)</translate>
 
|Step_Picture_00=MoodBoxByFaBteam_801_MoodBoxByFaBteam_Etape8_moodbox_cran_d_marrage.png
 
|Step_Picture_00=MoodBoxByFaBteam_801_MoodBoxByFaBteam_Etape8_moodbox_cran_d_marrage.png
 
}}
 
}}
 
{{ {{tntn|Notes}}
 
{{ {{tntn|Notes}}
|Notes=<translate>Figurine used for final presentation comes from Thingiverse (https://www.thingiverse.com/thing:570654).
+
|Notes=<translate><!--T:69-->
 +
Figurine used for final presentation comes from Thingiverse (https://www.thingiverse.com/thing:570654).
  
 +
<!--T:70-->
 
It was chosen by default. First idea was to recreate in 3D the fabulous Fantasia dancing couple: Hyacinth and Ben Ali Gator.
 
It was chosen by default. First idea was to recreate in 3D the fabulous Fantasia dancing couple: Hyacinth and Ben Ali Gator.
  
 +
<!--T:71-->
 
"Bentolux" project - main box design - to be available soon on WikiFab (around July 2018).
 
"Bentolux" project - main box design - to be available soon on WikiFab (around July 2018).
  
 +
<!--T:72-->
 
French page for this project can be found here: https://wikifab.org/wiki/MoodBox</translate>
 
French page for this project can be found here: https://wikifab.org/wiki/MoodBox</translate>
 
}}
 
}}

Version du 14 juillet 2018 à 22:57

Auteur avatarAnne JANNIER | Dernière modification 9/12/2019 par Clementflipo

MoodBoxByFaBteam 000 MoodBoxByFaBteam Introduction.jpg

Introduction

This modular box is a 3-tier set. Once on, it provides basic weather station information (temperature, humidity, atmospheric pressure) but becomes a "Mood box", here a jukebox actually, when properly activated.

Preamble

This project is a group project (FaB team) carried out during a French hybrid training program called "Fabrication numérique" (CNC machining and fabrication) - class of 2018, July.

This final group project involves some of the know-how acquired during the training program and seals the deal. It is complementary with the "Bentolux" project which should be documented and referenced soon on wikifab.org.

Instructions for the project were:

  • create a new tier to the box designed and developed during the course of the training program (3 available tiers: 1 base, 1 in Plexiglas, 1 for LCD screen);
  • use newly acquired knowledge for this new tier: 3D printing, laser cutting, etc.;
  • program with Arduino at least one user interaction (free choice).

Overall specifications

After some thought our group decided to create a musical tier - we called it "Mood box" - to complement the weather station using the base-tier and the LCD-tier.

Expected behavior is described here below.

Starting the box

When properly plugged in, the box can be started by using the switch on the front.

Starting the box triggers the following events:

  • figurine set on top spins on its stand;
  • LED-ring light effect shows through the figurine's translucent stand;
  • LCD screen displays a welcome message.

If no other action is made right away, the box goes in "sleep mode".

In "sleep mode", temperature and humidity are displayed with a custom message on LCD screen.

These custom messages as well as the color set for both the LED-ring and LCD screen depend on current temperature:

  • LCD and LED-ring color varies from blue to red when temperature rises;
  • LED-ring sparkles at a random frequency to add some animation;
  • custom message is displayed on LCD screen according to the temperature range currently reading.

Mood box activation and functionalities

Mood box is activated when the user touches the brass bar placed on top of it - this bar is connected to a capacitive sensor set inside the box.

Upon activation, figurine, LED-ring and LCD wake up.

Cette activation est accompagnée d'une animation conjointe de la figurine, de l'anneau de LEDs et de l'écran LCD.
If no other tap is made within 5 seconds following activation, Mood box is deactivated and goes back into sleep mode.

A new tap triggers play mode.

Using the bar has been made simple: the LED-ring shows current tap count as it grows - from 1 to 4 LEDS lit in white

First time, playlist begins with the first title on the list.

The potentiometer button - placed under the on/off switch on the front - is then active and serves as volume control for music.

The brass bar remains also active and stands by pending new user interaction.

While music plays, action differs depending on how many times the bar is touched:

  • 1 tap: "pause/play", i.e. the music is paused if playing before or begins playing if paused before and LCD displays a message accordingly;
  • 2 taps:"next", i.e. the player jumps to the next title on the list;
  • 3 taps:"previous", i.e. the player changes the current title for the previous one;
  • 4 taps or more: "stop", i.e. the box returns to sleep mode after a short animation of figurine, LED-ring and LCD screen.

During play time, LED-ring lights up in a rainbow sequence and figurine spins on top of its stand.

Note: Each time a play/pause/next/previous action is taken into account, figurine spins in other direction.

Deactivating the Mood box

After activating the Mood box or when the music is stopped, if the bar remains idle for more than 5 seconds, sleep mode kicks in and deactivation occurs.

Note: When exiting sleep mode and resuming playing music, the player starts from where it was when deactivated.

Video d'introduction

Matériaux

Necessary materials are listed here below by category.

For the box

  • poplar plywood 3mm-thick for laser cutting
Poplar is pretty cheap and allows precise and fast laser cutting
  • brass bar 80x7x2mm - to change and increase the touching area with regards to the capacitive sensor
A 1m-length brass bar can be found in DIY store for about 7€ but is easily replaceable by any conductive material whatever is shape.
  • transparent PLA for 3D printing:
    • access door to base tier
    • figurine's stand and support - the stand will also diffuse the LED-ring light
    • button for volume control
    • lateral joints
  • colored PLA (according to maker's preference) for the figurine and/or scenery set on top of the box

Electronic supplies

  • 1 Arduino Uno Rev.3
  • 1 MW power supply: 1500mA Rotary Switch Adaptor
  • 1 reversing switch KNX-1, 3A, 250V AC, to be used as main switch
  • 1 Seeed Studio potentiometer: Grove Rotary Angle Sensor (P)
  • 1 Seeed Studio capacitive sensor: Grove Touch Sensor
  • 1 Adafruit LED-ring: Neopixel Ring 12 x 5050 RGB
  • 1 Seeed Studio MP3-player: Grove MP3 v2.0
  • 1 micro SD-Card to store the playlist
  • 1 Seeed Studio Gear Stepper Motor with Driver: Step Motor 28BYJ-48 5V DC
  • 1 Adafruit BME280 sensor: temperature, humidity, pressure (ADA2652)
  • 1 Seeed Studio "Base Shield V2"

Misc.

  • wood glue, to assemble and joint laser cut parts of the box tiers
  • cyanoacrylate glue
  • some screws to fasten sensors and other components inside the box tiers
  • cables and jumper wires

Outils

Tools used during this project are hereby grouped by use.

CAD & programming

  • Inkscape, 2D CAD software to create and adapt cutting and engraving patterns for the box
  • TinkerCAD, Blender or any 3D CAD software to create or modify figurine and other box printable components
  • Arduino IDE, programming environment adapted to Arduino and used to create and transfer the code managing all interactions between sensors and the outside world
All 2D- and 3D- source files (.svg, .stl) are available on this page's "Files" tab.

Machines & tools

  • laser cutter, usually available in FabLabs
Regarding the wood panels to be laser cut, the more plane - hence not warped - they are the better for precision cut. When buying those panels of plywood, don't hesitate to tell the vendor they will be used for laser cutting.
  • 3D printer, also available in FabLabs
  • soldering iron and materials
Besides the obvious burning danger for oneself and/or surroundings when handling the soldering iron, some electronic components might be very sensitive to heat and need to be kept away from too much heat exposure. One must use caution and proceed gradually - no more than 2-3 seconds at a time.
  • screwdriver, wire cutters, saw, etc.
  • Dremel-like tool

Étape 1 - 2D design (new tier for the box)

Goal was to create a new tier to the original box by using laser cutting of course but also laser engraving.

An engraving pattern was found.

This image file was reproduced using Inkscape and Beziers curves.

This newly designed pattern was then added to the cutting pattern.


Étape 2 - 3D design

The components to be 3D-printed are the following:

  • access door for the base tier alongside with the main switch and potentiometer
  • button to cover the potentiometer toothed wheel
  • figurine stand which also serve to subdue LED-ring lighting effects
  • figurine itself, in this instance the "Funkgeist" animated ghost found on Thingiverse (https://www.thingiverse.com/thing:570654) and its support elements
  • lateral joints to ensure the box solidity

For this step, Inkscape, TinkerCAD and Blender were used.

Étape 3 - Laser engraving ad cutting of the new box tier

Laser cutting - and engraving - has been carried out within the EdFab in Saint-Denis, France, under the kindly direction of Lola and Arthur: big thanks to both of them!

2 other identical tiers have been made using SqyLab facility in La Verrière, France, with the benevolent help of Francis in discovering yet a new source file pre-processing due to a different machine. An equal big thanks to him!

Once the new tier is engraved and cut, one can choose to paint, decorate and customize it at will.


Étape 4 - 3D-printing

All printings needed for the project were made on a Prusa i3 MK3.

Those are shown as opposite:

  • base tier
    • access door
    • button to put on the potentiometer toothed wheel
  • MoodBox tier
    • figurine stand (spinning) and support (fixed)
    • figurine itself
    • lateral joints

Étape 5 - Wiring diagram

Sensors and other elements are connected to the base-shield set on top of the Arduino Uno as described here after with port numbers.

Input

  • Potentiometer: analog input A0
  • Capacitive sensor: analog input A1
  • BME280 sensor:
    • Vin: 5V
    • GND: GND
    • CS: 10
    • SDI: 11
    • SDO: 12
    • SCK: 13

Output

  • LCD: I2C port
  • MP3 player: D2
  • LED-ring: D3

Motor

  • Step motor
    • IN 1: 10
    • IN 2: 9
    • IN 3: 11
    • IN 4: 8

Power supply

It's important to notice that all in all, components need a lot of power to work properly. There is not enough power available through USB connection (about 5V) and a 9V battery will be depleted faster than you'd like.

This is why we used an adaptor that can be plugged into a wall-socket and deliver enough power steadily.

Don't forget to set the power supply rotary switch on 9V in order to get the right power for your box.


Étape 6 - Arduino programming

Programming was a bit tricky due to Arduino native sequential working.

Workarounds must have been found in order to animate several parts of the box not only sequentially but also simultaneously.

The first 3 screenshots as shown opposite exhibit declarations for each component of the box and the MoodBox tier.

Main program is a loop which executes the sequence as requested with regards to user interaction. Each sequence is identified with a number:

  • 0: sequence where nothing happens
  • 1: start sequence
  • 2: awakening sequence, triggered by at least one touch on the brass bar
  • 3: music sequence

Waiting time management, especially for counting how many times the bar was touched, is using the millis() function to avoid using the delay() function where the whole program is put on hold.

To bypass the sequential functioning, the AccelStepper.h library was used as well as combined commands programmed within routines called from the main loop. This allows for example simultaneousness for both LED-ring effects and step motor spinning.

This is the trick used in code to prevent stopping the motor from spinning while waiting for a signal from the brass bar.

Libraries

Main program calls libraries functions specific to sensors and components used in the box. Those are listed below:


Étape 7 - Assembling, testing and finishing off

Arduino Uno, potentiometer and main switch are connected to the power supply inside and on the base tier of the box (lower tier).

LCD screen is installed in side the LCD tier (middle tier).

MoodBox tier (upper tier) is composed as described here below.

On box walls are fixed:

  • the step motor used to animate the figurine - its controller card can be seen on the left on the overview picture as shown opposite
  • the MP3 player with both SD-card slot and AudioIn port aligned with MoodBox rear-side wall openings - at bottom on overview picture
  • the capacitive sensor to be connected to the brass bar - see the orange wire on the right on the overview picture

Right underneath and throughout the MoodBox top cover are fixed:

  • the LED-ring
  • the step motor with only its axis pulling through, centered with the LED-ring
  • the brass bar

On top of the MoodBox tier are fixed:

  • the figurine stand, just above the LED-ring in order to subdue its bright light
  • the figurine itself, set on the motor axis to be able to spin with it

Étape 8 - Now let's dance!

MoodBox tier is now up and able to run.

Please refer to Introduction and overall specifications to properly use it!

Thank you for your interest :)




Notes et références

Figurine used for final presentation comes from Thingiverse (https://www.thingiverse.com/thing:570654).

It was chosen by default. First idea was to recreate in 3D the fabulous Fantasia dancing couple: Hyacinth and Ben Ali Gator.

"Bentolux" project - main box design - to be available soon on WikiFab (around July 2018).

French page for this project can be found here: https://wikifab.org/wiki/MoodBox

Commentaires

Published