Dear DAVID Community,

In 2016, DAVID and this forum have been integrated into HP Inc.
This forum has been read-only since then, and will be switched off by the end of 2019.

To everyone who has contributed here, we thank you for all your work and for the constructive, helpful and friendly atmosphere you have created!
Please continue to discuss on the HP Support Forums.

Electronics advice

Electronics advice

Postby pottersfriend » Thu May 27, 2010 3:33 am

I have a question for the electronic experts out there. I am trying to switch my laser (same as the green laser sold in the David store) on/off using an Arduino and I was wondering what MOSFET I should use. I'll be using the 5V out from the Arduino connected via 3 IN4004 diodes to get the voltage down but I am wondering what MOSFET to use. The local RadioShack only had the IRF510, and I also have an IRF520N salvaged from some other electronics. Would either of these work or do I need the IRF540? I will also be using a 1K ohm resister between the MOSFET and the Arduino control output pin.

I am an inexperienced electronics person so I got the starting point from Bongobat and the Open Hardware diagram so I don't know enough of the MOSFET spec sheets to know what to use, so any info you can give would be great.

Thanks and I hope I was clear,
Darin
pottersfriend
 
Posts: 153
Joined: Wed Jun 03, 2009 1:49 am
Location: Washington State, USA

Re: Electronics advice

Postby Francois » Thu May 27, 2010 6:04 am

Hi,

pottersfriend wrote:I have a question for the electronic experts out there. I am trying to switch my laser (same as the green laser sold in the David store) on/off using an Arduino and I was wondering what MOSFET I should use. ...


See http://www.david-laserscanner.com/forum/viewtopic.php?p=5505#p5505
Francois
 
Posts: 60
Joined: Sun Feb 14, 2010 6:09 pm

Re: Electronics advice

Postby WalterMo » Thu May 27, 2010 6:49 am

Hi Darin,
Yes you can use the IRF510. Fig 3 of its diagram shows a Drain current Id of 0.4A for a Gate-Source voltage of 4.5V. The IRF510 is able to switch a current of max. 5.6A, but only if its Gate-Source voltage is at about 7.4V:
http://www.datasheetcatalog.com/datashe ... F510.shtml
And then download the datasheet from International Rectifier.

The Arduino's output voltage should be about 4.5V.

Gunter has created an Open Hardware Project and he has used two BS170 MOS Fets in parallel to switch the laser. Two, because not to lose too much of some hundreds of millivolts at their internal Drain-Source resistor:
http://www.david-laserscanner.com/wiki/ ... re_project

The BS170 is a low power MOS Fet and doesn't need a high Gate-Source voltage. And you see that Gunter has used an IRF540 to switch a high power LED for the illumination.
But in your case one BS170 would be sufficient. There is no need to save each millivolt. Anyway you are using three 1N4004 to deduct 2.1V.

Walter

P.S. Now I see that Francois has already answered in the meantime when I was writing. I am not so fast in the early morning. :wink:

Edit: I have measured the output voltage of the Arduino, it is 5V without any load. The Gate of an MOSFet is a capacitive load which will be infinitely high when the capacitance is charged after some microseconds. Therefore we can say that the Gate-Source voltage of the IRF510 is 5V. Under this assumption the IRF510 can switch 10^0 = 1Amp.
User avatar
WalterMo
Moderator
 
Posts: 2363
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Electronics advice

Postby pottersfriend » Thu May 27, 2010 7:16 pm

Thank you both for the help and all the information.

I have hooked up a cheap level type laser to the IRF510 and it seems to work just fine. Next to try it with my green laser.

Thanks again for all the help.
Darin
pottersfriend
 
Posts: 153
Joined: Wed Jun 03, 2009 1:49 am
Location: Washington State, USA

Re: Electronics advice

Postby milz » Fri May 28, 2010 1:38 am

hello

i use a digital pin from arduino to power up the laser.
I have connected the (-) from the laser to arduino
ground and the (+) with a 50Ohm Resistor to a digital Pin.
I power the arduino via USB + 9V from a external power supply.
Is this a bad way to connected the laser ?

mfg milz
Xeon x5650@4ghz
Cam : USB2 CCD 1024x768 / USB3 1280x900
Laser : LC532-5-3-F(16x65) Focusable Green
Projector Acer X110P / Acer K132
dControl one David control box + Turntable + automatic texture lights
mooooom bathroom!!!!!!
User avatar
milz
 
Posts: 520
Joined: Wed Jul 15, 2009 12:24 pm
Location: Germany Cologne

Re: Electronics advice

Postby WalterMo » Fri May 28, 2010 9:06 am

