I am quite new to the Arduino business and up until now managed to create a Hexapod robot from a kit based on the Arduino Mega 2560, add Computer Vision and let him crawl around to find target objects. Now I want to destroy the target (in this case... Clover). So I just bought a laser diode with 200mW optical power, 3-5V input voltage and the additional info "<300mA" current (which would mean an overall consumption of 900mW at 3V?). It has its own build in current regulator as it seems. The robot is powered by 2x3,7V in series (=7,4V) batteries. Assuming I measured the actual power consumption and total current of the laser, I have trouble determining:
- which transistor to use for switching the laser with an Arduino pin (40mA max current)
- how to regulate the Collector voltage to 5V from the 7,4V source
I understand that I first have to measure the current of the laser to determine the Ic for the transistor. After that, I select the transistor and calcuate the needed Ib (<40mA). The result would be the right Base resistor put between the Pin and the Base. If this is the right way to do it, switching is now possible. Now the laser power suplly: - Should I use a voltage regulator for 5V output? I am not realy familiar how these parts work. Do I only select one which has an input voltage rating around 7,4V, outputs 5V and is sufficient for the desired Ic current? Do I need a heat sink?
If the voltage redulator is the right choice, I would
- connect 7,4V to the Input of the regulator
- connect GND to GND of the regulator
- connect Output of the regulator to the laser Input
- connect the Output of the laser to the collector of the transistor
- the emitter of the transistor will connect to GND again
Is this the right way? How do I calculate the resistor, transistor and regulator rating right for the expected voltage decrease when the batteries run low over time? As I understand it, Ib will decrease and so will Ic. I should calcuate Ib in reference to Ic, so that Ic is >= the laser current drain even on 6,5V power supply and pin voltage of what? 4,5V?
Thank you in advance for your help! Regards Sebastian