top of page

Lightbox

Spring 2022

The Lightbox project was a user-friendly control box designed and prototyped in BME473L, a class where students are immersed in a formal engineering design environment. The design had an accessible on/off switch, push button, and LED through the incorporation of a PCB as well as an astable and monostable 555 timer. OnShape software was utilized to create the physical box and KiCad software was utilized to create the electrical PCB. Technical skills such as soldering and CAD design were employed while constructing this project. Although the final product did not succeed electrically, all mechanical user needs were met and the implementation of design and testing processes were great practice for future projects.

This project was completed on my own, but with the advice and guidance of instructors, TAs, and fellow classmates working on the same project.

The design and implementation of the Lightbox project gave insights into both mechanical and electrical engineering design while providing an opportunity for creativity within the CAD designing phase. Although each student had the same user needs and specifications, each Lightbox had its own unique shape, size, and electrical implementation. Students were provided with insight into possible ways to come up with a solution, but had the opportunity to iterate through prototypes, test unstable electrical connections, and create one's own schematic/PCB layout in order to accomplish a final product.


User Needs

The blinking Lightbox design was constructed based on a subset of user needs and design specifications, but there was no specific client for this project. All of these needs were established to ensure efficiency, longevity, and safety of the device. The specifications are listed below:

  • SPST switch to turn device on/off

  • Press button that initiates a 10 Hz, 50% duty cycle blink of an LED for 50 on/off cycles. The LED is otherwise "off". Button presses during active blinking should perform no action.

  • Powered using voltage-regulated, 9 V battery with reverse-polarity protection

  • Battery must be replaceable in under 5 minutes

  • Battery life ≥ 4 hours

  • Single-sided printed circuit board (PCB)

  • Weight ≤ 0.5 lbs

  • All dimensions < 4 inches (including protruding switches, LEDs, etc.)

  • Enclosure is "sealed"/air gaps minimized

  • ≤ $20 to duplicate unit (ie. no microcontroller)

  • Survives 3 foot drop (secure mounting of all internal components, rounded corners/edges, reduction of protruding switches/knobs)

  • Safe


Testing and analyses of the final product will provide a better understanding of where these user needs were successfully met as well as which specifications could use improvements in future implementation of the design.


CAD 3D Renderings and Dimensional Drawings

The three main components of my Lightbox design were the base, lid, and battery door. 3D renderings (images) of these components can be found below along with a detailed dimensional drawing for each. Also provided is a dimensional drawing of the entire assembly.


Base

The base of the Lightbox highlights many features of the design necessary in completing all user needs. One of the key components is the battery pack with an opening in the back that connects to the rest of the base's interior. Measurements were taken of a 9 V battery and expanded upon in order to estimate a space big enough to fit the battery, but small enough to remain snug and avoid movement. A few iterations were necessary in the design of this space, but the eventual product consisted of a snug compartment, perfect for battery storage. The back of this compartment included an opening for the + and - wires from the 9 V battery to connect to the PCB; this allowed the LED and switches to receive power.


Various design specifications such as rounded edges and the overall size of the box can be observed from the 3D renderings below (Figure 1.1-1.3). The size of the box is smaller than 4 inches in all directions in order to accommodate for the stated user need, but large enough to fit the PCB and all of its components inside.


Figure 1.1 and 1.2. 3D rendering of the base in isometric and side view, respectively.


Figure 1.3. 3D rendering of the base in top view.


The dimensional drawing of the base can be seen below and shows the specific dimensions of many design features of the box (Figure 1.4). These drawings were created so that any person could recreate the design and iterate off of it, if necessary.


Figure 1.4. Dimensional drawing of the base.


Lid

The lid of the Lightbox showcases the detail necessary in using specific switched and LEDs as well as the dimensions required for the lid to fit snuggly onto the base of the design. Three holes are present on the face of the lid for the SPST switch, press button, and LED; each of these parts have specific dimensional drawings that were found online in component manuals. The specifications for these holes can be found below the 3D renderings (Figures 2.3 and 2.4). The largest hole is the SPST switch while the two smaller holes are the press button and LED, the press button being the larger of the two.


Figure 2.1 and 2.2. 3D rendering of the lid in bottom and top view, respectively.


Figure 2.3. Dimensions of SPST switch from component manual (found online).


Figure 2.4. Dimensions of press button from component manual (found online). Note, 7.2 millimeters is about 0.3 inches.


Note: The dimensions of the LED used were taken manually with calipers to have a diameter of about 0.2 inches; this was implemented in the dimensional drawing of the lid (Figure 2.5).


