Hot Sale Products

dmx led strips

by:Marslite     2019-09-12
We have 17 fences around the circus, decorated with rgb led strips.
I want to control the rest of our lighting with DMX.
DMX is the industry standard for communicating with lighting equipment.
Wiki dmx searches for a device that can handle this issue and I find that most devices only meet 1-
3, quite expensive.
So I decided to build one myself.
I have previously built an Arduino-based DMX relay and think it is not difficult to adapt to the LED strip.
Writing this structure is to help you design, build, and program your own units with any changes you need.
Please visit github.
Latest code and com/mtongnz for some of my other projects.
I built this project on several different projects and libraries that I found very useful.
These people do a great job, which means programming is a lot easier.
Matthias Hertel has made excellent DMX libraries and DMX shields for Arduino.
This is the library I used to receive the DMX, and I used his shield schematic in the design as the basis for the DMX receiver.
I chose not to provide the RDM feature as I did not need it.
DMX ShieldDMX serial port LibraryElco Jacobs creates a library to generate PWM using a shift register.
This means I can output 15 channels with only a few pins.
You can add more output very easily and cheaply in my design.
ShiftPWM Library (
His website is currently closed)
The main source of information for ShiftPWM gitubthese.
Along the way, I also found some small questions and tips using Google and Youtube.
This includes how to use Eagle and how to handle SMD parts.
Basic part :-
Design parts according to your final.
Attach my BOM. -PCB.
We designed and ordered this in the next few steps. -Power supply (I used 12 V 150 W)-
Everything is in the box.
LED strips and wires/plugs for connecting basic tools :-Soldering iron-Wire cutters-
Computer for programming and PCB design
Lighting console with DMX output function (But recommended):-Tweezers-
Breadboard and jumperArduino (I used a Nano)-
ICSP programmerI designed the schematic and PCB for this project using Eagle.
This is the first time I have used it, so Youtube is very helpful.
I will not go into the details, as this is not the purpose of this Instructure.
Download the EagleMy design process: I want the motherboard to be as compact as possible, which means I gave up the Arduino and used the ATMega328p (
Processor of Arduino Nano)
My starting point is the most basic component.
Next, I added the DMX receiver component.
This includes DC-
DC converter and optical isolator.
Removing these and connecting MaxTron directly to the arduino will help with testing, but I suggest using them for final design to protect your device and other devices on the DMX line from over-high voltage.
The final component is the 74 hc595c shift register and fet.
I used 2x74 hc595cs and allowed 16 outputs in total (
I need 5x RGB = 15).
I also put a cover of 100nF on each IC, a cover of 10 uF on the 5 v input, and a 5 v power regulator with a recommended cover.
More output: More shift registers can be added if needed.
Note that this will use more processing cycles and may cause problems.
You can reduce the refresh frequency to cope with this, but don\'t drop it below 50Hz or it may start flashing.
On Elco jacob\'s website, he has a calculator to determine the usage of resources.
Address selection: I don\'t need to change the address once the address is built, so there is no address selection in my design.
There are a lot of Arduino inputs, so you can easily add a 10-way dip switch for this if needed.
Fuse: I recommend adding smd fuse in each output.
Why see the last step.
Crystal packaging: Replace Crystal for different packaging types-
Probably through the hole.
The packaging I chose was very difficult to weld by hand.
Please visit github.
Latest code for Com/mtongnz.
I used the two libraries mentioned in step 1.
The ShiftPWM needs to be modified slightly to remove its serial command-
They interfere with the transmission of DMX.
I have included the download for both libraries, but it is highly recommended to visit the author\'s website.
Download the library and import it into the Arduino IDE.
To do this, unzip them into the libraries folder and restart the IDE.
Google it if you have a problem.
My code is very simple when the library handles all the heavy work.
Set some variables first.
They are very self-explanatory and have options set for the ShiftPWM, the number of outputs we are running, and the DMX address.
Since I want 4 continuous units, I just need the first DMX start address and then a unit number.
I found this easier than manually entering the address for each unit.
In the setup routine, we start the DMX receiver, start the ShiftPWM and set the output to off, set the status LED to on to show that we have power, clear the flash counter, start a timer interrupt, for our status LED and flash.
In our timer interrupt program, we just need to add the timer and the strobeCount variable.
We don\'t want to do too much here, otherwise it will cause the rest of our code to not work properly.
In the main loop, we set the status LED first.
It will flash when it receives the DMX and stay on steady light for 1 second after losing the DMX.
Next, we set the output to the desired value.
If we don\'t receive the DMX for 10 seconds then all the output will be turned off.
If our stroboscope is between 20 and 220 (
Max DMX value 255)
Then we apply the burst RGB value to the output-
20 is a slow flash, and 220 is a fast flash.
If our stroboscope is out of this range, then we just need to apply the RGB value to the output.
I plan to add a random flash but don\'t have time yet.
I completed this step in combination with schematic design and programming steps.
Please note that the photo is not the unit I use-
It may not be correct because I have not tested it.
I forgot to take a picture of it, so I put it back together soon.
My big breadboard is being used in another project, which is why it is so crowded.
Connect all components to the breadboard according to the schematic diagram.
You need to pass-
Hole Assembly here, so if you use SMD in the design like I did, you may need to do some replacement.
My replacement :-
The Arduino Nano replaces the bare 328 p for easy use on the breadboard. -
Standard red LEDs instead of full RGB strips and fet.
I have also used only a few LEDs to prevent jumper pasta.
To test all the output, I changed the output of the jumper connection. -
There is no DMX isolation circuit to make things a little easier because I have used the same circuit before and know it works.
Program and test: flash the sketch to Arduino and test everything.
If everything goes as expected, you can start with the PCB.
You can also use this prototype to add or change any programming while waiting for the PCB to arrive.
I will explain again how to use Eagle as there are already a lot of great tutorials and videos.
This is one of the more difficult steps.
Trying to adapt everything is a challenge when using a minimum number of vias.
I spent 4 attempts before I decided on the final design.
For the final design, I place the shift registers first because they have the most traces.
Once they are in place with all the outputs at the top of the board, everything else is in place.
To minimize interference, I keep the dmx Circuit away from the power cord.
I don\'t think it\'s a problem, but I don\'t want to know.
Please note that my design needs to be adjusted to allow the correct plug installation.
When I found this after the motherboard was made, I just used the normal working title.
It would be better if I had a Molex plug to power the motherboard.
It will be annoying to have to cancel
Please weld the power cord if I need to remove the board.
I don\'t think these issues are enough to warrant a restructuring of the board.
I also made a small mistake in the wiring of MaxTron, so the wire in the photo went through it.
Like I said before. . . .
Check everything over and over :)
This is fixed in the design file I uploaded.
I found this tutorial very helpful for this one.
I ordered my motherboard from Seeed Studio using their Fusion PCB service.
I found it cheap and the board was of good quality and it took only a few weeks to get there.
They have at least 5 boards.
You can use a lot of other manufacturers.
Run the manufacturer\'s DRC (
Design rules check)in Eagle.
This ensures that they can actually make what you design.
Now you need to generate the required Gerber file and drill file.
It\'s easiest to download if they have a Gerber generation file (
Seeed Studio with their help).
In the PCB, select the File> CAM processor in the PCB view.
Open a generation of working files and create your Gerber Jiabao and drilling files.
If there is no job file, you need to manually configure the file to be made (
Check with your manufacturer).
Make sure you have all the files that your manufacturer needs, compress them and send them to your manufacturer.
Seeed Studios has an online form where you can fill out all the options you want on your board and an upload feature.
Start with your smallest component, all the way up.
I started with resistors and covers.
Then it\'s crystal and water.
Then through-Hole Assembly.
And finally all the titles.
Make sure to place the component in the right direction.
Your tweezers are very helpful here.
I also found that using the aid hand or blue stickiness helps keep the board when you weld.
Please note that the board needs 5 v for these steps.
In my design, I use 12-5V DC-
DC converter due to efficiency and cost.
I made this case and wired it first because the unit on the photo is the second unit I made.
If you choose to use a mature Arduino in your final design, simply program from the IDE as usual.
You can skip the rest of this step.
Software and ICSP programmer: I decided to use ICSP in order to reduce cost and scale (
Serial Programming in the circuit)
Flash my motherboard instead of the normal USB-to-serial used on the Arduino motherboard.
This requires a separate programmer (
I use USBasp).
Follow this tutorial to set up Arduino IDE, AVRFuses, and USBasp.
This is for mac, but there are similar software for Linux and Windows, and there are a lot of tutorials to help.
You can also do this using another Arduino if you want.
I\'m not sure if you can use this method to set the fuse as I haven\'t tried it yet.
Setting the fuse: I found that setting a fuse at a time is the best way.
Be careful with this step because if you flash the wrong bit you will make your processor useless.
Low Fuse: 0 xFFHigh Fuse: 0 xDAExtended Fuse: 0 × 05 flash hex file: in Arduino IDE, save the sketch as in the tutorial above and click verify
Now select the hex file in AVRFuses and click program \".
You can also select USBasp as a programmer in the Arduino IDE, and then select use Flash with programmer from the File menu \".
I found this after finishing this project.
When you fine-tune your code, it\'s much easier than flashing hex with a separate program.
Depending on your design, the power supply you choose will vary.
In order to reduce the power requirement and heat, I chose to use the LED light strip of 30ppm.
Most LED light bars are 60ppm.
Check the requirements of your belt.
I have 5 LED lights, about 4 each.
5 m, 30 LEDs per meter, so about 130 LEDs per strip.
Use 0 for each 5050 LED.
24 a full white at 12 V.
5*130 led * 0.
24A/12 V = 13ai suggests leaving 10% or more to allow the resistance of the cable and the band itself.
I chose the 15A 12 v power supply.
5 v power supply: I choose to use 12-5V DC-
DC converter that powers my circuit.
I found some on eBay for $2 per piece.
Your motherboard is now complete and ready for the first test run.
Connect the 5 v and 12 v power supply along with a small portion of the LED light strip to the motherboard and run the output test file.
I used a whole roll.
It gets hot and melts the reels it is in, so don\'t do that.
It should flash red, green, blue, white.
If any output is not working, check the welding and schematic and try again.
If all outputs work properly, flash the final_code sketch and connect the DMX.
Open it and send some DMX values.
Hopefully you can see your LEDs do what you want from them.
Troubleshoot: Try flashing the sketch so that the DMX can be eliminated, such as output_test.
This is a dmx problem if all outputs work as expected-
For some ideas on further narrowing the scope of the problem, see below. -
5 v power supply for all ICs. -
Dry solder joints.
I found that after running for more than two hours, I found sporadic flashes on one unit.
It turns out to be a dry joint on a shift register. -
Stupid errors in code, schematic, or structure including component direction. -
It is good to check PCB routing using Continuity tester.
If your device is still not working, check the data table for each component.
Make sure the correct wiring, provide the correct voltage and all other IO pins are connected correctly.
It might help to get back to the breadboard.
You may have a defective part.
But unless you give it an incorrect voltage, this is not possible.
DMX trouble shooting :-
Make sure the DMX address is correct.
If you add a method for entering an address (eg. DIP switches), try by-
Pass this by hard coding a value in the sketch. -DMX polarity -
Try replacing pins 2 and 3. -
Check if the maxconnector is powered on and the connection is correct. -
Try to bypass ok1.
If this is the issue, make sure the OK1 connection is correct. -
Check if the DMX source works with a known work fixture.
Now that your electronics has been completed and work started, it\'s time to put it in a box.
Warning: In this step, I remove the PSU shell and modify it.
If you do this, be very careful because there is a voltage inside that will kill you.
When everything is unplugged, the cap can also store a lot of power.
Feel free to treat it as alive, and don\'t touch any metal inside.
If you would like to open the PSU, I strongly recommend that you ask for help from a qualified or experienced person.
It may also be illegal to make certain changes in some countries.
I chose the jiffy box using Jaycar.
I found one that fits the power supply.
This means that I have to remove the mesh cage and cut off some excess parts from the PSU to accommodate other electronic devices.
Before I do any cutting, I remove the entire PCB from the PSU.
When you open the PSU, you don\'t want metal scraps in the PSU, so make sure they are all cleaned up before you put them back together.
I use it as little as I can as a radiator.
Once I have everything installed, I dig holes for all the plugs, stick everything in place, and then connect everything.
Make it easy to open.
That way, you can re-program and fix it effortlessly if needed.
Now you can set everything up, program it for your console, and then sit down and watch the show.
After initially testing everything was OK, I placed the devices all white for 3 hours, constantly checking the housing temperature.
They were never too hot. . .
About 50 C with 25-30C ambient.
This is good because all components can be handled above 85 °c.
This is great because I don\'t want to add a radiator or fan.
This dense 3 hour white caused a problem.
When I change the color to blue or red, one of the units has a random flashing/strophobic on output 4 and 5.
Since both outputs are on the same shift register, I started to troubleshoot.
I think this will be a dry solder joint on the register.
Instead of doing a full check, I simply re-check
Weld the two registers and run the test again.
This solves the problem as expected.
I \'ve been using 4 of these units for the last few weeks to control 17 led bars without any further issues.
Make the pcb larger so that the socket can be installed better.
To make sure everything is OK, I will also print it fully before sending out the manufacturing.
Add a fuse for each output.
I stupidly cut off a strap while plugged in and driving.
This blew up many transistors and some traces.
This shows that it is likely to destroy the output if there are any shorts.
Use all SMD components (except crystal). I used through-
Because I already have it in stock, but smd looks better. Use a through-
Easier to weld hole crystals.
Consider adding RDM support, dip switch or screen/button for address and feature changes.
I ignored these for simplicity, cost, and the need to change addresses frequently (
Maybe once a year).
Scrapped multi-color status LED.
I ended up using only the standard LED so it was a waste of space.
I will also add a title for it so it can be installed on the box.
Add a random pass function.
This is in the software so I can still implement this.
I would use random cycles between bursts, but for the same duration.
Custom message
Chat Online 编辑模式下无法使用
Chat Online inputting...