Changes

Jump to navigation Jump to search
7,968 bytes added ,  4 years ago
Line 76: Line 76:  
[[Image:TV_Mood_Lamp_Mitered_Base_With_Hole_DXF.png|500px]]
 
[[Image:TV_Mood_Lamp_Mitered_Base_With_Hole_DXF.png|500px]]
   −
* The router does not use DXF files, but it wants an SVG. So, open [[Inkscape]] and import this DXF file. If you are not familiar with [[Inkscape]], this would be a good time to do the training on the [[Inkscape#Training|Inkscape Training]] page. On the import, make sure that you have the "Method of Scaling" set to "Read from file".
+
* The router does not use DXF files, but it wants an SVG. So, open [[Inkscape]] and import this DXF file. If you are not familiar with [[Inkscape]], this would be a good time to do the training on the [[Inkscape#Training|Inkscape Training]] page. On the import, make sure that you have the "Method of Scaling" set to "Read from file".  
    
[[Image:TV_Mood_Lamp_Mitered_Base_With_Hole_DXF_Import_to_Inkscape.png]]
 
[[Image:TV_Mood_Lamp_Mitered_Base_With_Hole_DXF_Import_to_Inkscape.png]]
Line 84: Line 84:  
[[Image:TV_Mood_Lamp_Mitered_Base_With_Hole_DXF_Text.png|500px]]
 
[[Image:TV_Mood_Lamp_Mitered_Base_With_Hole_DXF_Text.png|500px]]
   −
* We can choose to color code the design for the router. This isn't strictly necessary, as it can be done on the router. In fact, for something this simple, it will be just as easy to do this on the router. If you did want to color code it here, you could download the [[Media:Shaper_Origin_Template.svg|Shaper_Origin_Template.svg]] file and import it into your design. Move it off to the side. We will just be using it for color reference. Then color the different sections accordingly. To be honest, I am having trouble getting this to work correctly :)
+
* Things look OK at this point, but they are not. You can test this by trying to fill one of the sections with a color. You will quickly find out that these lines are not joined together. There is a thorough explanation of how to fix this given here:
 +
 
 +
{{#evu:https://www.youtube.com/watch?v=zN0jkUGdObw}}
 +
 
 +
In short, you will need to select each set of lines that should be connected, then use the "Edit Paths by Nodes" tool to select the two nodes that occupy the same spots, and then join the selected nodes. This will tie the line segments together to create a distinct shape in Inkscape. You need to do this to turn all of the lines into shapes that can be colored. This will allow the CNC Router to recognize the shapes.
 +
 
 +
* We can choose to color code the design for the router. This isn't strictly necessary, as it can be done on the router. In fact, for something this simple, it will be just as easy to do this on the router. If you did want to color code it here, you could download the [[Media:Shaper_Origin_Template.svg|Shaper_Origin_Template.svg]] file and import it into your design. Move it off to the side. We will just be using it for color reference. Then color the different sections accordingly.  
    
[[Image:TV_Mood_Lamp_Mitered_Base_With_Hole_DXF_Template.png|500px]]
 
[[Image:TV_Mood_Lamp_Mitered_Base_With_Hole_DXF_Template.png|500px]]
Line 100: Line 106:     
=== Route the shelf ===
 
=== Route the shelf ===
Perform the pocket cut 1/8" deep. This requires the initial pocket cut over the entire region, followed by an inside cut to clean up the pocket cut. The system automatically stays slightly off of the line during the pocket cut as the edge is not as clean when large amounts of wood are being removed. Hence, the inside cut to clean.
+
Perform the pocket cut 1/8" deep. This requires the initial pocket cut over the entire region, followed by an inside cut to clean up the pocket cut. The system automatically stays slightly off of the line during the pocket cut as the edge is not as clean when large amounts of wood are being removed. Hence, the inside cut to clean. You will want to offset the cut slightly (1/16"? - need to verify again) to make the insertion of the faceplate easier.
    
=== Route the hole ===
 
=== Route the hole ===
Line 149: Line 155:     
=== Prepare the job control file for the [[Metal Laser Cutter]] ===
 
=== Prepare the job control file for the [[Metal Laser Cutter]] ===
The [[Metal Laser Cutter]] uses the [[FabCreator]] software to create the job control file. Open up FabCreator, and import the DXF file that you want to create. Set the units according (inches in our case), and leave the placement boxes unchecked.
+
The [[Metal Laser Cutter]] uses the [[FabCreator]] software to create the job control file. You will need the DXF files for the control panels. <span style="color:#FF0000">'''When you save them, delete the countersink circles as we don't want these cut on the laser cutter. You can also do this in FabCreator, but it is simple to do it here.'''</span> When your DXF files are ready, you should Open up FabCreator, and import the DXF file that you want to create. Set the units according (inches in our case), and leave the placement boxes unchecked.
    
[[Image:TV_Mood_Lamp_FabCreator_import_dialog.png]]
 
[[Image:TV_Mood_Lamp_FabCreator_import_dialog.png]]
   −
This should bring in the control panel. <span style="color:#FF0000">'''If you have the countersink rings in your DXF, you need to remove them so that they do not get cut on the laser cutter. Just highlight them and click delete.'''</span>
+
This should bring in the control panel.  
    
[[Image:TV_Mood_Lamp_FabCreator_control_panel_dxf.png|500px]]
 
[[Image:TV_Mood_Lamp_FabCreator_control_panel_dxf.png|500px]]
Line 161: Line 167:  
[[Image:TV_Mood_Lamp_FabCreator_control_panel_dxf_clean.png|500px]]
 
[[Image:TV_Mood_Lamp_FabCreator_control_panel_dxf_clean.png|500px]]
   −
Notice that the lines are all green - this represents cut lines, which is what we want. Click on the Properties tab. Set the Database to FL4500 (this is our machine). Set the thickness to 1/8" (.125). Change the Y size to 1.5 (I don't know that this matters, I just like to see the square match).
+
Notice that the lines are all green - this represents cut lines, which is what we want. However, we want to make sure that the cuts go in the proper order. Specifically, you want to make sure that the outside line is cut last so that the part doesn't move. It would also be nice if the cuts occurred in a logical order, just to make things more efficient as the head travels. The order of the cuts is based on the list in the Part window. Simply move the elements around to ensure that the list reflects, from top to bottom, the order in which you want the cuts.
 +
 
 +
[[Image:TV_Mood_Lamp_FabCreator_PartOrder.png]]
 +
 
 +
Click on the Properties tab. Set the Database to FL4500 (this is our machine). Set the thickness to 1/8" (.125). Change the Y size to 1.5 (I don't know that this matters, I just like to see the square match).
    
[[Image:TV_Mood_Lamp_FabCreator_control_panel_properties.png]]
 
[[Image:TV_Mood_Lamp_FabCreator_control_panel_properties.png]]
Line 180: Line 190:  
* 4 Legs
 
* 4 Legs
 
* 1 Table
 
* 1 Table
* 2 Extension cylinders
+
* 3 Extension cylinders
    
[[Image:TV_Mood_Lamp_LED_legs.png|x300px]]
 
[[Image:TV_Mood_Lamp_LED_legs.png|x300px]]
Line 192: Line 202:  
== Attach the magnets ==
 
== Attach the magnets ==
   −
Each slice (including the base), will have 8 magnets attached to it (4 on top, 4 on bottom). These magnets are 1/4" diameter x 1/8" deep. Each slice will therefore need a hole drilled 1/8" deep in the center of each corner. The acrylic slices have marks already. It is important that the wood holes line up exactly.  
+
Each slice (including the base), will have 8 magnets attached to it (4 on top, 4 on bottom). These magnets are 1/4" diameter x 1/16" deep. Each slice will therefore need a hole drilled 1/16" deep in the center of each corner. The acrylic slices have marks already. It is important that the wood holes line up exactly. '''Make sure you do not drill all of the way through. It will be very difficult to mount the magnets if the hole does not have a bottom.'''
 +
 
 +
== Electronics ==
 +
The electronics are all about controlling the red, green, and blue intensities on an RGB LED strip - likely in some sort of fade pattern. Our specific RGB Led strip lights are rated at 12V, therefore, we will use a 12V transformer as an input. We will use an [https://www.arduino.cc/ Arduino] microcontroller. Specifically, the stalwart [https://store.arduino.cc/usa/arduino-uno-rev3 | Arduino UNO Rev3].  We need to add three power transistors to the Arduino to be able to deliver adequate power to the red, green, and blue LEDs of the led strip. Therefore, we will use the [https://www.adafruit.com/product/196 | Proto-Screw Shield] from [https://www.adafruit.com/ | Adafruit].
 +
Our system will be driving 12V led strips directly from the  power transformer input. You should not use a transformer significantly different than 12V. The circuit is shown below as a [https://fritzing.org/home/ fritzing] breadboard diagram (click it to enlarge). You can also download an easier to read [[Media:TV_Mood_Lamp_fritzing.pdf|pdf]] or the original [[Media:TV_Mood_Lamp_fritzing.fzz|fritzing file]].
 +
 
 +
=== Assemble the Proto-Screw Shield ===
   −
== Program the Arduino ==
+
Assembly of the shield is straightforward. Directions are given at the [https://learn.adafruit.com/adafruit-proto-screw-shield/intro Adafruit site]. There is no need to connect the LED's and resistors on the proto-shield. We will not be using them, and they will not be visible within our lamp. So, all you really need to assemble are the screw terminals (and the reset buttons is fine as well - doesn't hurt anything to have it, but it is sort of hard to press inside of the lamp).
   −
=== Test the Arduino IDE using standard programs ===
+
[[Image:TV_Mood_Lamp_fritzing_circuit.png|x500px]]
   −
=== Program the Arduino to read in the A/D values ===
+
=== Solder together the screw shield circuit ===
   −
Verify using the printouts
+
You will want to use solid-core wire for the point-to-point connections on the board. These will hold their position, and fit easily through the holes in the protoboard. To connect to the screw terminals, use the stranded wire. It is much more flexible and will greatly reduce the risk that you break a wire when inserting or removing the system.
   −
=== Program the Arduino ===
+
==== Components ====
   −
== Assemble the electronics ==
+
==== Input wires (stranded wires) ====
 +
The Input wires connect the external components to the screw terminals. The input power jack connects from the center terminal (power) to one end of the power switch.  The other end of the power switch connects to the VIN of the Arduino system. The ground of the power jack must be connected to the GND of the Arduino system. The potentiometers should have their "low-side" tied together and then connected to the Arduino GND. They should also have their "high-side" tied together and then connected to the Arduino 5V regulated power. The wiper of each potentiometer should then be connected to A0 and A1 respectively. If hooked up "correctly," when the potentiometer is all the way "on," the wiper should be connected to the "high" side. Now, what constitutes "on" is left up to you. If these are hooked up incorrectly, then the wiper can be inverted in software as a simple fix.
   −
=== Solder together the screw shield ===
+
==== Output wires (solid-core wires) ====
 +
The output system serves to drive the LED lights and consists of the internal wires on the shield. These lights will be connected to a 4-pin terminal in the center of your board. This terminal has power (white or black wire) and then wires for green, red, and blue signals. The power comes directly from the VIN pin ('''not''' the 5V pin). Each of the green, red, and blue signals is connected to a "low-side" MOSFET switch. The source of the MOSFET's are connected to GND, the drain is connected to the appropriate pin on the 4-pin header, and the gates are connected to pins 3 (green), 10 (red), and 11 (blue).
   −
=== Solder the transistors onto the shield ===
+
When soldering solid core wires onto prototype boards, you generally want to connect them to a component that is also soldered into the board. The easiest way to do this is to put the wire through a hole adjacent to the component lead, and then bend the wire over horizontally so that it is basically touching the lead. To accomplish this you will need to strip the wire a little longer to allow enough wire for the journey. Journey? Sure ... journey.
   −
=== Solder the solid-core connecting wires ===
+
=== Testing the shield wiring ===
 +
'''BEFORE''' powering anything up, or connecting the shield to the Arduino, use a multimeter to validate that the circuit has been wired properly. Test every connection for continuity. It is also good to check nearby pins to ensure that there are no shorts. After testing every connection, plug the board into the Arduino, and turn the power on. Ensure that the Arduino is getting power (the power led comes on). Use the DMM to test the voltages around the system. Make sure that the power wire at the LED Strip terminal is getting the same voltage that is coming out of the power supply. Make sure that the potentiometers are getting 5V. If all of this is correct, you can proceed. Turn off the power, and remove the shield from the Arduino.
   −
=== Solder the  
+
=== Programming  the Arduino ===
 +
There are a lot of resources on the web about how to Arduino. Let's start with the official Arduino Guide page for the [https://www.arduino.cc/en/Guide/ArduinoUno Arduino UNO]. If you are using your own system, install the Arduino IDE. If you are on a school system, bring up the Arduino IDE. You will need to make sure that your Arduino is connected via USB to the computer.
 +
* When you are ready, scroll down the Arduino Guide page to the "Open your first sketch" section and attempt to get your Arduino to blink.
    +
When this works, it is time to move on and test the proto-shield. '''POWER DOWN THE SYSTEM BY UNPLUGGING THE POWER'''. Insert the proto-shield to the Arduino. Then power the system back up. You should see the "blink" program working. The last program you wrote will always run automatically when the system is reset.
 +
* Open up the AnalogInput Example and use it to test one of your potentiometers. You will need to understand the code to know what you are looking for - but a quick google on the aspects of the code that you don't understand should get you there.
 +
* Change the code to test your other potentiometer.
    +
At this point we should test the LED lights (make sure they are plugged in). Prior to the setup function in your code, add in the following lines:<pre>
 +
#define REDPIN (10)
 +
#define GREENPIN (3)
 +
#define BLUEPIN (11)</pre>
 +
And then, in your setup, add in the following:<pre>
 +
  pinMode(REDPIN, OUTPUT);
 +
  pinMode(GREENPIN, OUTPUT);
 +
  pinMode(BLUEPIN, OUTPUT);
 +
  analogWrite(REDPIN, 255);
 +
  analogWrite(GREENPIN, 255);
 +
  analogWrite(BLUEPIN, 255);</pre>
 +
When you run this code, it should turn the LED's all on, which will make a bright white light. Cool.
   −
== Create the
+
Finally, when all appears to be working, download the [[Media:Mood_Light_Fader_Code.zip|fader code]] and test it. You should have a functioning system now! Congratulations.

Navigation menu