Show Posts
Pages: 1 ... 32 33 [34] 35 36 ... 89
496  Using Arduino / Audio / Re: TR-9090 digital potentiometers on: June 25, 2013, 02:13:36 pm
Quote
Here is a link to a website...
Where's the link?

I'm not an expert on any of this stuff...  If I were doing this project, I'd have to do quite a bit of research, but maybe I can give you some hints & suggestions.

This seems doable with the Arduino, but there are at least 3 different parts, all requiring hardware & software.  You'll have to educate yourself, experiment, and make some design-engineering decisions.  I'd get each part working separately before putting everything together.

1. MIDI interface
2. Control of 31 digital pots
3. Input pots or rotary encoders

There are MIDI shields (Arduino add-on boards) and a MIDI library.   If you need any MIDI commands that are non-standard you can create your own SysEx (System Exclusive) commands (and add the software to decode these commands).   SysEx commands would be used to set-up or configure your instrument.   The standard MIDI commands play the notes (or drums).

For 31 digital pots, you'll need a way to address an individual pot.    Typically, there is a "chip enable" or "chip select" pin on the digital pot.   You send the data over a "bus" to all of the chips, but only one chip (digital pot chip) is enabled and listening-responding to the command.    You'll probably want to use a shift-register/multiplexing scheme.   Basically, there is a clock line, data line, and a latch line.   The data is synchronized with the clock, the data is shifted-in one bt at a time so for example, the the data high/low state at the 3rd clock pulse is associated with the 3rd chip.  When you're done, you send a latch pulse, sending the correct high/low data to each pot.

There shift register examples showing how to control LEDs, and I suggest you start with LEDs before thinking about addressing pots.  You probably won't find a 32-bit shift register, but you can cascade shift registers togehter to address/control as many LEDs (or pots) as you wish.  I have a project that uses 3 8-bit shift registers to contrtol 24 LEDs.   Using 3 control lines out of the Arduino I can individually "address" each LED and create any possible LED on-off pattern.

Another option is parallel addressing with an address decoder.

Different digital pots are controlled/interfaced differently.   Some kind of serial interface seems to be the mnost common, but there are also digital pots with "step-up" and "step-down" interfaces.  The I2C interface seems to be the most common, but thats an "engineering choice" you need to make.    I suggest experimenting/testing controlling one pot before you add multiple pots and the addressing.

Yu can also find examples for rotary encoders.  Again, start with something simple like controlling the brightness of an LED.   And if you are using many encoders, you will need an addressing/multiplexing scheme.
497  Using Arduino / Project Guidance / Re: "Homemade" servo on: June 24, 2013, 07:15:17 pm
I agree, it's going to be pretty-much impossible to calculate...   
But, 15500 RPM = 15500 x 360 degrees / 60 seconds per minute = 93,000 degrees per second.   (Of course, that's after it get's up to full-speed.)

Things we don't know....   Drag in the gears & resistance of the load, inertia in the motor/gears/load, acceleration of the motor under various loads, acceleration required...  and probably some other unknown stuff.   (Even if I did know that stuff, it's been a long time since I took a dynamics class or a motors class.)
498  Using Arduino / General Electronics / Re: Common ground in project on: June 24, 2013, 06:59:37 pm
Your schematic is "right", but you are showing 5 switch terminals.  You have a SPDT switch (single-pole, double-throw, 3-terminal) with 2 additional connections for the lamp.

Yes! You can do that!  Connect the switch's common terminal to ground.   Connect the NC terminal to the lamp's ground-side (that will make the lamp normally-on).  Connect the switch's NO terminal to the Arduino's input.   When you push the putton, the lamp's ground will be disconnected (the lamp goes off) and the Arduino pin will be pulled to ground. 

There is never any connection between the lamp's ground and the Arduino input...   One OR the other is grounded at any one time. 
499  Using Arduino / General Electronics / Re: Bridge Rectifier on: June 24, 2013, 06:43:05 pm
Quote
just attached a 2200μF 50V capacitor on to it, and now it is saying it is outputing just a little less than 40VDC. Does anyone know what it going on here, and if it is safe to attach my 24VDC device to it? (Solenoid and relay)
For a solenoid & relay, don't use the capacitor.