The dimensional drawing of the lid can be seen below and shows the specific dimensions of many design features of the box (Figure 2.5). The component dimensions for the SPST switch, press button, and LED are implemented in these drawings and, therefore, allow each component to fit tightly into their respective holes. These drawings were created so that any person could recreate the design and iterate off of it, if necessary.


Figure 2.5. Dimensional drawing of the lid.


Battery Door

The battery door of the Lightbox is one of the simpler components of the overall design, but when analyzed and tested as part of the final product, could still be improved significantly. The originally idea was to be able to press the door into the base's exterior in order to close the opening made by the battery pack compartment; this would keep the 9 V battery from falling out of the Lightbox and prevent any slippage/movement. Unfortunately, this design did not take into account a number of flaws such as its inability to take the door off if jarred and the dimensions necessary for the battery door to fit tightly. The inability of our 3D printers at Duke to print small components with great detail posed a challenge to the design of the battery door, but if time allowed, could have been iterated through to find a more ideal solution.


The battery door constructed was utilized more as a make-shift door in the final product; this can be seen in the "Final Mechanical Assembly" section later on. Below is the 3D rendering of the battery door (Figure 3.1).

Figure 3.1. 3D rendering of the battery door in isometric view.


The dimensional drawing of the battery door can be seen below and shows the more simple dimensions of this component (Figure 3.2). These drawings were created so that any person could recreate the design and iterate off of it, if necessary.


Figure 3.2. Dimensional drawing of the battery door.


Full Assembly

The entire assembled Lightbox was constructed in the OnShape software in order to provide a visual of the prototype before any 3D printing took place (Figure 4.1). The verification of proportions as well as the overall understanding of design functionality were two advantages of using the CAD assembly software before printing; this prevented any initial design flaws due to human oversight.



Figure 4.1. 3D rendering of the entire assembly.


The dimensional drawing for the entire assembly can be seen below with each component - base, lid, and battery door - labeled individually as well as assembled collectively (Figure 4.2).


Figure 4.2. Dimensional drawing of the entire assembly.


Schematic Diagram

KiCad EDA was utilized in creating the schematic diagram for this project as it allowed for the specification of components, sectioning off of functional blocks, and integration into KiCad's PCB Editor. The SPICE simulator and electrical rules checker were helpful tools in determining if there were flaws in the circuitry before it was sent to the printer to be manufactured.


My Lightbox schematic was broken up into four functional blocks including the voltage regulator, monostable 555 timer, astable 555 timer, and LED output. The construction of the voltage regulator and LED output were a result of in-class discussions and external research while both the monostable and astable 555 timers were replicated from circuits found online. Both of these 555 timer circuits are detailed below including its implementation into the Lightbox design (Figure 5.2 and 5.3).


Figure 5.1. Schematic diagram created with Kicad.


The Monostable 555 Timer was used to trigger the blinking to turn on and off after a certain period of time; this is also known as a time delay and can be calculated with the equation in Figure 5.2. This circuit works by triggering on a negative-going pulse applied to pin 2. Once triggered, the Monostable 555 Timer circuit will remain in this "HIGH" unstable output state until the time period set up by the relationship between "R1" and "C1" has elapsed. The trigger pulse referred to above can be seen in Figure 5.2 as the purple wave while the monostable output would be the blue wave.


Figure 5.2. Monostable 555 timer circuit diagram.


The Astable 555 Timer was used to blink the LED on and off at a specified intervals (Figure 5.3). As seen in the astable output (blue wave) below, the period of time where the output is at 1 is when the LED is on while the period of time where the output is at 0 is when the LED is off. "t1" and "t2" can be different values, but were made the same in my Lightbox. Again, the output of this circuit's on and off time periods are determined by the combination of capacitor and resistors.


Figure 5.3. Astable 555 timer circuit diagram.


Figure 5.4. Astable 555 timer circuit equation for on and off time periods.


The electronics website (Electronics Tutorials) used for the Monostable and Astable 555 Timer circuits included a key for the numbering on each circuit diagram; this allowed for matching of components into the correct rows on the breadboard. A definition is given for each of these pin numbers as well.


Figure 5.5. Key for monostable and astable 555 timer circuit diagrams.


Breadboard Layout and Functionality

