The Magic Candle

Intention

The main problem I have with projects isn't so much the electronics side but the enclosure and aesthetics of the finished project. I don't want them to gather dust and be difficult to clean. Also, suppose that I wish to add a new board to the project, once the enclosure is complete you are limited by the available space therein.

I therefore want an enclosure system which is simple so that I can concentrate on the electronics side, rather than having to start from scratch each time an enclosure runs out of space.

The simplest structure I can come up with is a cylinder which can be extended in sections. So suppose that I build a simple battery lantern, powered by a 1.5 Volt D size cell, with switch and light bulb, then later I wish to use a 6V bulb? I would need to change the number of cells in the lantern. Well suppose that the enclosure is a beautiful brass construction, I don't want to throw away all that hard work and build a complete new system. If I could just extend the tube so extra cells may fit, then I throw nothing away.

But now it is too long, so instead I reduce the number of cells and use a DC-DC converter. The extra extension length will not be so great. Later I decide I wish to use LEDs and have the lantern controlled by remote, so I bring in an Arduino controller IC and a photo resistor. Again it is a matter of adjusting the extension tubing to take the new board. Then later I decide to add battery management and clock, and USB so I can program the device without removing the IC each time.

The enclosure being made of metal makes grounding each new board easy.

Once I own a stack of extensions, end caps, bezels, inner sleaves, repeated in different diamters I need never worry about enclosure problems again.

I have come up with a stupid name for this project AKA - The Magic Candle, because the diameter of enclosure I wish to start with is 50mm, and would actualy fit into an off the shelf candle holder. That is the ultimate in backwards compatibility. I really wouldn't need to worry about my completed project looking ugly and it can live on display with other ornaments. Of course it doesn't have to be finished in brass, it could be plastic on the outside.

It sounds like an easy thing to build but I've been struggling for 6 months now. I came up with some designs only to discover that to get the parts made up would cost £100-£300 per part, and for my purposes I needed 12!! Too expensive, yet obviously if these things were mass produced it would be affordable. However I would then be looking at mass marketing and heavy investments just to raise the money to build the thing in the first place. Alternatively one could get a lathe.

I'm probably posting in the wrong forum, however when I started my mind was on the Arduino, not the enclosure. I've noticed other posts about the feasibility of creating more proffessional looking enclosures for finished projects, so there are likely other posters here with simular problems to mine. You've built the box, you've finished the project, along comes a new development, you want to add the board, no room in box, you know the story.

Does anyone have any ideas?

Project Idea

I've chosen a battery lantern as my Arduino project. In common with an ordinary candle it would occupy the dimensions of an ordinary candle such as 50mm in diameter so as to fit into existing candle holders and be used like a candle.

It doesn't sound impressive at first but I wish to have lots of them, and I want them all programmed to give out different brightness and different colours on a wim. If I have several in one room I wish all of them to come on when I activate just one. If I have one in a shed somewhere on a back shelf beyond a lot of clutter, then I wish to be able to point a keyring laser at it to make it light up and others to automaticaly come on if others are in the vicinity.

Next I want to be able to program the behaviour of these candles from an App. However, I wish to make this project up one bit at a time just in case I change my mind. For example, I might decide I want one to be sound opperated and come on for a fixed amount of time.

What are you looking for help with?

I am not sure if I've posted in the right place, though I would consider what I am doing is a project. I've only just joined the forum and also have only started learning about Arduino these past few months. I've got to start somewhere so I found some plastic rod and messed around with it.

Here is a photo of a plastic rod, presumably of acrylic material.


It was taken from a discuarded PC case. The next photo shows that the rod contains bubbles.

At either end there are sockets for the LEDS.

To power the 30mA LED from a PP3 I used a series resistance of 9volts / 0.03A = 300 Ohm or Orange, Black, Brown.

Illuminated at one end the light was seen to diminish as it traversed the rod.

Observing the LED in image 6,

it is seen that due to the air gap between the LED and acrylic material of the rod, not all the light is refracted up the rod but spills out. By filling the gap with oil, the optical matching improves.

But the refractive index of the oil is still too low compared to that of the materials of the LED and rod, hence the visibility of the outline of the socket.

Four sections, approximate to the length of a candle flame were cut from the rod to accomodate 4 LEDs to be controled by the Arduino UNO board.

In the next photo it shows that the bubbles are formed in a concentric ring within an ineer perimeter.

This allows for the light to travel unimpeded throughout the centre. How this was achieved, I do not know, but I need to know so that I can form my own shapes.

light-rod.jpg

The following shows a CAD sketch of intended appearence.

Also there is a CAD file attatched offering further detail.

Barrel-thread.tc3 (44.5 KB)

t occupies the dimensions of standard candles as such that it is 50cm in diameter

that's a barbecue, not a candle.

AWOL:

t occupies the dimensions of standard candles as such that it is 50cm in diameter

that's a barbecue, not a candle.

