Emotional Flower

by RoboRen in Craft > Art

25 Views, 0 Favorites, 0 Comments

Emotional Flower

emotionwheel.png


This instructables breaks up the components into two parts, the electrical subsystem and mechanical

Supplies

Mechanical Subsystem:

  1. 4 4'x8' Douglas Fir Plywood
  2. 2 4"x4" Wooden Posts
  3. 8ft Corrugated sheet metal
  4. Translucent White Resin

Electrical Components:

  1. PIR Sensors
  2. Rotary Encoder with Push Button
  3. NeoPixel RGB 5050 LED 100 Pack
  4. Arduino UNO R3
  5. 28 AWG Solid white wire
  6. 3pcs Circuit Boards

Base Preparation

Base Drawing.JPG
darkbase.png
  1. Cut out all of the wood
  2. We had 3 l shapes of blank x blank x blank, two for the top and one for the bottom for structural reasons
  3. Cut the metal
  4. Use that big machine that requires two people to step on it to cut it to these specified lengths
  5. Cut the posts
  6. idk but you need 7 posts with slats in them so that the metal stays
  7. Cut the sides
  8. Idk

Topography Cut Out

base.png
sidebase.png

First, figure out the desired design for the topographic patterning on the top of the table. Once this is done, pull out the desired layers that make up this design and pattern them next to each other in a pattern that tries to conserve space. Next, buy a piece of plywood that will fit the desired pieces with that pattern on it and that fits in a later cutter. Place the pattern into the laser cutting machine along with your wood and let the laser cut your desired pieces. These are the specs we used to cut this plywood hopefully Lindsay has it

Base Build

Take all of these components and out the wood together, then put the metal things in, then cut respective holes in the top so that everythin is good

Stain the wood

Electronics Overview -before Code?

breadboard2.png
breadboard1.png
overallwiring.png

led wiring diagram

see about how to attach it in a reasonable way may have to put it in teams or something

This is a representation of the entire wiring diagram for reference. We used these things for the entire wiring such as two spools of white wire, 2 1/4 bread boards, blah blah blah

the entire list of electrical components are the motor driver, the UI (which has the encoder), the speakers, and the flowers

Downloads

RasPi Set Up

raspialone.png
raspipinout.png
raspiwiring.png

In order to be able to run the code that we have created for this project, it is necessary to have a valid environment with the correct dependencies for the program. Follow the steps below to prepare your RaspberryPi for implementation.

Raspberry Pi Installation for Libraries to Import

  1. sudo apt install python3-adafruit-python-shell
  2. pip install pydub simpleaudio
  3. sudo apt install python3-pyaudio
  4. pip install sounddevice numpy
  5. sudo apt install alsa-utils
  6. sudo apt install libasound2-dev
  7. pip install simpleaudio
  8. pip install sounddevice
  9. sudo apt update && sudo apt upgrade -y
  10. sudo apt install python3 python3-pip -y
  11. pip3 install adafruit-blinka
  12. Enable I2C or SPI: sudo raspi-config
  13. Navigate to Interfacing Options.
  14. Enable I2C and SPI.
  15. Reboot your Raspberry Pi:
  16. Reboot when complete: sudo reboot


Find speaker/amplifier device connected to Raspberry Pi

  1. aplay -l
  2. Should see something like this: card #: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HiFiBerry DAC+ ...
  3. aplay -D hw:#,0 mixed_output.wav
  4. Check/alter volume levels: alsamixer
  5. Do not use ^Z command, wait to audio to play through


Git Clone Emotional Flower Repository

The repository link is the following just click on the link and do sutff.


Set-Up Pi to run code on boot

  1. sudo nano /etc/systemd/system/my_script.service
  2. Add the following content with appropriate script name:

[Unit]

Description=My Script

After=multi-user.target


[Service]

ExecStart=/usr/bin/python3 /path/to/your_script.py

Restart=always

User=pi

WorkingDirectory=/home/pi


[Install]

WantedBy=multi-user.target

Exit out of that file and continue with the following commands.

  1. sudo systemctl enable my_script.service
  2. sudo systemctl start my_script.service
  3. sudo systemctl status my_script.service
  4. sudo reboot


I2C

sudo apt update

sudo apt install python3-smbus

pip install smbus2


Arduino Set Up

arduinopinout.png

Arduino Wiring

Stepper Motor and Driver

Parts List

  1. Stepper Motor: 23LS18-2004E-300N
  2. Dual Bi-Directional DC Motor Driver Shield: Pololu VNH5019
  3. (Lenovo) AC Adapter: 100-240V ~1.5A AC Input 20V 3.25A DC Output

Wirings Instructions

  1. Ensure that all power is OFF and code is uploaded via COM port
  2. Disconnect COM Port cable
  3. Connect appropriate wires from AC Adapter to VIN and GND screw terminals of Motor Driver Shield
  4. Strip and tin wires
  5. White insulated wire = VIN & raw wire = GND
  6. Use a multimeter to determine winding pairs of the Stepper Motor
  7. If resistance between two wires is less than 1kOhm, that is a winding pair
  8. Connect one winding pair wires into Motor Driver screw terminals M1A and M1B
  9. Connect the other winding pair wires into Motor Driver screw terminals M2A and M2B
  10. Place a jumper on male pins labelled ARDVIN = VOUT on Motor Driver so that the Arduino is and Motor Driver are both powered by the AC Adapter.
  11. Turn ON power/surge protector

Note: Arduino Uno may be powered via Motor Driver screw terminals and upload code via the COM Port at the same time.

Arduino to Motor Driver Shield Connections

there was an image here that isn't now

Remaining Arduino Pins:

  1. D0: Flower Display LEDs
  2. D1: Encoder Switch
  3. D3: Encoder PinA
  4. D5: Encoder PinB
  5. D13: User Interface LEDs
  6. A3: Proximity Sensor LED (Test Only)
  7. SDA (I2C): SDA to 3.3V Pull-Up on Breadboard
  8. SCL (I2C): SCL to 3.3V Pull-Up on Breadboard

GitHub Download

github.png

Follow this link in order to get to the code repository for this project. Once on the page navigate to the green code button and click it. Then download the zip file and extract it to your preferred location on your computer. The process of downloading the repository is in the mp4 file.

Downloads

User Interface

topknob.png
sideknob.png
bottomknob.png
disktilt.png
disk.png
userledcct.png

What i did was make a circle cut out some slats so that it is obvious what is lit up and then ensure that there was wording and led slats on a CAD file which was then 3d printed to ensure that it looked as we wanted

Print this out of a clear resin then sand the words to ensure the refraction of the light is different and therefore the colors are more visible

the UI disk has two nail terminals to ensure the 1/4 breadboard keeps the encoder stationary

the encoder is this model and we soldered in this pattern

the flower on top of the encoder can be basically anything we pulled the initial CAD from grabcad artist and then modified the handle so that it would be a little big to fit the encoder thing inside and has a set screw that is #6-32 to make sure it stays

to make the threading for this we used a soldering iron and just put the tip to the hole, put the soldering iron in the hole and push it into the flower so that the thread is flush.

to get everything set up put the encoder down, put the disk over the encoder, align the leds and glue them, place flower knob on top and insert set screw

Audio System

speaker.png
amp.png
speakerdata.png
audiosub.png

Downloads

Music Creation?

Flower Movement

petalledcct.png
motordriver.png