Designing and planning a multi-component project first time

Hi i've only played with some singular LED and RBG lights before and mini-servos on the kit i got with my arduino uno.

I'm using an arduino in my school design and technology project for a lamp. My lamp has a 3d printed snow globe shape shell that has tiny holes in it that projects star shapes on the ceiling.

I plan to use:
-12 and 24 neopixel LED RGB rings
-a small stepper motor
-a toggle switch

I have a motor shield for my board that has GPO pins on it.

I have a few things I’m not sure about:
Will I have enough power to all these components?
How should I wire them up/can I connect the LEDs to the GPO pins on the motor shield?
How do I set out the code?

I realise this is a lot of questions and this is my first post so I apologise for any mistakes.

Thanks heaps, Daniel

Will I have enough power to all these components?

Without links to the actual stuff you have, we can't answer that.

How should I wire them up

Properly, of course.

can I connect the LEDs to the GPO pins on the motor shield?

The GP I/O pins are probably NOT specific to the shield. More likely, they are passed through from the Arduino.

The motor shield is NOT the best way to drive a stepper motor. A shield specifically designed to drive steppers, such as Big Easy Driver - ROB-12859 - SparkFun Electronics, is a much better choice.

How do I set out the code?

To do what? Without requirements, you are wasting our time.

Sorry, here are the links.

led rings
-Neopixel Rings Australia | Little Bird Australia
-http://littlebirdelectronics.com.au/products/neopixel-ring-12-x-ws2812-5050-rgb-led-with-integrated-drivers

The motor
-http://www.ebay.com.au/itm/171828613079?euid=d70ac011d1d8455cb14dd53cb510c1f0&cp=1&exe=12809&ext=32583&sojTags=exe=exe,ext=ext

The shield
-http://www.ebay.com.au/itm/DFRobot-2A-Motor-Shield-For-Arduino-DRI0009-/181242120264?pt=LH_DefaultDomain_15&hash=item2a32df4848

Is this motor suitable for stepper motors?

Is this motor suitable for stepper motors?

Ebay certainly doesn't know.

Daniel_pasquo:
My lamp has a 3d printed snow globe shape shell that has tiny holes in it that projects star shapes on the ceiling.

It's unclear to me what you have in mind. As I understand it, you'll need a single super-bright light source in your snow globe, that will emit enough light to the ceiling. Also every hole should have a lens in it, that provides an narrow projection beam. For projection you may be better up with laser diodes (laser pointers...), which provide such focused beams. Or glass fibers, as used in certain lamps.

I plan to use:
-12 and 24 neopixel LED RGB rings
-a small stepper motor
-a toggle switch

These LEDs will not be usable for projection, they emit light at a big angle (~80°). When mounted in the holes of your snow globe you can look at the globe, but won't see any projected pattern on the ceiling of your room. Did you ever see a projection from a LED on your walls or ceiling?

What's the purpose of the motor (rotate the globe)?

Will I have enough power to all these components?

You'll need a decent power supply in any case, possibly multiples for the different voltages required by the motor and other circuitry.

How should I wire them up/can I connect the LEDs to the GPO pins on the motor shield?

Depends on your motor shield. Eventually plug in another development shield, that allows to wire the other components to it, when the motor shield does not allow to connect all required cables.

Please think again and describe what you have in mind. If you already have printed the globe, hold a lamp inside it and look at your ceiling. For testing purposes a paper/plastic box may be sufficient, into which you sting the tiny holes.

So I’ve uploaded some sketches which will hopefully make my design clearer. There is a 3D printed shell that has circle holes in it, the shell sits on a aluminium base. To make the shell turn is a stepper motor with a 3d printed cog attached to the drive sitting on the base which latches onto the inside of the 3d printed shell which has a cog track. Within the shell is a groove in which ball bearings sit in, the shell sits on top of this. The ball bearings sit pride about 1mm out of the base and when the motor turns, the shell easily rotates.

I tested the light projection by 3D printing a scale model of this design. I hand drilled holes in it and used the torch from my phone (Samsung s5) as a light source. The light projected well onto the ceiling.

I also tested the pins on the motor shield and I was able to control an LED blinking from it.

However I tried using the 12 led neopixel ring and was having troubles. I connected to GND and 5V power to the Arduino and the data in to pin 6.

I tried using this code from the online library:

"#include <Adafruit_NeoPixel.h>

#define PIN 6
#define STRIPSIZE 12

// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic ‘v1’ (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(STRIPSIZE, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
strip.begin();
strip.setBrightness(25); // Lower brightness and save eyeballs!
strip.show(); // Initialize all pixels to ‘off’
}

void loop() {
// Some example procedures showing how to display to the pixels:
colorWipe(strip.Color(0,0,0), 25); // Black
colorWipe(strip.Color(64, 0, 0), 100); // Red
colorWipe(strip.Color(0, 64, 0), 100); // Green
colorWipe(strip.Color(0, 0, 64), 100); // Blue
colorWave(75);
colorWipe(strip.Color(0,0,0), 100); // Black
rainbow(15);
colorWipe(strip.Color(0,0,0), 100); // Black
rainbowCycle(15);
colorWipe(strip.Color(0,0,0), 100); // Black
colorWave(30);
}

// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
for(uint16_t i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}"

However I was having my computer was not recognising “Adafruit_NeoPixel strip = Adafruit_NeoPixel(STRIPSIZE, PIN, NEO_GRB + NEO_KHZ800);”. I tried doing research and playing around with the code adding in my stripsize and pin numbe but still couldn’t get it to work.

Thanks for all the help, Daniel