The breadboard seen in Figures 6, 7, and 10 are all a direct reflection of the schematic diagram (Figure 5.1) seen in the above section. All components and wiring were kept to one side of the breadboard in order to aid in the reductions of unnecessary connections. The main components used in this circuit were the voltage regulator, 555 timers (2), AND gate, and LED alongside a variety of capacitors and resistors. A diode was also used for circuit protection in order to restrict electrical current to flow in only one direction.


For the initial breadboard, the press button was present but the SPST switch was not; this was to avoid any unnecessary complications early in the breadboarding process. The press button was crucial in making sure that the circuit was working and the LED was blinking. The SPST switch was replaced by the direct connection of a 9 V power supply in lab. Therefore, there were no connection issues between a battery and the circuit and an in-lab power supply was able to provide a constant voltage throughout the testing process.


The green wires were used for connections back to the voltage regulator (which reduced the voltage to 5 V). The yellow wires were used for internal connections between components in the circuit. Lastly, the short brown wires were used for connections to GND.


Figure 6. Side view of initial breadboard.


Figure 7. Top view of initial breadboard.


As observed in the oscilloscope image below, the monostable mode of the Lightbox circuit has a period of 1.146 ms, a frequency of 872.33 Hz, and a duty cycle of 56.01 (Figure 8). The presence of a period allows for the differentiation between on and off time periods, but the frequency is too high. The user needs specified the frequency to be 10Hz; this means that the LED in my Lightbox is blinking too fast and resistor/capacitor values needed to be changed to decrease the frequency. The duty cycle is close to the user need of 50%, but would change with any change in resistor/capacitor values manipulated while fixing the frequency. The astable mode of my Lightbox circuit shows the same period, frequency, and duty cycle as that of the monostable mode (Figure 9).


Figure 8. Monostable mode for Lightbox circuitry.


Figure 9. Astable mode for Lightbox circuitry.


A video of the semi-working breadboard was made before implementing the design within KiCad's PCB Editor software package. In the video you can see the LED turns on with the pressing of the button, but does not blink (or rather blinks extremely fast).


Modifications for the resistors/capacitors were made by means of a 555 Timer Calculator for both monostable and astable modes, but for some reason did not produce the desired result. One reason for this could have been loose connections within the circuit, but all connections were checked by functional block by both me, an instructor, and a TA. We did not fully understand why the LED was blinking so fast as the correct values were used in testing, but I believe the implementation of the circuit and tools necessary to test by functional block will be very helpful in future projects.


Note: At the time, our assignment was only to turn in a video of the LED turning on to make sure the entire circuit was being powered. Due to this, I did not realize that my circuit frequency was so off. The pieces from the breadboard were then dismantled to use on the PCB, making the design process hard to backtrack. In future designs, I would keep my initial breadboard to do tests on while constructing the PCB with other components.


Figure 10. Video of semi-functional Lightbox circuitry.


PCB Layout

KiCad EDA was utilized in creating my Lightbox's PCB layout; this was achieved by uploading the components from the schematic diagram into the PCB Editor tool, then rearranging them to fit on the PCB and pass all electrical design rules (Figure 11). KiCad software allows for the differentiation of component footprints and running of traces between components in order to make sure the parts fit into the PCB once it is manufactured.


Figure 11. PCB layout created with Kicad.


Images of the front and back of the my manufactured PCB are included below (Figures 12.1 and 12.2). Solder is applied to the backside of the board in order to electrically attach components to traces. The components (resistors, capacitors, voltage regulator, 555 timers, etc.) can be seen on the frontside.


Note: The footprint for the voltage regulator, AND gate, and 555 timer were added incorrectly and therefore created many complications in the wiring of the overall PCB. Orange wires were cut and used as external traces then electrically checked to make sure the connection was sufficient; this method worked, but was definitely not the most efficient or durable for the longevity of the design. (First time for everything right.....)


Figure 12.1 and 12.2. Images of back and front of PCB, respectively.


Prototyping

A variety of prototypes were iterated through in the creation of the final Lightbox design. Both prototypes in Figures 13.1 and 13.2 had a similar design and dimensions, but were unable to fit together due to small errors in the abilities of CAD printers. Although our printers at Duke are able to print a variety of medium-fidelity prototypes, the machine is unable to print with the detail and consistency needed for the initial locking mechanism used (lock-and-key type method).


These prototypes allowed for further review of the overall design and, ultimately, provided crucial evidence of the initial design's lack of durability and ease of use. Due to the initial lock-and-key method of attaching the lid to the base being faulty, it was originally very difficult to consistently get the pieces to fit together. In addition, the initial design's method of attachment did not show a lot of hope in passing the 3 foot drop test due to its lack of durability.


