Show Posts
Pages: 1 ... 32 33 [34] 35 36 ... 91
496  Using Arduino / General Electronics / Re: 12V to 5V, no caps? on: July 11, 2013, 01:35:21 pm
Of course, you should follow the manufacturer's recommendations...   Especially if you want the circuit to work relibably every time.

But, you can try it!    There is (probably) already a capacitor at the 12V output, and (probably) 5V bypass capacitors on your ATmega circuit.     There is a chance that some 7805 devices will work without the capacitors.    So, maybe the one 7805 you have will be OK?   I have no idea what your odds are...  It's up to you if you feel it's worth risking it.

But, you could also end-up in a situation where it works on the breaboard/prototype, but not in the final design... 
497  Using Arduino / General Electronics / Re: Schematic Help on: July 11, 2013, 01:23:47 pm
I don't know what the parts are on the schematic from the phone connection to the DAA. Its in the top right of this schematic:
F1 & F1 are fuses.  The S05K230 is a varistor, which is an over-voltage protection device.   If you get a voltage spike the varistor starts conducting to short-out the voltage, and if there is enough current available, the fuses will blow, protecting both the varistor and the circuit..

On the 120VAC should I be using 1/2 watt resistors?
One way to calculate power is: Voltage squared/resistance 120*120/33,000 = 0.436 Watts.     Since current only flows during the positive half-cycle, you'll dissipate half that.    There is a rule-of-thumb with resistors to use a power rating of double (at least) the actual power, so 1/2W is good.

On the TRIAC side, you won't have much current flowing into the TRIACs gate, so any size resistors should be OK.   (It wouldn't hurt if you want to use 1/2 Watt there too). I built a opto-isolated TRIAC driver recently, and it worked with 1/8th Watt resistors.   But, I first tried wiring them directly in-line and the small resistor leads were mechanically too flimsy...  I re-built the circuit on a perfboard and switched to 1/4 W resistors.

