Show Posts
Pages: 1 2 3 [4] 5 6 7
46  Using Arduino / Programming Questions / Re: Thermostat code on: February 14, 2013, 03:04:22 pm
You are reading a pot that reads from 0V to 5V.  The Arduino's A2D reads the voltage in 1024 steps, thus each step represents 5/1024 ~= 5mV
This maps to 0 = 0oC and 1023 = 30oC.

The LM35 reads 10mV for each degree C, thus 250mV corresponds 25oC.  This means the highest reading should be no more than 300mV.
300mV will be a reading of about 60.

I would read in the raw A2D reading and then use the map() function to compare apples to apples.

So something like this:
Code:
 fine = analogRead(5); //read the raw temp data
  fine = map(fine, 0, 1023, 0, 30); // adjust the raw reading to a scale from 0 to 30

then later

Code:
 
int temp;

temp = analogRead(0); //read the actual raw temp.  should be 0 to 60 for the 0 to 30[sup]o[/sup]C range
temp /= 2;                 // adjust a2d to our range

I think that works. Let me know if I'm crazy.
47  Using Arduino / Programming Questions / Re: Button state not sticky on: February 14, 2013, 02:17:18 pm
Here are some observations:

Your green LED needs a current-limiting resistor

Your red LED is not connected to D11.  You need to run the wire to the other side of the center rail.

If I were you, I would use the internal pull-up resistor on D2 and have the button go from D2 to ground, thus eliminating the external resistor.
48  Using Arduino / Project Guidance / Re: Heart-rate measurement using Arduino on: February 14, 2013, 01:50:08 pm
I'm sure no expert, but I'll add my two pence...

I have seen a number of the fingertip blood O2 / Pulse sensors, and they had the LED on one side and the receiver on the other. Thus, the IR light goes through the finger rather than reflect off of it.

Just sayin'
49  Using Arduino / Project Guidance / Re: Set up and Program Help!! on: February 14, 2013, 01:43:45 pm
Does the motor have some sort of brake mechanism? Motors, especially large motors, have a fair amount of inertia. Once you get it to turn two revolutions, you'll need a way to stop it.  You can apply a short pulse of reverse polarity voltage, but that might be inconsistent. Hopefully the large motor has a brake.
50  Using Arduino / Project Guidance / Re: I want to make driver circuit for a small but loud siren on: February 14, 2013, 01:28:05 pm
Wow. Then you need to look for extra high efficiency. My best try would be here: http://challengeelectronics.com/piezoelectric_panel_mount_alarms/continuous/

Good luck!
51  Using Arduino / Project Guidance / Re: Which board to use for recording guitar and bass? on: February 14, 2013, 07:01:58 am
Maybe I am missing something, but wouldn't something like a Behringer UCG102 Guitar-to-USB Interface work pretty well?

I apologize if I am missing the point.
52  Using Arduino / General Electronics / Re: Current measurement on positive or negative side? on: February 14, 2013, 06:52:00 am
I don't think that the position of the current sensor matters as long as it is in series with the motor. I might place it between ground and the rest of the motor circuit.
53  Using Arduino / Project Guidance / Re: I want to make driver circuit for a small but loud siren on: February 14, 2013, 04:03:33 am
The noise that the speaker produces is roughly proportional to the power that the speaker consumes.

Applying 5V to an 8 ohm speaker calculates out as:

P = E2 / r

P = 25 / 8 = 3.125W

That's the maximum available with with 5V and an 8 ohm speaker.

To get more noise, you need more power.  Thus, you need to use a larger +V to get the needed sound level.

Using 12V, would produce 18W of power -- if the speaker can handle it.

Controlling a voltage greater than the Arduino's 5V has dangers.

I would use an opto-isolator (like the 4n35) to isolate the 12V from the Arduino. I am attaching a schematic that uses a 4n35 to control a higher voltage motor.  You can see that it is relatively simple.

54  Using Arduino / Project Guidance / Re: Is is possible to detect objects, like walls, thru clear plastic? on: February 12, 2013, 11:47:38 pm
Nice idea, poeticoddity.  I gave you a karma bump!
55  Using Arduino / Project Guidance / Re: Relay for automating my garden on: February 12, 2013, 11:46:03 pm
I noticed that you seem to have your components sideways in the breadboard.
 Please read the documentation.
56  Using Arduino / Project Guidance / Re: Want to run a vibration motor on: February 12, 2013, 09:48:58 pm
Sounds good.
57  Using Arduino / Project Guidance / Re: Want to run a vibration motor on: February 12, 2013, 09:32:05 pm
1k is more common and probably OK.  I'm a little conservative.  Sounds good.
58  Using Arduino / General Electronics / Re: Transistor Gain/Saturation question on: February 12, 2013, 08:52:56 pm
The logic inversion is simple. I have attached a simple schematic.

The LED dimmer is a little harder for the Arduino because, while there is A2D pins, there are no D2A pins.  Two ideas would be to use a dedicated D2A chip like the AD558.

Another simpler/cheaper option would be using a digital pot.  Look here http://arduino.cc/en/Tutorial/DigitalPotentiometer
59  Using Arduino / Project Guidance / Re: Is is possible to detect objects, like walls, thru clear plastic? on: February 12, 2013, 08:36:02 pm
You might be lucky and have a ball that is IR transparent.  If it is, then an you could use an off-the-shelf IR distance module like the one at http://www.adafruit.com/products/164.
60  Using Arduino / General Electronics / Re: Transistor Gain/Saturation question on: February 12, 2013, 08:27:24 pm
The hfe (called Beta in my circles) of a transistor is the ratio of base current to collector current and is a movable feast.  The ratio will change due to heat and/or current.

It looks like you are looking at Vce which is the voltage drop across the transistor from the emitter to the collector when the transistor has been driven into saturation.  It is implying that the the transistor's hfe will drop to 10:1 when driven hard.  But this is a worst-case scenario, methinks.  The 2n3904, in my experience, almost never has it's Beta drop to 10.

What is it that you want to do?
Pages: 1 2 3 [4] 5 6 7