Figure 13.1 and 13.2. First two iterations of prototypes including base, lid, and battery door.


The lock-and-key mechanism of attachment can be seen in Figure 14, below. Two cube-shaped recesses were designed on each of the four sides of the base while two cube-shaped additions were designed on each of the four sides of the lid in order for the two components to connect. The second iteration of the prototype was able to fit together snuggly, but was difficult to take apart and it was apparent that one of the cube-shaped additions on the lid were bound to break off after a few attempts of removing the lid. The edges were also not rounded yet on these first iterations, giving the design a very sharp and boxy shape.


Figure 14. Second iteration of base prototype.


Final Mechanical Assembly

The final, assembled Lightbox included the base with a slot for the 9 V battery, the lid with correctly dimensioned holes for additional components (push button, LED, SPST switch), and the battery door. The battery door is included in Figure 16.1, but disregarded in other visuals as its functionality did not meet standards for the overall design criteria. The lid was fitted to complement the base, but two screws - on opposite ends of one another - were added to ensure durability for the 3 foot drop test.


Figure 15.1 and 15.2. Two different isometric views of the final Lightbox assembly.


Figure 16.1 and 16.2. Two different side views of the final Lightbox assembly.


Figure 17. Top view of final Lightbox assembly.


An overview of the final Lightbox assembly can be seen in Figure 18 as the design is observed from all angles. All mechanical design specifications were met in the construction of my Lightbox including size restrictions, durability, and incorporation of all the components required. The push button was not pressed to test the design as it did not meet all electrical design specification; after extensive testing both by myself and with TA/instructor help, we were unable to come to a conclusion on the main error (a loose solder connection or incorrect resistor/capacitor values are our two main hypotheses).


Figure 18. Video of outside of final Lightbox assembly.


The inside of my Lightbox was designed to fit the PCB and all of its components with as little latitude as possible. Four screws were used to fasten the corners of the PCB to the base of the Lightbox in order to avoid any shifting of components. Many measurements were taken of the components and board size in order to make the most educated guess for ideal dimensions for the Lightbox design; it needed to be as small as possible while still being able to fit all necessary components inside.


Figures 19.1 and 19.2 provide a visual of the secured PCB attached to the base and lid of the Lightbox. The video included also provides this visual, but with a better angle and emphasis towards various features of the design (Figure 20). Lastly, an image of the Lightbox base without the PCB is included in order to see the screw holes which were manually positioned by means of solder and hot glue (Figure 21).


Figure 19.1 and 19.2. Inside of Lightbox base and lid, respectively, with PCB present.


Figure 20. Video of inside of final Lightbox assembly.


Figure 21. Inside of Lightbox without PCB present.

Testing

Many tests were performed on the Lightbox design in order to confirm all user needs and design specifications. Tests to be performed and reflected upon were those on initial values, duty cycle, frequency, duration, battery lifetime, and power dissipation. Although not all tests were completed to standard, in possible future iterations and with more time I would love to work through some of the earlier stages of the design process in order to create a design more ample for catching errors when they arise. The implementation of these tests was helpful in understanding if user needs were met, but could have been more beneficial if more time was taken in the early stages of the project for organization and overall understanding of the problem/components used.


Initial Values

Due to inconsistencies within the PCB, measurements of each valued resistor and capacitor were made on the working breadboard; this allowed me to confirm any discrepancies between the ideal value and the actual value of the part used on the breadboard. By checking these values, I was able to confirm that the parts being soldered onto the PCB were of the correct value. Therefore, any incorrect values present on the PCB must be due to shorting or an insufficient solder. The components referred to in Table 1, below, are the same component names referred to on the schematic and PCB editor.


Many of these components' actual values were similar to their ideal values and, therefore, did not need to be replaced before being added to the PCB. These tests were completed in order to provide additional information to better understand when problems arise within the Lightbox design.


Table 1. Table depicting differences between ideal and actual values for various resistors and capacitors within the device. These components are given with a certain accuracy or tolerance in order to account for this discrepancy.


Duty Cycle and Frequency

The breadboarded circuit, not the PCB circuit, was used in testing the duty cycle and frequency as the electrical connections were more stable at this point in the design process. The oscilloscope screen images of both the monostable and astable 555 timers give the information necessary for this testing (Figures 8 and 9). By utilizing oscilloscope measurement tools, the circuit tested during the breadboarded phase was found to have a 56% duty cycle and a frequency of 872 Hz.


