Show Posts
Pages: 1 2 [3] 4 5 ... 43
31  Using Arduino / General Electronics / Re: About the article "10 Ways to Destroy an Arduino" on: October 31, 2012, 11:52:27 am
Among the 10 pitfalls mentioned, there is one bordered me, i.e. Method #10.  It says lighting up 10 LEDs will damage the board.  What should I do if I really have to light up 10 LEDs with individual control?

The reason #10 can damage the Arduino IC is that in addition to the maximum current each I/O pin can supply, each bank of I/O pins also has a maximum current that is significantly lower than then the total would be if all the pins in that bank were supplying near their maximum current.

The way you avoid the problem with a normal UNO would be to have a separate power supply for the LEDs, and then have each LED control pin connected to a low-side transistor switch that will turn the power to a particular LED on or off based on the state of that pin.
32  Using Arduino / Project Guidance / Re: Driving a 0-10vDC signal control valve on: October 31, 2012, 11:41:34 am
I think I may have left a vital piece of information out.

The valve is 24vAC powered.  The 0-10v is just a signal, I don't think the current draw is very high...

The 0-10v input expects to see a DC input not a DC PWM.  So I can't just give it a 0-10v PWM signal.

Well there's always the possibility to use some sort of DAC (digital to analog converter).  You'd be looking for one that will accept 5 V logic level inputs (something that mentions the input(s) being "CMOS" or "DTL" compatible will usually work).  On many DAC's the output range is set by the difference in voltage between two supply pins (often named something similar to "V+" or "VCC" and "V-" or "VEE", respectively) and a supply range of > 10 VDC (i.e. the higher voltage being 10 VDC or more above the lower) is fairly common.  Since this is just a control signal you won't a need high current on the output either, so if the ICs are listed by maximum power dissipation (this will be the power the chip takes to run plus the power of the output signal) you wouldn't need more than a few hundred mW. 

However, another consideration will be how the Arduino interfaces with the DAC.  A fast and often cheaper way to interface would be in parallel, but you'd need a pin for each bit of the resolution (i.e. 8-bit resolution requires 8 pins) and while you might not need anything more than 8 to 10 bits that's ties up a big chunk of your Arduino's I/O if done in parallel.  There are also DACs that can receive the digital signal serially, either on a very simple two wire bus (one for the signal and one for the Arduino's clock) or using one of the standard bus protocols like SPI or I2C.

Either way this will likely be somewhat more expensive (for low volume orders)than the other options suggested.  While some DACs can get around $50.00 each , the ones you'd be using would be more like a few dollars a piece.  Still that could be more for a single component than the total component cost for other options.  Here's an example of one of the more inexpensive 8-bit DACs you could use (at least in a through-hole package), on Digikey it's ~$1.60 a piece, but notice it requires parallel input for the digital signal.
33  Using Arduino / Project Guidance / Re: ATtiny in a bottle on: October 30, 2012, 10:03:00 am
Well then I guess this project should probably use a relatively thick-walled glass bottle or jar, especially non-colored glass.  While there is still an issue of some creature accidentally eating it, a glass vessel if broken up would eventually be turned into small pieces of glass.  Common non-colored glass is almost three quarters silica (SiO2), similar to a lot of the natural sands, along with some sodium oxide (Na2O) and lime (CaO).  So even though it probably won't break chemically, if it does there's nothing involved that would be innately poisonous in small amounts.  Also unlike polymers, even small piece of glass wouldn't stay suspended in the water column indefinitely.  Instead it will act much like small rocks or sand, depending upon the size.

I'm certainly not in favor of adding to the oceanic pollution problem, but if this device is never found again it looks like a glass container would pose less long-term problems than a plastic one.  Of course that's not taking into account whatever is inside the container...
34  Using Arduino / General Electronics / Re: Switching to lead-free soldering on: October 29, 2012, 09:54:59 am
Lead free solder can be much harder to use, but the exact metallurgical formulation can make a significant difference in how the solder behaves.  In my experience, the more inexpensive tin-copper lead-free alloys can be problematic, so for a two metal alloy tin-silver is usually preferable.  I've also found some of three (like Sn 96.5%, Ag %3.0, Cu %0.5) or four (like Sn 96.35% , Ag 3.0% , Cu 0.5%, Sb 0.15%) metal alloys, have a better performance as a general purpose solder.  However, they are usually almost three times the price of tin-copper.
35  Using Arduino / Project Guidance / Re: ATtiny in a bottle on: October 29, 2012, 09:01:45 am
As he mentions you could run an ATTiny for a year on a couple AA batteries (2200mah batteries / .2ma = 458 days) and even the smallest solar cell would power it "forever".  Not sure how you get a solar cell in a bottle though smiley-wink

Roll it up and stick it down the neck...

Or simply use a wide mouth PET plastic jar as show in my concept jpg linked to above.  That would make the unit very easy to build as it provides easy access to the interior of the seagoing vessel.

Well sure if you want to do things the easy way...smiley-wink
36  Using Arduino / Motors, Mechanics, and Power / Re: Using DC adaptor and USB cable as power supply ? on: October 29, 2012, 08:57:57 am
A common diode, like a 1N4001, would work.  However, it will have a forward voltage drop of over 1 VDC so you'd have to deduct that from the actual voltage the Arduino (the actual drop will depend on current going through the diode, refer to the forward voltage drop vs. forward current graphs in the datasheets).  A Schottky diode, like a 1N5819, also has a forward voltage drop but it would be much less, even at the higher current your motors would draw.
37  Using Arduino / Microcontrollers / Re: Arduino at freezing temperatures on: October 26, 2012, 04:52:21 pm
Desiccant packs can also help.
38  Products / Arduino Due / Re: Current from I/O PIN on: October 26, 2012, 04:29:06 pm
The whole point of a BJT is that it is driven by current, not voltage. That current might be small but it is current never the less because it is current that makes the transistor work. FETs on the other hand are voltage devices and draw negligible current apart from the initial charging of the gate source capacitance.
I never stated that a BJT could work without current!  I originally recommended using FETs over on the 3 mA pins because I know the difference on how they operate. 