Oops, I meant 50mm dia. Previous posts modified.

This is the layout with the UNO board.

The rods implemented.

The sketch being used to control the lights is modified from page 61: Example 05:
Turn on LED when the button is pressed and keep it on after it is released including simple de-bouncing. If the button is held, brightness changes.

It was altered to "linearly" brighten to max when pressed, and to dim "linearly" to off when again opperated, using non linear equation.

 //Single click dim to bright and vis a vis.

  #include <avr/sleep.h>

  #define BLUE 6
  #define GREEN 9    // the pin for the LED
  #define AMBER 10
  #define RED 11
  #define BUTTON 7  // the input pin where the pushbutton is connected.
  
  boolean val = LOW;      // val will be used to store the state
                          // of the input pin.
  int i = 0;
  int del = 0;
  int t = 500;
                        
void setup() {
    pinMode(13, OUTPUT);
    pinMode(BLUE, OUTPUT);
    pinMode(GREEN, OUTPUT);      // tell Arduino LED is an output
    pinMode(AMBER, OUTPUT);
    pinMode(RED, OUTPUT);
    pinMode(BUTTON, INPUT);    // and BUTTON is an input
    digitalWrite(13, LOW);
    
    // disable ADC
    ADCSRA = 0;
    
    // Turn off various modules
    PRR = 0x97;
    
    set_sleep_mode (SLEEP_MODE_IDLE);
    sleep_enable();
    
    // Turn off brown-out enable in software
    MCUCR = _BV (BODS) | _BV (BODSE);
    MCUCR = _BV (BODS);
    sleep_cpu ();
    
}  // end of setup
              
              
void loop()
{
  while (val == LOW)
  {
    val = digitalRead(7);
    delay(10);
  }
  
  for (i = 6; i < 260;  i++)
  {
    del = t/i;
    analogWrite(BLUE, i-5);
    analogWrite(GREEN, i-5);
    analogWrite(AMBER, i-5);
    analogWrite(RED, i-5);
    delay(del);
  }
  
  while (val == HIGH)
  {
    val = digitalRead(7);
    delay(10);
  }
  
  while (val == LOW)
  {
    val = digitalRead(7);
    delay(10);
  }
  
  for (i = 260; i > 5;  i--)
  {
    del = t/i;
    analogWrite(BLUE, i-6);
    analogWrite(GREEN, i-6);
    analogWrite(AMBER, i-6);
    analogWrite(RED, i-6);
    delay(del);
  }
  
  while (val == HIGH)
  {
    val = digitalRead(7);
    delay(10);
  }
}

I got my vernier calipers and got an AA battery and proceded to do a daft thing when measuring the length of the cell. I had created a short because calipers being metal conduct. So this time I took a thin card and placed it at the base of the cell, and measured its total length, which was 50.6mm. I then measured the width of the card on its own which was 0.3mm and subtracted this from my previous measurement and got 50.3mm for the length of the cell.

Next I measured the protrusion of the + terminal which was 1.8mm, and subtracted this from the length making the cylinder 48.5mm.

Next I measured the cells diameter which was 14.1mm.
Then I measured the + terminal's diameter 5.5mm.

Next I went into TurboCad and drew in my construction lines to the origin. I set the preferences to have all dimensions in mm.

I made sure my construction lines were in the construction layer. Then I drew a vertical construction line 14.1mm from the origins vertical. And a horizontal 50.3mm from the origin. I ended up with:

Initialy it was intended that the lantern would be powered from 4 AA cells. 4 rechargeable cells offer 4.8 Volts@1200 mAh. 6 LEDs at full power consume 50 mAh each so 300mAh for the lot. Add 100mAh approx for IC and total current is 400ma giving 3 hours of light.

However, why create a battery enclosure to accomodate 4 cells, as this would make the enclosure more complicated to build than if only a single cell was to be used with a dc-dc step up to 5V for the IC? A nickel D-cell can hold up to 5Ah at 1.2 Volts. So at a maximum current of 5/1.2=3.3 times 400mA = 1.3A. 5/1.3=3.8 hours, so a bit more power as that obtained from 4 AA cells.

Re-dimensioning for a D cell, I came up with:

Battery enclosure

The metal tube in which the battery is to be enclosed can also serve as ground for the -ve terminal of the cell. Access to the battery as with a conventional torch via a screw cap. Either end of the tubing should be threaded so as to take a bezel.

With battery situated.

A spring is required to support and make connexion between -ve of battery and outer enclosure.

The PCB is grounded to the case. The +ve terminal to PCB via contact and spring.

Inner structure of plastic to support contact and spring. Inner plastic tubing to support battery.

I still haven't seen how and why you need an Arduino. All you've done so far can be done with a NE555 for a lot less money and a lot less effort. That is not to mention that the entire 555 circuit can be enclosed in one of those tubes/rods/candles/whatever.