The duty cycle was close to the 50% specified by the user, but the frequency was much too high as the design specification set by the user was a frequency of 10 Hz. Visually, this would have provided a slower, more visible blinking rate rather than one too fast to differentiate between blinks (Figure 10). The calculations for the astable portion of the circuit were checked by a TA and instructor and are believed to be correct from the 555 astable online calculator (ohmslawcalculator.com), but loose or misplaced connections could be causing fluctuations in this value.


With more time, it could be beneficial to work through these resistor and capacitor values from scratch to see if there are any other combinations that may be more ideal for a 50% duty cycle and 10 Hz frequency.


Duration

The duration refers to the monostable envelope and is represented by the correct number of pulses per button press. The duration of my circuit is, unfortunately, incorrect due to the rationale given in the "Duty Cycle and Frequency" section (incorrect combination of resistors/capacitors and/or loose soldering connections). Since my frequency is 872 Hz rather than 10 Hz, the LED blinks too fast per button press and looks as if it were continuously "on" for the 5 second period of time rather than periodically blinking. Due to this, the number of pulses per button press (duration) is much higher than it should be.

  • Expected: 10 Hz × 5 seconds = 50 pulses per button press

  • Actual: 872 Hz × 5 seconds = 4,360 pulses per button press


Battery Lifetime

Based on literature values, a typical 9 V battery has a capacity of 500 mAh so that a circuit drawing 10 mA will operate for about 50 hours. When analyzing my circuit, battery lifetime can be measured by looking at the current drawn by the entire circuit. Since the current was not working properly in the final PCB, I did not find it of any use to take the battery lifetime of the shorted circuit.


In the future, I would have taken the total current drawn from my breadboarded circuit before taking the components off to add to the PCB. In general, I would have liked to go through all testing with the breadboarded circuit as well as the PCB in order to make backtracking an error more feasible.


Power Dissipation

Ohm's Law is used to calculate the power dissipation of various elements within a circuit. There are many ways to make this calculation, but due to inconsistencies within the circuit and a lack of test points, it became difficult to get necessary values for this calculation. The combination of equations used for this calculation can be seen below:

Power dissipation was another test that was not completed before soldering the components from my breadboard onto the PCB, therefore, values are not available for the calculations of this test.


Although values were not measured/calculated from my Lightbox design, some of the highest dissipating components should be the voltage regulator, 555 timer, and LED. Initial observation of the breadboarded circuit provided information on the temperature of each component as they tended to be giving off more heat than other components on the breadboard. For the voltage regulator, the greater the difference between input (9 V) and output (5 V) voltage or the greater the current, the more heat will be dissipated by the regulator. In addition, the LED's heat sinking ability provides an avenue for the heat dissipation to be reduced within the circuit, but the LED itself still dissipates a small amount of heat as physically observed in the breadboarded circuit.


Note: In my PCB design, since it did not function correctly, the battery was actually dissipating the most heat; this was due to the shorting of the circuit.


Bill of Materials

My Lightbox bill of materials is used as a centralized list of items necessary for the manufacturing of my final Lightbox design; this includes the designation of each component as stated on my schematic/PCB layout, the actual component name (package), the number of each, and the value (designation) given to each component. Some of these designations are quantitative values while others are simply qualitative descriptors.


Note: The AND gate used in the actual Lightbox was the SN74HC08N. The voltage regulator used was the TO-220-3_Vertical. The capacitor (C4) used was a 0.1 uF capacitor rather than a 0.01 uF capacitor.




Concluding Words

Although my Lightbox design did not function as I hoped it would by the end of the semester, I anticipate implementation of the design process as well as practice with various mechanical and electrical skills to be very beneficial for design projects in the future. Skills like soldering and CAD design were extremely helpful to work through alongside other students and knowledgable instructors/TAs and will give me the ability to be more efficient in future iterations and prototypes.


In the future, I would like to break down various functional blocks of my design in either a functional decomposition or user action flowchart in order to better understand the overall design before jumping into prototyping; this would, hopefully, avoid design errors and provide a more streamlined avenue for backtracking those errors.


Project Notes

Methods of Organization/Communication:

  • GoogleDrive (shared documents)


Software/Tools:

  • OnShape (CAD design/printing, dimensional drawings)

  • KiCad EDA (schematic diagram, PCB layout, bill of materials)

  • Multimeter (testing of initial values)

  • Oscilloscope


Skills:

  • Computer Aided Design (CAD)

  • Electronics/Circuitry

bottom of page