Lets look at each in turn:-
1) Common emitter - the normal way I would recommend, base current determines collector current

2) Common base - note the page says this is not suitable for a TTL voltage buffer, it has a low gain and typically I use this for video coupling.

3) Common collector better known as an emitter follower. - This has no voltage gain but a current gain, you do not need a base resistor because of the feedback on the emitter keeping the emitter / base voltage stable. However this is 0.7V so this means when you use it as a voltage buffer you loose 0.7V. Used with the Due that will reduce the voltage output from 3V3 to 2.6V. When lighting an LED this will not be high enough for blue and white LEDs although it is enough for red and green. Again I would not recommend this due to the voltage drop that it produces.

Although you are correct that I should have stated, "common emitter" and not "common collector".  I... wasn't in a frame of mind conducive to self proof-reading when I wrote it.  I took your comment in a way you probably didn't mean, and furthermore let it irritate me more than I should have even if you did.  smiley-red   

Regardless, with NPN a common emitter circuit the voltage difference between the base and emitter will be the VIN.  Since VOUT can be expressed as follows VOUT = AV * VIN; how is VIN not effectively controlling VOUT?  Yes, I intentionally didn't mention that the current will be amplified as well and that is fundamental to the operation of the BJT.  However, in my mind at least, it wasn't necessary because the maximum current is so low and all the pins except DAC0 and DAC1 are either outputting digital or PWM signals. So it's just easier when biasing the circuit to concentrate on the voltage, either setting it up to be an actual voltage amplifier or a switch, and only address the current in the context of ensuring it doesn't go above 3 mA.
39  Using Arduino / Project Guidance / Re: ATtiny in a bottle on: October 26, 2012, 02:46:52 pm
As he mentions you could run an ATTiny for a year on a couple AA batteries (2200mah batteries / .2ma = 458 days) and even the smallest solar cell would power it "forever".  Not sure how you get a solar cell in a bottle though smiley-wink

Roll it up and stick it down the neck...
40  Products / Arduino Due / Re: Current from I/O PIN on: October 26, 2012, 12:21:14 pm
Quote
but you'd have to make sure the BJT is biased so it is controlled by its base-emitter voltage, and not the base-emitter current
So do we ensure this by rewriting physics?

Two words: "Voltage buffers".  In that type of circuit the current (while still necessary to operate the BJT) can be set arbitrarily to a fairly small level and VIN determines VOUT. Unless you think a NPN common collector circuit requires non-standard physics... smiley-razz

Edit: Perhaps I overstated things a little by using the words "have to" instead of "should, and Grumpy_Mike is certainly correct that 3 mA can control a current hundreds of times larger.  However, it is entirely possible to use a BJT so that one voltage controls another without violating the known laws of physics!
41  Using Arduino / Programming Questions / Re: User interface query! on: October 26, 2012, 11:30:28 am
Thanks for your input guys -  far-seeker, are you saying that I can only have a proper question-based user interface if I create a separate application using another IDE?

No, I was just making the distinction that what karlok originally suggested was along those lines. 

If you want to use the Arduino IDE's built-in serial monitor than the link I provided and karlok's latest reply should help you do that.
42  Using Arduino / Microcontrollers / Re: Arduinos original PWM on: October 26, 2012, 11:22:09 am
Actually, it's a common Radio-control hack to use a motor as an audio transducer.  By feeding in a signal at audio frequencies that doesn't actually move the motor, you can vibrate the armature and/or windings enough to generate a clearly audiable tone.

Hmm, I knew that there are ways to vibrate an electric motor's armature without causing it to rotate, but I didn't know a generic DC motor could generate a sufficiently loud sound this way (at least not without possibly damaging the motor).  Nor did I realize that people would do such a thing on purpose. smiley  I've heard "music" made by steppers or old floppy disk drive motors but to the best of my knowledge those examples always involved rotating motors.

In any case, I didn't mean to imply that 500 Hz was below the range of human hearing.  I was trying to make a general statement that to get the exact PWM as a tone there needs to be a proper audio transducer.  Apparently a non-rotating DC motor can be such a transducer.
43  Using Arduino / Programming Questions / Re: User interface query! on: October 26, 2012, 10:58:48 am
The links karlok provided address creating a separate user interface application with C/C++.  On the other hand, if you just want to use the Arduino IDE's serial monitor for two-way serial communication here's a simple tutorial to get you started.
44  Using Arduino / General Electronics / Re: built these optocoupled circuits to drive a 12v light from arduino uno on: October 26, 2012, 10:52:31 am
just a quick comment.

Its not the best use of an NPN transistor I've seen.  There is probably a better way.

There aren't any NPN BJTs in those circuits, moncureww is using a N channel MOSFET.
45  Products / Arduino Due / Re: Current from I/O PIN on: October 26, 2012, 09:51:18 am
Is required a particular bjt for example???
Arduino Du gives 3mA... If i use a classic 2N222?

For the pins that only output upto 3 mA I would use FETs (like MOSFETs) instead of BJTs.  This is because FETs are always controlled by voltage level, rather than current level, on their gate.  You could still use many BJTs, like the 2N2222, but you'd have to make sure the BJT is biased so it is controlled by its base-emitter voltage, and not the base-emitter current (which you'll have to limit to below 3 mA).
Pages: 1 2 [3] 4 5 ... 43