loading

Ever since my addressable RGB LED strips (WS2812B) came from Aliexpress, I've been fascinated with LED projects. Following up on my success with my Charlieplexed LED clock, I wanted to create something with more Jazz..

While browsing google images, I came across an instructable for an Arduino Infinity Mirror and the brain cells started working in overdrive. Why shouldn't I make an infinity mirror, that's also a clock !!

Features:

  1. Works like a clock - the colours of the hands are user-programmable over bluetooth
  2. Has an IR sensor to sense if someone is coming near the mirror. Switches off the LEDs, so that this can be used as a normal mirror :-)
  3. Shows a rainbow effect every 15 minutes (time is user adjustable)
  4. Has a touch button to toggle between clock and rainbow effects
  5. Switches to night mode between midnight and 7:00 AM - can be changed in the code.
  6. Can be programmed over bluetooth - so you do not need to take it off the wall if you need to update the code

Step 1: Electronics

Picture of Electronics
  1. A Standalone Arduino: http://dushyant.ahuja.ws/2013/10/standalone-arduin... OR Arduino mini pro: http://www.aliexpress.com/item/10Pcs-Lot-Pro-Mini-...
  2. RTC Module – DS1302: http://fabtolab.com/DS1302-RTC-module?search=rtc
  3. LM2596 Step Down Adjustable Power Supply Module 1.3V-35V: http://cgi.ebay.in/ws/eBayISAPI.dll?ViewItem&item=...
  4. 1m 60LEDs/M Addressable RGB LED Strip (WS2812B): http://www.aliexpress.com/item/1M-WS2812-WS2812B-6...
  5. HC-05 Bluetooth module: http://www.aliexpress.com/item/RS232-TTL-LC-05-Wir...
  6. IR Proximity Sensor: http://www.instructables.com/id/Simple-IR-proximit... 4 IR LEDs; 1 IR LED detector: http://www.evelta.com/industrial-control/sensors/5...
  7. Touch Pad: http://www.aliexpress.com/item/Touch-Pad-Brick-Sen...
  8. 9V – 2A Adapter
  9. CP2102 USB-to-TTL (the RST pin on the CP2102 is not for resetting the arduino – you have to solder a wire to the DTR pad on the PCB – which sends a reset signal to program the arduino. This has to be connected to the DTR pin on the Arduino
 
1-40 of 155Next »
dushu (author) 7 months ago

Just realised, the set_time doesn't function correctly, please replace with the following:

void set_time(){

DateTime now = rtc.now();

Serial.println("IN SETTIME");

uint8_t hr = (uint8_t)atoi(sCmd.next());

uint8_t minu = (uint8_t)atoi(sCmd.next());

uint8_t sec = (uint8_t)atoi(sCmd.next());

rtc.adjust(DateTime(now.year(),now.month(),now.day(),hr,minu,sec));

}

Format for setting time TIME h m s

e.g. TIME 10 12 00

i changed a code but it doesnt make the Leds ON.I wanna make only a clock Led without others function like bluetooth.Only with Leds and this code it doesnt work.May be you know the solution

dushu (author)  AngelSymbol.4 months ago

Try the new code at the github - I have removed the functions for the button and the IR Sensor.

PrestonW2 dushu4 months ago

I have uploaded the "new code" and cannot get anything to work. The only thing that happens is the first light on the LED strip turns on. Nothing else happens. Please help!!

dushu (author)  PrestonW24 months ago
Should have mentioned - the new code is updated for fastled v3.1 - please download that. Also, try to compile with arduino ide 1.0.6 Did you check the data pin in the new code ?
PrestonW2 dushu4 months ago

Hi, I did download the new library FastLed 3.1.

I checked all of my connections and believe they are all in the correct positions. I have one light that turns on, the first light. It is changing colors every few minutes. I have the LED strip connected to LM2596, Ground to common, Data to D5.

Touch Sensor to D2

RTC Module - DAT to A4 and CLK to A5.

No bluetooth or IR Sensor.

Do not know how to change a data pin in the programming.

I also connected LM2596 to a 9V battery pack.

dushu (author)  PrestonW24 months ago

I think this might be the problem - a 9V battery may not be able to provide enough current. This clock needs 2-3A at the minimum.

PrestonW2 dushu3 months ago

Hi! So I have tried a new ordeal. I connected a 9V battery pack with a 5V 1000 MA converter. Is this still not enough power?

what would you suggest to power these LEDs then?
dushu (author)  PrestonW24 months ago

9V 3A power supply. Be sure to tie together the grounds of both the power supplies.

I checked the data pin and changed the data pin to 8. I now have the first LED is blue, second is white, then third is green. Everything else is off. Not sure what else to do!

I did. still nothing.
dushu (author)  PrestonW24 months ago

Also - did you connect the ground of the Uno and the 2596 together?

dushu (author)  PrestonW24 months ago

You can change the data pin by modifying this line in the code:

#define DATA_PIN 8

PrestonW2 dushu4 months ago

I tried the new code and could not get anything to work. Here is a picture of the libraries I have imported. Please help me understand what I am doing wrong

Screen Shot 2015-04-13 at 9.49.46 PM.png
dushu (author) 5 months ago

I've had the clock running for nearly nine months and it started getting stuck erratically. The clock would run for a few hours and then stop - the LEDs would get stuck. I tried everything to troubleshoot them - going so far as to replace all the components (except the LED strips one by one). But to no avail. Long story short - I have narrowed down to the following:

1. The first LED in the code remains ON at full brightness at all times

2. This caused the first LED to overheat and stop transmitting data

3. The solution is to change the white colour to (50,50,50)

It's working now - but will update if there are any issues.

Good afternoon. made by your program mirror, it's amazing !!!

But I want to know where "SWITCHPIN 2" in the program, he announced only at the beginning, where there is no longer found. You cut the program?

dushu (author)  АндрейВ120 days ago

This was being used for the touch sensor. I have since removed the touch sensor and hence it is no longer in the code

AndrewC162 months ago

hi i'm having problems as i'm only getting one blue light turning on. im using a arduino uno ,i have check the circuit and that seems to be ok .has anyone got any ideas how to fix this problem

AndrewC164 months ago

hi I'm having problems with the code as its saying that the code has a fatal error: RTClib.h: No such file or directory compilation terminated.

Error compiling.

dushu (author)  AndrewC164 months ago

You need to install the following libraries:

PrestonW34 months ago

I am trying to make the clock without the IR Sensor. I know to do this I must remove part of the code, but which part should I remove? Could you upload the code without IR Sensor incorporated?

Thank You

dushu (author)  PrestonW34 months ago

Look at the latest code at Github

AngelSymbol.5 months ago

The code work but the LED off.May be you know the problem

with other codes LEDs works normal(so it doesnt problem with LEDs)

dushu (author)  AngelSymbol.5 months ago

Did you check the version of FastLED? Have you connected the correct pin to the data line (5) ? Is your RTC working fine?

PrestonW25 months ago
I'm having a problem with the rtc. I bought a ds1302. but the schematics show a DS1307. help?

Also, the arduino uno offers ports for SDA and SCL. Do I still plug into A4 and A5?
temp_546002257.jpgtemp_607284294.jpgtemp_-1939278747.jpg
dushu (author)  PrestonW25 months ago

DS1302 and 1307 - both should work. The SDA and SCL are actually A4 and A5 - so you can connect to any one

PrestonW2 dushu5 months ago

I finally got that working! But now I am having a few problems with the Diagram. What are JP1 and IC1? Can you add an image of what your final circuit looked like?

ivanyd6 months ago

hi i was wondering what the jp1 was in the drawing of the schematics? also im using a Arduino uno and was wondering if i am able to leave out the circuits at pb6-pb7 and pc6 as they are only needed for a stand alone arduino?

dushu (author)  ivanyd5 months ago

The JP1, circuits at PB6, PB7 and PC6 are required only for the standalone - they are not required if you're using an Uno

inifinityone6 months ago

Could anyone please post an image showing the circuit connections in detail??

pleaseee

dushu (author)  inifinityone6 months ago

Please see image in Step 2 - it can't get any more detailed than that. The circuit is actually very simple - with only a few connections required.

inifinityone6 months ago

Could anyone please post an image showing the circuit connections in detail??

pleaseee

judas796 months ago

Neat project but I was getting errors all day while trying to compile; like the following:

Infinity_Mirror_v1:22: error: 'CRGBPalette16' does not name a type
Infinity_Mirror_v1:23: error: 'TBlendType' does not name a type
Infinity_Mirror_v1.ino: In function 'void setup()':
Infinity_Mirror_v1:42: error: 'currentPalette' was not declared in this scope

about 20 more errors of the same nature. It was caused by using these versions:

FastLED.zip

FastLED-archive-FastLED2.1.zip

Then I spotted the link below in the comment section and all is well.

github.com/FastLED/FastLED/

Hope this helps anybody that gets stuck as I did

rafam7 months ago

hello when i try the code it gives me

avrdude: stk500_recv(): programmer is not responding

any ideas how to fix it?

senorsunday rafam6 months ago

I'm guessing you've got a mismatch of what your Arduino IDE is set to and what the board you're programming actually is. If you're building it outside of the Arduino, you need to remove the ATMEGA 328 chip from the Arduino itself before using "Arduino as ISP" setting AND choosing exactly what chip/board you are programming.

If it your hardware isn't in the dropdown, you need to add it.

http://www.instructables.com/id/Arduino-on-all-sorts-of-Atmels/

Oh right, the reason; you can't have 2 different chips on the TX and RX pins of the Arduino board, which is already wired to its own ATMEGA 328.

dushu (author)  rafam7 months ago

Just found out that the arduino mini pro is programmed at a different speed - if you're using one - you will have to change the speed of the Bluetooth module to 57,600 instead of 115,200

1-40 of 155Next »