Take some time to study the NE555 and you'll see that it might fit your needs a lot better than the Arduino, specially when comparing costs.

I am still not exactly sure what your question is, what you want help/collaboration on.

AlxDroidDev:
I still haven't seen how and why you need an Arduino. All you've done so far can be done with a NE555 for a lot less money and a lot less effort. That is not to mention that the entire 555 circuit can be enclosed in one of those tubes/rods/candles/whatever.

Take some time to study the NE555 and you'll see that it might fit your needs a lot better than the Arduino, specially when comparing costs.

The idea is to have 6 LEDs; red orange yellow green cyan blue. It's arguable that only red green blue are needed to make up any color in the spectrum. However, orange yellow cyan are pure wavelengths of that color.

Each LED is independantly controled to do pretty much anything you wish them to do. Such as flicker like a candle, flicker like a guttering lamp, flash, fade in and out, be of a particular colour, and have variation in brightness. Or have it set as colour temperature adjustable, so that it only puts out light where the spectrum is weakest.

The device is to be capable of being upgradable, for example, for receiving IR data from a remote control, or being triggered by a laser pointer. It is not intended in its pre upgraded form to produce a dazzling light. It's purpose is to replace ordinary candles. For example, you might keep a candle in a garden shed. Well you could keep this electric candle in the garden shed instead, reduced fire hazard. When you enter the shed or attic or cellar / place with no light or mains supply, you just point your keyring laser at it and on it comes. This means you don't have to stumble over piles of junk in the dark and risk injury in order to get to the far end shelf where the candle would traditionaly be.

So, depending on your requirements you need to choose what sketch is to be downloaded to the candle.

Now, I can think of dozens of permutations, applications and uses that this candle could be put to. However, I don't want to have to keep redesigning brand new enclosures every time a new upgrade comes along. And I want it to be backward compatible with the battery box, and other modules.

Supposing a new LED comes out that's an improvement on what's around today. I don't want to build a brand new system. I want to be able to pull out the LED module and replace it with the new, leaving everything else untouched.

fkeel:
I am still not exactly sure what your question is, what you want help/collaboration on.

So having provided a bit more back ground into the whys of the project, the scale of its ambition probably becomes more apparent.

The vision is to produce an open source enclosure construction system which is easy to assemble / dissasemble and looks aestheticaly pleasing. Provides robust build and is cheap.

This means, that everyone is free to take the construction blueprints and manufacture on a scale in their own community. To make it work however, there needs to be some agreed upon standards. For example, I have chosen a 50mm diameter for this project, but other projects may require smaller or larger diameters.

Current available off the peg enclosures are a real pest for tinkerers and often look shabby, unless you put lots of work into them.

So how is a thing like this built?

Help on applying the Open source GPL to its constuent parts.
Help on working out the threadings to be used.

Think of it like an open source software project except here the software will be gerber files, CNC milling files, dimension measurements and legible building instructions, as well as numerous sketches to run the product. The more people involved in creating this product, the better it will be. And we can find cheaper and cheaper ways to produce it, and at the same time be offering a GPL, perhaps the first GPL product aside from Arduino, the first GPL product for domestic purchase.

In the meantime I guess I'll just keep posting what I have come up with so far. I hope this helps. Thanks for your interest.

RamJam:
(...)Think of it like an open source software project except here the software will be gerber files, CNC milling files, dimension measurements and legible building instructions,(...)

FYI, that is called OSH = OpenSource Hardware.

I think this is a neat project and actually fits with something I've been working on. I look forward to reading more about it.

AlxDroidDev:

RamJam:
(...)Think of it like an open source software project except here the software will be gerber files, CNC milling files, dimension measurements and legible building instructions,(...)

FYI, that is called OSH = OpenSource Hardware.

With this in mind I have started checking out OpenSource Hardware. The Arduino board is also OpenSource Hardware. The following drawings show the complete assembly, and individual parts that make it up. There is enough information here to build this enclosure. Feel free to add improvements.

Drawing 8 shows the complete assembly:

The following photos show individual parts:







The following shows a list of parts:

Bt7cs:
I think this is a neat project and actually fits with something I've been working on. I look forward to reading more about it.

With the pictures in the previous post you can see how far I've got. Unfortunately, the cost of getting each part machined the traditional way would come to about £2500 !! This is the harbinger that is a major problem. I had naively assumed that progress had reduced costs. There is the 3d printer option such as Shapeways, however, they don't do brass or fine threads.

The drawings could do with extra refinment. In terms of a colaborative community project I don't know where to go from here.

Does anyone want an enclosure like this?
Do other people experience problems with enclosures for their projects?
Does anyone know how to get parts such as in the above made up at low cost?

Feel free to add your sketch or drawing ideas for components / building blocks to make up enclosures.

In the meantime I shall explore an idea for making the same type of cylindrical enclosure using off-the-peg tubing and using grub screws to fit the sections and end sections.

Suggestion: PVC pipe and connectors.