Show Posts
Pages: 1 ... 3 4 [5] 6 7
61  Using Arduino / General Electronics / Question about Leds and Resistors on: September 04, 2012, 03:30:37 pm
I know that each Led connected in parallel needs it's own Resistor (I don't understand why but I know it does) but what if only one of the Leds will turn on at a given time?

I am using a Shift Register that will send a byte with only one "1" in it, for example: "00100000" or "00000010"... etc, and each output of the Shift Register is connected to it's own Led, so I know only one of them will turn on at a given time.

Now that I think about it, it could happen that while I'm sending a new byte two "1" could appear temporarily, for example if I have "10000000" and want to send "00000001" those two "1" will be next to each other while sending the data, even if it's only a matter of micro seconds. Could that be a problem?

Can I use 1 Resistor for all 8 Leds given this case? What about any other case?

Thanks!!!!
62  Using Arduino / General Electronics / How much WATTS do I need? on: August 24, 2012, 03:00:35 pm
I want to get an amplified sound from a sound generator IC (AY-3-8910)
I plan to plug the output to a small 8ohm speaker (like the one on small toy keyboards)
How much power do I need? It's 1 Watt ok?

I see a lot of options in this page: http://www.electronics-for-fun.com/amplifierkits.html
63  Using Arduino / General Electronics / Re: About 74HC595 Shift Register on: August 16, 2012, 09:59:11 pm
Ok, so three pins is obligatory
Thanks!
64  Using Arduino / General Electronics / About 74HC595 Shift Register on: August 16, 2012, 05:22:59 pm
On a 74HC595 Shift Register is it mandatory to use the latchPin??
On the examples it says that you need to put it LOW so the output doesnt changes while you are sending info on it.

Code:
    // take the latchPin low so
    // the LEDs don't change while you're sending in bits:
    digitalWrite(latchPin, LOW);
    // shift out the bits:
    shiftOut(dataPin, clockPin, MSBFIRST, numberToDisplay); 

    //take the latch pin high so the LEDs will light up:
    digitalWrite(latchPin, HIGH);
but what if I don't care about sending gibberish until the last byte has been sent? Could I set the latch PIN on the Shift Reg to +5v so it is always receiving data? Would that work?
65  Using Arduino / General Electronics / Re: How to do a variable audio low-pass filter? on: August 14, 2012, 08:17:18 pm
Woa! that doesnt seems that easy.

I will try with a simple pot first and then I'll try that way.


Thanks!
66  Using Arduino / General Electronics / How to do a variable audio low-pass filter? on: August 14, 2012, 06:08:59 pm
I am designing a synth and want to add a low pass filter, I have advanced a lot in the programming but I really don't know that much about electronics.

I found this webpage about filters: http://www.electronics-tutorials.ws/filter/filter_2.html

Would that very simple lowpass filter work if I add it to the audio signal? And how can I variate the resistance value so the cutoff frequency can be changed?
A simple potentiometer with the right resistance will work, right? If I want to change the value inside Arduino programming I thought it can be done with a digital potentiometer, right? Any other way??

Thanks!
67  Using Arduino / Programming Questions / Re: don't understand float on: August 05, 2012, 04:02:25 pm
a little clarification, when I said
Quote
"convert lfoAmmount" to integer
I meant defining it as integer.

Now I tryed defining it float again and when running this:
Code:
pitch=(pitch+(getLfoValue(lfoType)/lfoMaxValue)*lfoAmmount/10));
it's working fine. So... it needs to be float??
68  Using Arduino / Programming Questions / don't understand float on: August 05, 2012, 03:57:48 pm
I was varying a float variable called "lfoAmmount", and this line worked fine:
Code:
pitch=(pitch+(getLfoValue(lfoType)/lfoMaxValue)*lfoAmmount);

pitch is also float and contained decimals.

I read that floats are a little heavy for proccesing, so I want now to convert "lfoAmmount" to integer, but when I run this line:
Code:
pitch=(pitch+(getLfoValue(lfoType)/lfoMaxValue)*float(lfoAmmount/10)));

Now pitch doesn't have any decimals.

Also I tryed doing this and it does the same:
Code:
pitch=(pitch+(getLfoValue(lfoType)/lfoMaxValue)*float(lfoAmmount/10)));

What's the problem?
69  Using Arduino / Project Guidance / Re: Help with multiplexer (74HC4051) on: August 04, 2012, 02:35:33 pm
Code:
OK, and you are actively driving the right pins LOW? Have you verified that all input selector pins show zero volts continuously?

I feel so stupid... The problem was that I didn't defined the selectorPins as output, so they were erratic...

Thank you so much you all!!!

EDIT: It's working perfectly!
70  Using Arduino / Project Guidance / Re: Help with multiplexer (74HC4051) on: August 04, 2012, 12:00:22 pm
I've noticed that using or not the multiplexer when I press any button connected on the board the reading gets a little higher, that might be interference with the board I'm using, is not really a problem at this point.