Hello Milz,
Yes, it is a bad way to supply a laser directly from an output pin of the Arduino. A LED can be driven directly over a resistor of about 100 Ohm. Its current is then about 20mA.
And about 20mA is the max. current which can be delivered from an output pin. But a laser needs more, my red 5 mW laser from the DAVID shop needs about 32 mA and the green one with the same output power 178 mA. Laser modules need a low impedance source and not one of 50 Ohm. Maybe your laser is undersupplied. :(
A hint for a nice book, written in German for electronic beginners who are working with the Arduino:
„Arduino, Physical Computing für Bastler, Designer & Geeks“.
I think this book is advisable.

Walter
User avatar
WalterMo
Moderator
 
Posts: 2363
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Electronics advice

Postby milz » Fri May 28, 2010 5:17 pm

WalterMo wrote:And about 20mA is the max. current which can be delivered from an output pin.
Walter


yeah you right but is 40mA per Pin and recommented 500mA max.
http://www.arduino.cc/en/Main/ArduinoBoardDiecimila

that can explain my problems with the default exposure from David -)
I readed that some mV can have an effect on the laser brightness.

My new ordered green laser which hopefull delivered next week have
300mA... damned -)
My external powersupply only have 1A my motor 460mA and the laser 300mA
the Arduino need 350 mA so i need a new powersupply too.

Thanks for the hint with the book. I have some electronics books but never
really used them and i must ask silly questions to you now .. thanks a lot :D

EDIT:
I found this 2 devices and think its excatly what i need
http://www.pollin.de/shop/dt/NTU5OTgxOT ... te_K1.html
http://www.pollin.de/shop/dt/NDc5OTgxOT ... usatz.html
alternate
http://www.arduino.cc/cgi-bin/yabb2/YaB ... 1170031658
http://www.flickr.com/photos/anachrocom ... 242387876/

The Pollin kit looks like the circut from the arduino playground.
The kits have nice circuit boards for easy use.


mfg milz
Xeon x5650@4ghz
Cam : USB2 CCD 1024x768 / USB3 1280x900
Laser : LC532-5-3-F(16x65) Focusable Green
Projector Acer X110P / Acer K132
dControl one David control box + Turntable + automatic texture lights
mooooom bathroom!!!!!!
User avatar
milz
 
Posts: 520
Joined: Wed Jul 15, 2009 12:24 pm
Location: Germany Cologne

Re: Electronics advice

Postby WalterMo » Sat May 29, 2010 8:05 pm

These are the measured output voltages at an Arduino pin:

Without a load = 5V
At a current of 8.4mA = 4.8 V
At a current of 33.6mA = 4.2V
At a current of 40mA = 4.0V
At a current of 45mA = 3.84V

You clearly can see that the output voltage is strongly load-depending.

Your red 5mW DealExtreme laser can be used from 3.5V....4.5V. And its current is about 32mA.
The used dropping resistor is 50 Ohm which caused a voltage drop of 50 x 0.032A = 1.6V.

4.3V (Arduino) – 1.6V = 2.7V. But the laser needs min. 3.5V!

Walter
User avatar
WalterMo
Moderator
 
Posts: 2363
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Electronics advice

Postby milz » Sun May 30, 2010 5:11 am

hello walter

thanks for the measurings.
My caluation is 5v-3,5V = 1,5V 1,5v/0.030A = 50Ohm and seems to be wrong ...
Im not sure about the electric charge (A) at the pins.
When i run the motor and the laser without a external powersupply
the laser blink/jitter in the rhytm of the motor coil movment.
Did the external powersupply stabilize the electric charge ?
Did you measure it with an external powersupply?
I will try to measure it under load soon.

I looked to the recommended book at Google Books
http://books.google.de/books?id=p6SIHZA ... &q&f=false
Think its more coding cookbook. My electric knowledge is a little bit rusty
but google/wiki & learnbydoing helps mostly -)
I like the kits from pollin because of the ready made circuit boards. (no cable spaghetti)
Hope they kits will work well. :roll:

mfg milz
Xeon x5650@4ghz
Cam : USB2 CCD 1024x768 / USB3 1280x900
Laser : LC532-5-3-F(16x65) Focusable Green
Projector Acer X110P / Acer K132
dControl one David control box + Turntable + automatic texture lights
mooooom bathroom!!!!!!
User avatar
milz
 
Posts: 520
Joined: Wed Jul 15, 2009 12:24 pm
Location: Germany Cologne

Re: Electronics advice

Postby WalterMo » Sun May 30, 2010 9:42 am

Hi,
Yes, I made the measurements with an external power supply:
viewtopic.php?p=9963#p9963

And it's „normal“ that the laser is blinking if its internal current controller hasn't a voltage reserve for stabilisation. Take the power for the laser from the 5V output pin of the Arduino (lower row, third pin from left) in series to a 1N4001 and switch it by a simple NPN transistor or the BS170. Don't take the 0V for the laser from a Ground somewhere. Use just the next Gnd pin right from the 5V pin. Often spikes are looped in by ground connections which are also used by other loads.

And separate the motor's power supply from the Arduino's.

Walter

Edit: If the 5V output of the Arduino is used for the red 5mW laser it is necessary to limit the external power supply to 9V. Otherwise the 5V stabilizer-IC on the board could be overheated!
User avatar
WalterMo
Moderator
 
Posts: 2363
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Electronics advice

Postby milz » Mon May 31, 2010 3:41 pm

