20. Project Development

What will it do?

Light painting is an artistic medium combining light, motion and long-exposure photography. For as long as a camera’s shutter is open, a single point of light in motion will create a continuous streak in the final photograph.

Digital technology takes light painting to the next level…dozens of point lights, with color and brightness individually under computer control, weave a swath of awesome across the completed frame.

Adafruit’s NeoPixel strips, combined with the Arduino microcontroller and a supporting cast of parts, make highly refined digital light painting achievable!

References: Adafruit

Basic Concept

  • Figure showing printing of random text.

What will you design?

  • I design a single axis frame which help to travel/move my neo pixel stripe. It will contain controller, motor.

How much will they cost?

Componet Price
Material 1200 INR
Circuit box 15 INR Each
Motor 800 INR
Neo Pixel 1750 INR
Belt 350 INR /2 Mtr

Task :

Task Deadline
Concept of Project March
Board Design April
CAD May
Virtual Processing May
Final Casing and Prototype 10 June

Concept of Project

  • This project is started from the Air texting with the help of neo pixel(WS2812)- is the latest advance in the quest for a simple, scalable and affordable full-color LED. Red, green and blue LEDs are integrated alongside a driver chip into a tiny surface-mount package controlled through a single wire. They can be used individually

  • Fig. of a single LED in Neopixel
  • This demonstrates the working of light one by one according to the command given. The given command may include different colours given to different led.
  • This includes more colours than RGB colours given.

Final Project output Visualization

  • Pixel by pixel printing of the image is done with the help of P5.js (processing library of js), The portion that seems highlighted will appear to display at the final stage. So this video displays miniature of the final output.

Manual Working

  • This is the actual display of output, this is what we get at the end of the task, our destination. The video displays how a specific image is displayed by using a strip of neopixel ws2812.

CAD for final project

  • This is the structural design, developed in Fusion 360 is of the instrument developed for rotating the strip of light (neopixel), The pulley like structure is crucial for the movement of the circuit box.

-Design 2- This includes the 3d structure of the project, developed in Fusion 360, this enables us to visualize the final product, the dimensions of the product are 1:1 scale.

Work Should be done weekly:

  • Week 1 : Ideas and Principles : Done
  • Week 2 : Find Guide to Teach me need languages : Done
  • Week 3 : Learn about CAD : Done | Delay
  • Week 4 : Basic Concept for final task : Done | Delay
  • Week 5 : Board Selection : Done
  • Week 6 : 3D printing for final project : Done |Delay
  • Week 7 : Learning Basic Python
  • Week 8 : Explore OpenCV
  • Week 9 : Weekly Assignment Documentation : Delay |Done
  • Week 10 : Wifi Communication, NOdeMCU Basic : Done
  • Week 11 : Order Needed components like motor, NeoPixel, travel rope
  • Week 12 : Testing stepper, At result Change to BO Motor
  • Week 13 : User interface: Done
  • Week 14 : Pending TASK
  • Week 15 : Machine design | Material Outsourceing
  • Week 16 : Machine design | Video and pictures
  • Week 17 : Presenatation of Machine Design
  • Week 18 : Wild Card Week
  • Week Final : Final Project

Questions

  • Image can convert in pixel while using neopixel?
  • how can i communicate my board?
  • Realtime image can print?
  • Which Language will help me to sort out this problem?
  • How can i make wireless?
  • Which travel rope will used?

What Actully happen during project

  • Need H bridge but not available
  • Use 4988 Driver for stepper
  • 12V need! add voltage control to board
  • Stepper motor became heavy
  • Replace motor to BO Motor
  • Driver also replaced! 4988 to L293D
  • Imagine to make portable | Issue Created!
  • Wifi board to communicate ESP8266
  • ESP 8266 needs AT commands but it not sucess
  • ESP 8266 12e module but it needs voltage controller and programming pins
  • WiFi Board to take program (Wimos d1 WIFI)
  • Packageing from laser cutting

Final Project Testing

-The video shows the developed product and its testing, The hardware parameters like speed control- the motion that should be followed for proper output, vibration- effect of speed and it’s balance and control are crutial for testings and programming parameters like command to neopixel and work-ability of code are paramount for proper running of product.

Project Development

How was the integration done?

  • Integration management is a collection of processes required to ensure that the various elements of the projects are properly coordinated. It involves making trade-offs among competing objectives and alternatives to meet or exceed stakeholder needs and expectations.

Why is project integration important?

The main purpose of the integration management is to manage and coordinate all the processes and activities during the project life cycle. It also conducts the project as a whole in order to produce significant outputs.

What parts and systems will be made?

  • MicroController
    • Stage 1. - ATTmega 328p
    • Stage 2. - ESP8266 (8pin module)
    • Stage 3. - WiFi Module 8266 (wemos d1 mini)
  • Output Frame
    • Stage 1. - Laser Cutting
    • Stage 2. - PVC Pipe
  • Communication
    • Stage 1. - End Devices - End Devices
    • Stage 2. - Server created