But the weird thing is that it seems that the multiplexer every time in a while changes the channel it's reading
71  Using Arduino / Project Guidance / Re: Help with multiplexer (74HC4051) on: August 04, 2012, 11:45:29 am
yes, I am using a pot like that.
It's working fine if it's connected directly to an Arduino pin
72  Using Arduino / Project Guidance / Re: Help with multiplexer (74HC4051) on: August 04, 2012, 11:38:49 am
I'm sorry but what do you mean when not actuated?

As a test I connected every input from the multiplexor to the ground except a potentiometer.

*When I select one of the ground channels (A1-A7) it gives a reading of 47-49 when the pot is at maximum or at minimum, it's affecting it very little to nothing.
*When I select the pot channel (A0) and set the pot to minimum it gives me this:
Code:
pitchRead: 47.00
pitchRead: 48.00
pitchRead: 48.00
pitchRead: 48.00
pitchRead: 49.00
pitchRead: 70.00
pitchRead: 73.00
pitchRead: 46.00
pitchRead: 46.00
pitchRead: 47.00
pitchRead: 53.00
pitchRead: 56.00
pitchRead: 47.00
pitchRead: 47.00
pitchRead: 47.00
pitchRead: 47.00
pitchRead: 47.00
pitchRead: 47.00
pitchRead: 47.00
pitchRead: 49.00
pitchRead: 71.00
pitchRead: 76.00
pitchRead: 50.00
pitchRead: 47.00
pitchRead: 47.00
pitchRead: 47.00
pitchRead: 80.00
pitchRead: 62.00
pitchRead: 47.00
pitchRead: 47.00
pitchRead: 47.00
pitchRead: 47.00
pitchRead: 48.00
pitchRead: 48.00

And when I spin the pot at maximum it gives me this:
Code:
pitchRead: 973.00
pitchRead: 974.00
pitchRead: 973.00
pitchRead: 974.00
pitchRead: 971.00
pitchRead: 965.00
pitchRead: 962.00
pitchRead: 46.00
pitchRead: 69.00
pitchRead: 54.00
pitchRead: 46.00
pitchRead: 46.00
pitchRead: 47.00
pitchRead: 47.00
pitchRead: 62.00
pitchRead: 969.00
pitchRead: 973.00
pitchRead: 974.00
pitchRead: 975.00
pitchRead: 975.00
pitchRead: 974.00
pitchRead: 975.00
pitchRead: 976.00
pitchRead: 964.00
pitchRead: 975.00
pitchRead: 974.00
pitchRead: 974.00
pitchRead: 974.00
pitchRead: 974.00
pitchRead: 973.00
pitchRead: 973.00
pitchRead: 974.00
pitchRead: 973.00
pitchRead: 973.00
pitchRead: 974.00
pitchRead: 974.00
pitchRead: 974.00
pitchRead: 973.00
pitchRead: 974.00
pitchRead: 47.00
pitchRead: 975.00
pitchRead: 974.00
pitchRead: 975.00
pitchRead: 974.00
pitchRead: 974.00
pitchRead: 974.00
pitchRead: 974.00

I am constantly selecting the cannel in the loop.
73  Using Arduino / Project Guidance / Re: Help with multiplexer (74HC4051) on: August 04, 2012, 11:13:50 am
Thanks all for the help!
But now I need more :-)

I am using the 74HC4051 multiplexor and I connected 3 buttons and 2 pots to it.
I am getting very erratic readings on the pots, it might be accurate enough to use it for buttons, but not for the pot.
For example, I select channel 0 (0,0,0) for reading A0 wich is connected to the pot, I spin the pot to the maximum value and the output is this:
Code:
pitchRead: 1014.00
pitchRead: 1013.00
pitchRead: 1014.00
pitchRead: 1013.00
pitchRead: 1013.00
pitchRead: 1014.00
pitchRead: 1013.00
pitchRead: 1014.00
pitchRead: 1023.00
pitchRead: 26.00
pitchRead: 24.00
pitchRead: 25.00
pitchRead: 26.00
pitchRead: 40.00
pitchRead: 1013.00

Also, if I press one of the buttons the reading is higher, if I press the 3 buttons at the same time more.
Maybe I need to use one multiplexor for the pots and another for the buttons???

Why the sudden drop on the reading?
74  Using Arduino / Project Guidance / Re: Help with multiplexer (74HC4051) on: August 03, 2012, 06:32:46 pm
oooohhhhhhh... I see.
So a shift register it is.

Thanks for the clarification.
75  Using Arduino / Project Guidance / Re: Help with multiplexer (74HC4051) on: August 03, 2012, 05:40:07 pm
No, wait... you can write on it.

On the datasheet (http://www.datasheetcatalog.org/datasheet2/8/0uo046lw3xgikpf1d0zg15wpefpy.pdf) it says:
Code:
The 74HC/HCT4051 are 8-channel analog
multiplexers/demultiplexers with three digital select inputs
(S0to S2), an active LOW enable input (E), eight
independent inputs/outputs (Y0to Y7) and a common
input/output (Z).

What I want to do is write on 8 different pins by using the multiplexer, one at a time by writing each time the selector value and then the pin value. Am I that wrong?
Pages: 1 ... 3 4 [5] 6 7