heho

I forgot to say that i use the adafruit motorshield. I use the free analog pins as digital pins and
the 5V and 9V from the motorshield not from the arduino.
I have set the jumper for external powersupply use at the motorshield.

WalterMo wrote:And it's „normal“ that the laser is blinking if its internal current controller hasn't a voltage reserve for stabilisation.

The max load for usb is 500mA. the arduino takes 170mA the motor 460mA. when i power it with an external
9V 1A powersupply to the Arduino and set the jumper on the adafruit motorshield for external power the blink is gone.
I have measured 22mA at the laser with 3,6V (motor is running).
I have 5,2V without load and 4,6V with motor and laser.

WalterMo wrote:Take the power for the laser from the 5V output pin of the Arduino (lower row, third pin from left) in series to a 1N4001 and switch it by a simple NPN transistor or the BS170. Don't take the 0V for the laser from a Ground somewhere. Use just the next Gnd pin right from the 5V pin. Often spikes are looped in by ground connections which are also used by other loads.

waiting for diodes from pollin -) i try to use a LM317 i got some from a old projects. very interesting. How can i see the spikes ... only with an oscilloscope ?

WalterMo wrote:And separate the motor's power supply from the Arduino's.

The adafruit motorshield has 2 pins to connecting the power for the motor.
Did you think its better to use this input as the external input from the arduino
and power up the arduino only with usb?
Can i use one external power supply to power up the motor (adafruit motorshield)
and at the same wire power up the circut for the laser with a stabilazer and step down?

thanks in advance
mfg milz
Xeon x5650@4ghz
Cam : USB2 CCD 1024x768 / USB3 1280x900
Laser : LC532-5-3-F(16x65) Focusable Green
Projector Acer X110P / Acer K132
dControl one David control box + Turntable + automatic texture lights
mooooom bathroom!!!!!!
User avatar
milz
 
Posts: 520
Joined: Wed Jul 15, 2009 12:24 pm
Location: Germany Cologne

Re: Electronics advice

Postby WalterMo » Tue Jun 01, 2010 8:30 pm

Sorry for the delay, but first I had to inform me about the Adafruit Motor shield. I have never used it before.
I found these informative sites:
http://www.ladyada.net/make/mshield/index.html
and:
http://www.ladyada.net/make/mshield/solder.html
and:
http://www.ladyada.net/make/mshield/use.html

And now I know what jumper you are speaking of.
I would suggest:
Power the motor by the 2 screw pins on the Adafruit board and don't plug the PWR jumper on this board. But don't alternate + and -. There is no diode for protection built-in!

Supply the Arduino via the USB cable. In this case (combination) there is no voltage at the 9V pin on the Adafruit board. But 5V at the 5V pin.
The DealExtreme laser can be supplied and switched by a transistor from this 5V pin with a 1N4001 in series.

For a green laser, which needs a much higher current, it should be better to supply it from the external 9V power supply (the same as for the motor). The LM317 with a heatsink will be fine for the right voltage stabilisation. Some ceramic 0.1µF capacitors around the LM317 are necessary to suppress spikes.
Regarding spikes: Yes, they are only visible with an oscilloscope. Best with a fast digital one.

Walter

P.S. All these suggestions are of course (as always) without any garantee. :wink:
Pollin is known for cheap items, but Conrad is very much faster in shipping. For me Conrad is only 15 bicycle-minutes away from home. :)
User avatar
WalterMo
Moderator
 
Posts: 2363
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Electronics advice

Postby milz » Wed Jun 02, 2010 9:27 pm

Hello Walter

thx for your input -)
Sorry for the confusion with the motorshield i thought you have written in a other thread
about it.
The adafruit motorshield is nice cause you can run all types of motor.
Pollin is slow but cheap. I have paid 6 Euro for the relay and power reducer circuit.
It not much more then the single parts price and i have a circuit board. :D

mfg milz
Xeon x5650@4ghz
Cam : USB2 CCD 1024x768 / USB3 1280x900
Laser : LC532-5-3-F(16x65) Focusable Green
Projector Acer X110P / Acer K132
dControl one David control box + Turntable + automatic texture lights
mooooom bathroom!!!!!!
User avatar
milz
 
Posts: 520
Joined: Wed Jul 15, 2009 12:24 pm
Location: Germany Cologne

Re: Electronics advice

Postby WalterMo » Thu Jun 03, 2010 12:38 pm

Hello Milz,
I knew the Adafruit board but have never used it. Now I know more about it. :)

I prefer this motor driver:
http://cgi.ebay.de/ws/eBayISAPI.dll?Vie ... 0577779757

It's more robust than the EasyDriver, has much more power and is easy to cool.

Walter
User avatar
WalterMo
Moderator
 
Posts: 2363
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Electronics advice

Postby Jacqueline11 » Wed Dec 29, 2010 9:12 am

Awesome!! It’s just what I need!! Thanks!.........

6 ave electronics
Jacqueline11
 
Posts: 1
Joined: Wed Dec 29, 2010 9:02 am

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest

cron