What processes will be used? (Task List)

  • Computer-aided design
  • 3D printing
  • Electronics production
  • Electronics design
  • Embedded programming
  • Input&Output devices
  • Networking and communications
  • Laser cutting

What has worked? Whats hasn’t?

  • Worked

    • NodeMCU
    • Neopixel
    • Code
    • Python3
    • Server hosting
    • WiFi Board
  • Not Worked

    • ESP8266
    • ESP12 Module
    • Moter speed(Now it will be regulated)

What questions need to be answered?

  • How to design the frame?
  • How motor communicate with each other?
  • Convert image to pixel?

What question need to resolved?

  • Visual effect
  • Virtual Process
  • Image processing
  • Image to pixel conversion

Process

Component Required:

  • Node MCU
  • Neo Pixel (60 - 1 meter)
  • F-F Jumper wire
  • Camera for long Exposure click

Others: (List of things which I learn !)

  • Library for NodeMCU (WiFi communication)
  • Neo Pixel Library
  • Arduino.exe
  • Python3
  • Flask
  • OpenCV

Procedure:

  • Connect node and try to upload blank code.
  • (If any error, then need to solve)
  • Node installation error
  • Library Installation error
  • Neopixel Connection (Din→Dout)
  • Connection
  • Connect NodeMCU with Computer.
  • Upload “neopix.ino” from img_neo.zip
  • Connect Neo Pixel → NodeMCU
  • VCC→Vin
  • Din→ 5/D1
  • GND→ GND
  • Run “app.py”
  • Open Web Browser: “192.168.43.177:5000”.
  • Click on upload
  • Select Image
  • Send

Code upload in Wifi Board

#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266HTTPClient.h>
#include <ArduinoJson.h>
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
  #include <avr/power.h>
#endif

#define PIN            2
#define NUMPIXELS      60

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

ESP8266WiFiMulti WiFiMulti;

void setup() {
    Serial.begin(115200);
    delay(10);
    WiFi.mode(WIFI_STA);

    WiFiMulti.addAP("redx", "1234567890x");

    Serial.print("Wait for WiFi... ");

    while(WiFiMulti.run() != WL_CONNECTED) {
        Serial.print(".");
        delay(500);
    }
    pixels.setBrightness(70);
    pixels.begin();

    delay(500);
}

const size_t capacity = 128*JSON_ARRAY_SIZE(3) + 3*JSON_ARRAY_SIZE(128) + JSON_OBJECT_SIZE(1);
DynamicJsonDocument doc(capacity);

int r,g,b;
int col;
void loop() {

      if (WiFi.status() == WL_CONNECTED && col < NUMPIXELS) {

         for( int x = 0; x < NUMPIXELS; x++ ){ pixels.setPixelColor(x, 200,200,200); }
         pixels.show();
         delay(500);
         for( int x = 0; x < NUMPIXELS; x++ ){ pixels.setPixelColor(x, 0,0,0); }
         pixels.show();
         delay(3000);

        for ( col = 0; col < 60; col++ ){

          HTTPClient http;  
          http.begin("http://192.168.43.177:5000/next/" + String(col) );
          int httpCode = http.GET();
          if (httpCode > 0) {
            String payload = http.getString();

            deserializeJson(doc, payload);
            JsonObject obj = doc.as<JsonObject>();

            for( int x = 0; x < NUMPIXELS; x++ ){

                  b = obj["data"][x][0].as<int>();
                  g = obj["data"][x][1].as<int>();
                  r = obj["data"][x][2].as<int>();
//                  Serial.print(r); Serial.print(" "); Serial.print(g); Serial.print(" "); Serial.print(b);
//                  Serial.println();
////                  
                  pixels.setPixelColor(x+1, pixels.Color(r,g,b));

            }

            pixels.show();               
            delay(16);
            http.end();            
          }
        } 
      }
      else{  
         for( int x = 0; x < NUMPIXELS; x++ ){
           pixels.setPixelColor(x, 0,0,0); 
         }
         pixels.show();
         delay(1000);
      }


}

Code upload in 328p board which attached with L293D

//L293D
//Motor 
const int motorPin1  = 5;  // Pin 14 of L293
const int motorPin2  = 6;  // Pin 10 of L293
//This will run only one time.
void setup(){
    //Set pins as outputs
    pinMode(motorPin1, OUTPUT);
    pinMode(motorPin2, OUTPUT);

    //Motor Control - Motor: motorPin1,motorpin2 
    //This code  will turn Motor clockwise for 8 sec.
    digitalWrite(motorPin1, HIGH);
    digitalWrite(motorPin2, LOW);
    digitalWrite(motorPin3, LOW);
    digitalWrite(motorPin4, LOW);
    delay(2000); 
    //This code will turn Motor counter-clockwise for 8 sec.
    digitalWrite(motorPin1, LOW);
    digitalWrite(motorPin2, HIGH);
    digitalWrite(motorPin3, LOW);
    digitalWrite(motorPin4, LOW);
    delay(2000);
    }
void loop(){
}