Ronde De Nuit

331

2

Introduction: Ronde De Nuit

The purpose of this project is to use a color led strip to make a night light activated by a motion sensor.

My idea was to get a diffuse light around my bed but without screwing, pasting or plugging anything.

So it works on NiMH AA batteries, it is made of 3D printing and is designed to lay on the floor, under your bed.

I propose 2 models : a full moon and a half moon design.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Bills of Material

Electronics :

  • WS2812 led strip (110cm length for full moon and 60 cm for half moon)
  • HC SR501 PIR motion sensor (1 for half moon, 3 for full moon)
  • XH connectors (pitch 2.54 mm)
    • crimping plier for these connectors
  • USB Serial adaptor
  • LDR sensor
  • one 4*AA Battery holder
  • 4 AA NiMH batteries
  • ON/OFF switch
  • atmega328p (arduino programmed)

Electronics for the PCB :

  • Components listed in the eagle file

Mechanics :

  • M3 * 10mm bolts
  • M3 * 5mm bolts
  • M3 tap

Tool :

  • Glue gun
  • NiMH charger

Step 2: Skills

To make the project you will need :

  • a 3D printer with a 0.4mm or less nozzle
  • to use Eagle to order and make the PCB
    • If whenever you do not feel conformable with this, contact me, I can provide you a PCB with all the components needed.
  • Arduino skills :
    • install the required libraries
    • compile and download the software
    • optionally program an atmega328p with the arduino bootloader (or you can take it from an arduino board to avoid this step)

Step 3: 3D Printing

I propose 2 models : a full and a half moon model.

I give you here :

  • STL files for direct printing
  • Fusion 360 files if you want to tweak it

Printing parameters:

  • 0.3 mm layers
  • 0.4 mm extruder
  • PLA

Step 4: The PCB Controller

My PCB is made around an atmega328p (with arduino bootloader programmed) :

  • The serial port is connected to a 6 pinheader connector, in the purpose to plug a Serial-USB adapter
  • AQV20 is a photoMOS relay. The purpose here is to switch power for the Led Strip.
    • I had some AQV20 components in my stock, but I've seen there are not easy to find. You can take an equivalent like an AQV21.
    • I provide an alternative board schematic which uses a MOSFET to replace this AQV20 but it has not been tested yet.
  • The FERRITE is used to filter noise. I've noticed during my tests that the PIR sensors can oscillate sometimes. I didn't find out the exact reason, but I decided to add the FERRITE, since it works good ;-)
  • The board is supplied by 4 NiMH AA batteries = 4*1.2V = 4.8 V
    • 4.8 V is the nominal voltage, what doesn't mean anything in fact
    • When the batteries are fully charge I measure 5.1 V minimum, when discharging the voltage will drop
  • The voltage is regulated by a high efficiency boost converter MT3608
    • When there is no charge the current is less than 1mA
    • T1 adjust the voltage, be sure to set T1 to 15k to get 5V at output

How does it work ?

  • The PIR sensors are connected to PIR1/2/3 XH connectors.
  • When we start, the atmega goes quickly in sleep mode. The consumed current is then < 1 mA.
  • When a sensor detects a movement, it sends a +5V on the corresponding pin (4,11,13) and awakes the atmega.
  • Then the atmega triggers the photoMOS relay, which powers up the Led Strip (connected to STRIP XH). Data are sent on the single line BUS (pin 12 of the atmega).
  1. ronde 1.0 has been made and tested, it works good
  2. ronde 1.1 has replaced the photoMOS relay AQV20 by a MOSFET transistor, it has not been tested yet

Step 5: The LDR Assy

At start I didn't think to use a light sensor, but indeed it is more that useful to preserve battery life.

So I've soldered a Light Dependent Resistor in series with a 10 Mohms resistor, putted it on a shrink tube and added an XH connector.

VCC----|10Mohms|-------|LDR|-------GND

I use the PIR1 connector the plug this LDR assembly. For the half moon it is ok, for the full moon it takes the place of a PIR sensor. So I had to do a choice.

I aim to design a new board with an extra connector for light sensor. For future use ...

Step 6: Assembly

  1. Tap the holes with M3
  2. Solder the LDR Assy
  3. Make the XH connectors for :
    1. PIR Sensors
    2. Battery Holder
    3. Led Strip
    4. Power ON/OFF switch
  4. Solder the Led Strip, cut it and paste it
  5. Use a glue gun to glue the PIR Sensor(s)
  6. Screw the PCB with M3 - 5mm long
  7. Connect all the connectors :
    1. For half moon : LDR on PIR1 & PIR Sensor on PIR2
    2. For full moon : LDR on PIR1 & PIR Sensors on PIR2 and PIR3

Step 7: Load the Software

Plug the USB-Serial interface as shown in the photo above. Take care of the orientation !! If whenever you plug it reverse way it won't damage the board, but better to avoid it.

Use Arduino IDE to download the corresponding software.

I used external libraries you need to install first :

  • Adafruit_NeoPixel
  • PinChangeInterrupt

My sofware is very basic and I expect you to tweak it :

  • At power-up the ledstrip will blink 3 times as a welcome message.
  • Then the micro-controller goes in sleep mode.
  • When a motion is detected, it wakes up the micro-controller and lights up the led strip.

Playing with the software you will be able to change colors, delays etc ...

Enjoy !!

PCB Design Challenge

This is an entry in the
PCB Design Challenge

Be the First to Share

    Recommendations

    • Tiny Speed Challenge

      Tiny Speed Challenge
    • Clocks Contest

      Clocks Contest
    • PCB Design Challenge

      PCB Design Challenge

    Discussions