is easy so I'll try this: control the RGB with three PWM pins (have current-limiting resistor of at least 150ohm). One pot controlling all three colors may be difficult so may one for each prime color, on 3 analog inputs.
you may need a relay or MOSFET to switch the laser depending on it's power requirement. I suppose it's a diode laser like those found in a laser pointer. You can use one digital pin to control it.
that may require some external power supply. I'm not familiar with this but I suppose you need a relay or MOSFET to control the charging and or firing the flash.
For the coding, since you have several things going on you probably won't be able to use Delay() since that freezes the entire program, so make sure you are familiar with the 'blink without delay' example so that you can use variables for the timing based off of Millis()
Yep, that example will tell you how to properly delay. I really don't like the name "blink without delay". It sounds to me like blinking rapidly with no delay in between.
Also, if I need a bunch of RGB LEDs running together (10+), will I need a resistor for each of them?
A relay has mechanical contacts, it makes clicking sound when making contact. It's more than you need for a small laser. I would use MOSFET, which has no mechanical part. It's just like a couple of fingers squeezing your electrical wire, making conduction impossible when you apply voltage. Also there's the opposite sense when you apply voltage you widen the wire to conduct.
someone commented about the laser that it does fine with as low as 4 volts, so you might be able to power it directly off a digital pin, treating it like an led without a resistor.
That is a real concern. One student collapsed in a class room due to a different reason but we canceled strobe light demonstration to an event from the same concerns. The flashing of light is at times irritating. Different people respond differently.
AWOL what is the legislation? I looked into it and as far as i found out there was only guild-lines in the UK anyway. The US has law's about strobe lighting but i didn't think we did in the UK just guide lines.
[quote author=Big Oil link=topic=58696.msg422681#msg422681 date=1303065702]
someone commented about the laser that it does fine with as low as 4 volts, so you might be able to power it directly off a digital pin, treating it like an led without a resistor.
It's worth noting that this laser WILL die at just over 5v. Watch out for this and do your best to avoid anything that might bring it too high.
[/quote]
I think I'll run it off the digital pin as recommended... safer that way!
If you want to drop voltage applied to the laser just a bit, you could add a diode in series with the laser, which might be a diode itself. A 1N4001 or something like that could probably handle it.
liudr:
If you want to drop voltage applied to the laser just a bit, you could add a diode in series with the laser, which might be a diode itself. A 1N4001 or something like that could probably handle it.
Thanks. Is it important that the diode goes before the laser?
So my question... When the wizard asks me for the forward voltage, the spec of the LEDs list different voltages for each colour. Using the 2.2V (Red value) gives me one answer for the type of resistor (22 ohms) and using the 3.5V figure (for Green or Blue) tells me to use 56 ohm resistors...
Or do I need 3 resistors for each LED and so 2 will be 56ohm and 1 will be 22ohm ?
Wow, you must have put 150mA for red LED, to get 22 Ohm. That's very large current. You can't use your Arduino pins to directly power that LED unless you can drop down the current to 20mA (max rating is 40mA). This means 150 Ohm. The microcontroller chip can only provide a maximal of 200mA through all its pins so you don't get to power lots of RGB LEDs from directly hooking them up to arduino pins. To use that much current (150mA), you need a transistor to drive the LED. Then your Arduino board can only provide 500mA so to run 150mA per color and a number of RGB LEDs, you need external power.
Yes I think I have realised I need to use an external power source to run all the components that I have listed in my original post.... There will be 20 LEDs at least....
Did I make a mistake in the calculator though to get 22 ohms?