498  Using Arduino / Project Guidance / Re: Transistor Fet Irf 3205 for dc motors in an arduino mega? on: July 11, 2013, 12:27:29 pm
I`ve found here this Transistor Fet Irf 3205, is that a good choice in my case?
You need a "logic"  MOSFET that can be switched on/off from 5V.     I think that MOSFET requires more gate voltage.  Hopefuly someone will double-check that...

The other spec you need to look at is current capability.   You didn't say how much current your 6V motors require, but, the IRF3205 can handle quite a bit of current and that shoudn't be an issue.  (You do need to leave some safety margin, so don't get a "little" MOSFET.   (The 6V motor voltage won't be an issue with any MOSFET.) 

i`ve found that using a MOSFET transistor -instead of the motor shield- is the best way, because it doesn`t suck that much energy.
The motor shield itself shouldn't be using much energy.  Like the MOSFET, it should just be switching on & off and virtually all of the power should be "consumed" in the motor.  Any wasted energy is converted to heat, so if the motor shield isn't over-heating, no energy is lost there...
499  Using Arduino / Project Guidance / Re: Recalibration of Anolog input on: July 11, 2013, 12:12:17 pm
I am trying to get a reading from a potentiometer(0-5000) on the serial monitor and then be able to zero and recalibrate at different points with an IR remote at different points(say the value is 2000,

1. You can't get 2000 from the analog-to-digital converter.   It goes 0-1023.
2. Check your map function..  Your map() function maps zero to zero.

Maybe you want another map() function to map from 0-5000 to 2000- ...something???  Or, to re-map your orginal values from 0-1023 values to 2000- ....something.
500  Using Arduino / Project Guidance / Re: car fuel gauge - reading and smoothing on: July 10, 2013, 06:29:51 pm
My question though is - would it be smarter to "sanity" check the reading first and make sure it is not too far from the moving average before committing it to array ?

Something along the lines of checking if it deviated more than 10% from the running average then throw it away ?
I'd say that's fine.   You know that some readings can't be real, and you know that the amount of gas in the tank never increases for no reason. 

I'd say it makes more sense to completely throw-out erroneous data than to dilute it with more readings.    (If you are doing statistical analysis, you have to be very careful about throwing-out data.   But in this situation, it's OK.)

by taking a reading every 100 milliseconds and using something like this example
Taking more time between readings will also slow-down your display-updates, and make it look smoother.   Maybe several seconds between readings.   (I do some stuff with audio where I take a reading once per second into a 20 element array for a 20 second moving average.)

501  Using Arduino / General Electronics / Re: Purpose of Resistor on the Gate of a FET? on: July 10, 2013, 06:18:54 pm
For the hobbyist, a 1/1000 chance of failure probably seems pretty insignificant.
I agree...  If you want to pull 41 or 45mA from a pin, your are exceeding the specs but it's probably OK as a hobbyist...   Worst case, you fry a chip/board.    I'm sure there are some ATmega chips that will work "forever" at 45mA.   But if one does fail, you can't complain. smiley-wink

On the other hand, you should have a really good reason for exceeding the limits.  And you need to understand and accept the costs assosicated with the risk.    (And sometimes it's not just the cost of the parts...  i.e. You don't want your device to fail at a bad time when you really need it.)

But, part of that problem is we don't know what the odds are...      Is there a 1/1000 chance?   1/100?   Maybe it's never going to fail?  Or, maybe there is a 100% chance of falure within the 1st minute or the 1st month.     

Usually when you take a risk, you'd like to know the odds and as well as the cost of the loss...  Sometimes the odds of "loosiing" are very-very small, but the downside cost its too high.   (A bet that's in your favor at $10 is ususally worth taking...  The same bet at $1 Million is not, unless you have an "extra" million laying around.)
502  Using Arduino / Project Guidance / Re: audio from bent circuits on: July 10, 2013, 02:18:22 pm
Could I use an LM317 regulator for each board to deliver precise voltage?
Yes.   If you don't have a multimeter, I suggest you get one to confirm the voltage before connecting the audio circuit.

Are transistors necessary?
No.   The LM317 can put-out something like 1 Amp, which is more than you'll be "pulling" from a typical small battery in a toy.   (I don't ahve the spec sheet in front of me, but it depends on the voltage "dropped across" it and heatsinking, etc.)

Can the output of the boards be wired to a single amplifier circuit?
No!!!   The general rule is that it's OK to connect two or more inputs together (such as connecting multiple amplifiers), but you should NEVER connect outputs together.   

For audio applications, you need a "mixer".  In this situation, you can make a passive mixer with some equal-value resistors (1k to 10k should work).    Connect a resistor to each output, and connect the other ends of all resistors together and to the amplifier input.     With a passive/resistive mixer, there will be signal loss.  If this is a problem, you can build a summing amplifier with an op-amp.
503  Using Arduino / Project Guidance / Re: Arduino receiving external TTL on: July 10, 2013, 01:49:41 pm
Yes.  Any of the digital inputs will read a TTL  high (nominally 5V) as high, and a TTL low (nominally 0V) as low.  And yes, you can write a sketch to count the pulses (rising or falling edges, etc) an ignore the first 199 pulses.

But, I have a feeling there is more to your data than reading the 200th pulse...    Is it formatted as RS-232, or something like that?
504  Using Arduino / General Electronics / Re: Relays not resetting on: July 09, 2013, 06:44:54 pm
Most AC solid state relays use a TRIAC.   One characteristic of TRIACS is that once they turn-on they won't turn-off 'till the current goes to zero.   Since AC goes-through zero twice per cycle, this is not a problem in most applications.

In fact light dimmers take advantage of the hold-on characteristic.   There are also AC solid-state relays that only turn-on at (actually slightly after) the zero-crossing.   These cannot be used in dimming circuits.

An SCR is similar in that it doesn't turn off 'till the current drops to zero, but SCRs (like transistors & MOSFETs) only conduct in one direction, so they don't work on AC (unless you use a pair of them).   
505  Using Arduino / LEDs and Multiplexing / Re: newbie guestion 2 button+5 led on: July 09, 2013, 06:30:22 pm
I suggest you start with This Example, which is one button and one LED.

Add another button and another LED.

Then start modifying the sketch.   Do NOT try to write your whole sketch all at once!   Add one or two lines of code at a time, testing and de-bugging as you go.   (I've been programming for several years, so I usually write more than one line at a time, but I never write the whole program at once...  Always in little "parts".)

Start by making the 2nd switch control the 1st LED.   Then make a small change to make the 2nd switch control the 2nd LED.

Add more LEDs and test them one at a time.    Keep it simple...  Make the LEDs count/sequence automatically without pushing any buttons.    First, make it count-up, then add the code to count-down.

Then add the code to make the count-up switch work, then the count-down switch.

Programming is not easy!    The most important concepts are conditional execution (if-statements, etc.) and looping (doing things over-and-over).  But there are LOTS of details, and your syntax has to be perfect...
506  Using Arduino / Project Guidance / Re: speedometer on: July 09, 2013, 03:56:31 pm
That should be possible.

There is an LCD Library, although if you use a different LCD you may have to interface it differently.

There are timing functions (millis() & micros()), so if you know how many pulses you get from your encoder over a known distance you can count the pulses per second (or over some other time period) and calculate speed.    You could also write a calibration sketch that counts the pulses over a pre-measured distance.
507  Using Arduino / Programming Questions / Re: Random pointless box coding on: July 08, 2013, 05:01:49 pm
Try something like this:
switch (randNum)
    case 1:
      random1();   //Call random1 function when randNum = 1
    case 2:
      random2();   //Call random2 function when randNum = 2
       random10();   //Call random10 function when randNum doesn't match anything else
       // default is optional

In this application switch/case is a better solution, but also take a look at if-statements.    Beginning programmers usually learn conditional execution with if-statements and if/else statements before learning switch/case, and you should understand both.

508  Using Arduino / Project Guidance / Re: snake tank controller - how to increase humidity automatically on: July 08, 2013, 03:32:01 pm
I've never had a terrarium, but you could also try an ultrasonic mister, which requires DC power but no water pressure.     And, it might be a cool visual effect!

The mist comes-out cold, and the droplets are probably too big to directly create humidity, so you'd probably need the screen (or a cloth or sponge or something) to get the evaporation needed to increase humidity.
509  Using Arduino / General Electronics / Re: Power supply questions on: July 08, 2013, 02:32:05 pm
The capacitors filter-out noise and prevent the regulator from potentially oscillating.  The datasheet for the regulator (which I have not studied) should give you some recommended application schematics and maybe a bit more information.

Is C2 for the same purpose? And why isn't this one a polarized cap ?
Polarized capacitors (electrolytic and tantalum) tend to not "act like" capacitors at very-high frequencies.  Since oscillation and noise can occur at very high frequencies, a non-polarized (typically ceramic) is often used in parallel.

But why is there no C2 here ?
I don't know...  Many times, a circuit will work just fine without the capacitors...  You can probably remove several bypass caps on your computer motherboard with no ill-effect.    But to make sure every-board works every-time, it's good-practice to use them wherever recommended by the chip manufacturer.   
510  Using Arduino / Project Guidance / Re: automate the mechanical for midi files on: July 08, 2013, 02:16:13 pm
I've never done anything like that, but it should be possible.   

Have you estimated the cost of 88 solenoids & the 88 associated driver circuits?   I'm pretty sure this is going to get expensive and you are going to end-up with something that has a resale value that's less than the cost.   (That's OK if don't intend to sell it, an the cost should be less than a modern MIDI/player piano.) 

Are you sure it needs to be wireless?    The solenoids will need a power source, so you'll either need a large battery, or you'll have to plug it into the wall.

Have you ever built a solenoid before?  Have you built one that can actuate a piano key?   It's not easy to build an efficient-powerful solenoid...

I'd say just build it one step at a time...   Build one solenoid actuator and trigger it with one Arduino output.   Build & test the MIDI interface/decoder.   Build & test the wireless interface.   Build the remaining actuators and put it all together...
Pages: 1 ... 32 33 [34] 35 36 ... 91