Two things are going on...   The peak voltage of an AC waveform is about 1.4 times the RMS.  The capacitor charges-up to the peak.   Also, transformers are rated at some load.  40VA @ 24VAC is 1.67 Amps.   With a smaller load (higher resistance or no resistance) you'll get a slightly higher voltage.  And, there's some tolerance in that voltage.   (It's one of the main reasons we like to use voltage regulators.)

The RMS voltage is something like an average, and it turns-out that 24VAC RMS (will generate the same power as 24VDC.   For example, here in the U.S. where our line voltage is 120V, the peak is 160V. And if you connect a 100W light bulb to 120VDC, it will glow with the same brightness as 120VAC.     

And, when you rectify AC (ignoring the diode drop) you get the same RMS value.

There is a small difference with a solenoid or relay coil, since they both have inductive reactance, but at 50 or 60Hz, they will usually work fine with rectified AC.
500  Using Arduino / LEDs and Multiplexing / Re: Can I use digital pins like this? on: June 24, 2013, 06:20:16 pm
No... smiley-sad

Quote
For example, if I want to turn only the third transistor from the left on the top row ON, I would set pin 1 as HIGH and pin 5 as HIGH. All other pins would be set to LOW. This would mean pins 3, 4, and 6 would be acting as ground pins.
All of your base-resistors as well as pins 3,4,5,6 are connected together!    If you meant to show only a pair of transistors sharing pin 5, that would still turn-on both transistors at the same time.

A matrix works by current flowing into the columns and out of the rows (or vice-versa).    For example, your base-resistor could be the column and the transistor emitter could be the row.   Current will flow in the base-emitter junction (turning-on the transistor) only when a particular transistor's column (base) is high and the row (emitter) is low.   

In other words, both the row and column have to be "turned-on" in order to turn-on a particular transistor.   
501  Using Arduino / General Electronics / Re: Making a transformer as an experiment on: June 24, 2013, 05:47:03 pm
Quote
with an oscillating DC current...
In that case, it wouldn't be DC.  smiley-wink  You can run a square-wave through a transformer, but you normally don't get a square wave out of the secondary.

You may be able to make something that "works", but it's not easy to make a efficient-usable transformer. 

With 100 turns, you won't have much inductance and the DC resistance will be low.   At low frequencies (say 50Hz or 60Hz power-line frequency) you'll get too much current through the primary coil.   If you have a high-frequency oscillator, you could experiment with something like that, but it would still be a good idea to limit the current, especially if you don't have a way of measuring inductance.   (If you limit the current, you also be limiting the voltage.)

If you want to make a transformer, I'd suggest winding your coils around a bolt or iron rod.    You'll still have to limit your current (at lower frequencies), but you could probaby measure the step-up voltage (with no load).   Maybe at a frequency of 100kHz, you could get useful results but that's just a wild guess and I don't know.
502  Using Arduino / General Electronics / Re: 15W Speaker Circuit Setup on: June 24, 2013, 03:41:17 pm
Quote
Does the 50% duty cycle change these values at all?  Ahhhh!?!
YES!  You have 12V peak-to-peak, with a voltage of zero half the time.   Your RMS (and average) is 6V.  That's 4.5W and 750mA.   You would have to use a "push-pull" bridge circuit to get +12V half the time and -12V half the time for 18W.

You can put an electrolytic capacitor in series (maybe 1000uF) to remove the DC bias.  That won't change the power, but the speaker will operate more "normally" without the resulting mechanical offset/bias.

Another solution is to use a siren instead of a speaker.
503  Using Arduino / General Electronics / Re: light controlled motor on: June 20, 2013, 06:45:21 pm
If there's a problem with your code, I'm not seeing it.

Have you tried hard-coding PWM values (not using the light sensor) to see how the motor responds to various PWM values?  The motor might not behave as you expect, especially if there is no mechanical load, or if the load isn't constant.

When you un-comment the Serial.println line, do you get the values you are expecting?
You might add another Serial.println to look at the PWM values too.  Maybe that will give you a clue.

504  Using Arduino / Project Guidance / Re: PCB on: June 20, 2013, 05:03:18 pm
That's the main reason people use double-sided boards. smiley-wink

You can sometimes run traces between holes/pads, or use wire jumpers on the component side of the board to "jump-over" traces.   Jumpers are quite common on single-sided boards.
505  Using Arduino / Project Guidance / Re: The simplest way to amplify a guitar signal on: June 20, 2013, 04:45:26 pm
An electric guitar should put-out about 1V into a high impedance.  That should be enough without a preamp.  Have you measured it?

Are you using an analog input?   With the Arduino's 10-bit ADC and the default 5V reference, you'll have about 5mV resolution.

Since the guitar signal is AC and the Arduino can't accept negative voltages, you'll need to bias the signal.  For that you can use a pair of equal-value resistors (I'd use 1 or 2 megohms for a guitar) to make a voltage divider for 2.5V bias. (Put a capacitor in series with the input to isolate the DC bias from the guitar pickup.)

Then, you'll need to subtract-out (or otherwise deal with) the bias in software.
506  Using Arduino / General Electronics / Re: Eletric shock on: June 20, 2013, 12:40:07 pm
The thing that always concerns me is that one of your victims might have an unknown heart condition or a pacemaker, or otherwise you gadget might fail and deliver more current than you intended...

OK - You don't need an Arduino.  From what you've told us, there is no need for something that has to be programmed with software.

The idea is to generate high voltage at limited (safe) current.

Ohm's Law defines the relationship between voltage, resistance, and current.  You need high-enough voltage to generate enough current to feel, but you need to make sure that if the resistance is low (with damp skin or a short path, etc.) the voltage will drop to keep the current safely low.   A series resistor is one way to do that.

I don't know about AC vs. DC.   I've had nasty shocks from both but I've never done any scientific experiments.   Keep in mind that the AC peak is about 1.4 times RMS, so 120VAC has a peak around 160V.   So, 120VAC probably feels worse (as is more dangerous) than 120VDC.

In order to generate high voltage from a battery, you need an inductor (coil) or a transformer.  Basically, and inductor "tries" to hold constant current...  If you connect a battery to a coil, current will start flowing.  If you suddenly disconnect the coil, with your (high resistance) body in the current path, you will get a voltage spike (Ohm's Law) as the magnetic field collapses and the coil tries to keep "pushing" the same current.  This is the same principal that generates high voltage for a spark-plug from a 12V battery.

That's about all I want to say.  I'm sure you can find schematics/plans on the Net, or maybe osmeone else will give you a link.
507  Using Arduino / Project Guidance / Re: Modifying PWM signal for a servo on: June 19, 2013, 06:54:45 pm
So, this "original" PWM comes from somewhere else, and that's all you have?   You can't get to the raw data creating the PWM?   That signal is PWM and not a servo control pulse, right?

You can filter PWM to varying-DC with a low-pass filter.   For servo speeds, a simple RC Filter should do the job.

Run that DC into an analog input (I'm assuming 5V PWM?) and convert the A/D reading to an angle for the servo library.   The map() function is one way to do that.

I'd probably start with porgramming & testingt the servos under software control, then work on converting the PWM to an angle, then combine everything.
508  Using Arduino / General Electronics / Re: How to detect led is on on: June 19, 2013, 02:38:41 pm
Connect the Arduino ground to your power supply ground.

Connect one of the Arduino digital I/O pins to the switched side of the LED.

Enable the internal pull-up resistor on the I/O (input) pin.

When the LED is off, the input will read HIGH (pulled-high you the internal resistor and any leakage through the LED).   

When the relay closes pulling the LED pin to ground and turning it on, the input pin will also be pulled to ground and it will read LOW.
509  Using Arduino / General Electronics / Re: Surge supressing for Solid State Relay? on: June 18, 2013, 04:27:45 pm
What's limiting the current?   Are you sure it's limited to 5A?

I don't understand the capacitance either...  I agree, we need to see a schematic.   2000V from a capacitor across the SSR will probably kill it.   

If there is a capacitor across where the high-pot voltage is applied, you can get "unlimited" current when it's discharged, just as you can get "unlimited" voltage when you break the current path through a coil.   

I'd say you need to discharge the capacitor as a routine part of high-pot test, and I'd say discharge needs to be an automated part of the high-pot test to protect both humans and the SSR.

P.S.
You might consider using a regular 'ol mechanical relay.    Mechanical relays are generally more rugged and more tolerant of abuse.    A solid state relay can last forever if it's not abused but it can also be killed instantly.   

A mechanical relay will eventually wear-out, but it's usually cheaper to replace and it's usually in a socket.

You might need a relay driver to power the mechanical relay coil, depending on what's currently driving the SSR.
510  Using Arduino / Project Guidance / Re: dual Temp, humidity, and light, display and monitor on: June 17, 2013, 07:17:28 pm
I wouldn't want you breaking into my car based on readings from some "home-built" gizmo.   I would assume the equipment would need to be be laboratory-calibrated and certified.

That said, you can get various sensors and I'd suggest prototyping/breadboarding one function/measurement at a time before integrating them all together.  Likewise, design and test your time-stamping, display, alarm, and data-storage functions separately before integrating everything together.    Any one measurement is fairly simple (once you understand the particular sensor), but with all these modules/functions it's not going to be a quick project...
Pages: 1 ... 32 33 [34] 35 36 ... 89