Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 68
61  Using Arduino / Sensors / Re: Strange Analog Input Problem on: February 12, 2013, 05:31:52 pm
retrolefty, it is amazing how you solved it.

oldnoob, a good grounding is important. With sensors it is very important.
Perhaps you can make a drawing of it. Or you can stretch your circuit as one long circuit and check how the ground is.
The ground of the sensors should go the the ground of the Arduino, because the signal is going to the Arduino and that should be accompanied by the ground.
62  Using Arduino / Motors, Mechanics, and Power / Re: Can I Connect a DC Motor to the Transistor's Emitter? on: February 12, 2013, 01:31:31 pm
If the motor is connected to the emitter (and ground), the voltage could be that low.
Also, if you use a battery for the motor, it is best to connect the motor to the collector (and battery plus).

You can try for yourself, and measure the voltages.
But use a resistor of about 1k at the output of the Arduino. That way the Arduino output is protected in case you connect something wrong.
63  Using Arduino / Motors, Mechanics, and Power / Re: Can I Connect a DC Motor to the Transistor's Emitter? on: February 12, 2013, 04:25:58 am
Yes, that's also good.
But if the output of the Arduino is only 4.5V and the Vbe (voltage drop from base to emitter) of the transistor is 0.7, and the voltage drop over the resistor is 1V, the motor gets only 2.8V.

You also can't use a 12V motor.
64  Using Arduino / Motors, Mechanics, and Power / Re: three servos, 4 motors, LED's....How do I power all this stuff? on: February 12, 2013, 04:19:16 am
The first one depends on the motors. For an unregulated power supply I would prefer to use 15...25 V, and use DC-DC converters to make a good 12V for the motors.
The second one is a brandless cheap switching power adapter again. If you buy that, you probably have to buy a better version soon. Don't try to buy a good 12V 4A power supply for 10 dollars, that's not possible.

If you want something cheap, this one: http://www.mpja.com/12-Volt-Power-Supply-85A-100W-Switching-Hengfu/productinfo/16013%20PS/
But I'm not sure how it will behave without any load.

If you want something better: http://www.mpja.com/12-Volt-Power-Supply-51A-Linear-IHN12-51/productinfo/6609%20PS/
65  Using Arduino / Sensors / Re: Strange Analog Input Problem on: February 11, 2013, 06:48:40 pm
Use a resistor of 1k between sensor and Arduino input, to protect the Arduino. Perhaps the sensor generates a spike of 12V during startup.
Use an other input pin of the Arduino, you might already have damaged an input pin.

Did you set the internal reference of the Arduino ? (you should not).
Did you connect the sensor to Aref ? (that is not an input).
Did you connect Aref to something else ?
If the sensor is stuck at 2.24V, is that measured with the Arduino or with a multimeter ?

If you still have problems, we like to have more information.
Which Arduino Board ?
Please upload the sketch.
What sensor, please paste a link to it.
Can you draw how everything is connected.

If grounding is a problem, you could power the Arduino with a battery, or via the usb with a laptop with its power supply disconnected.
The impedance of an Arduino input is very high. It might even be higher than the impedance of the multimeter. So it doesn't make sense that the voltage drops.
66  Using Arduino / Project Guidance / Re: New to this. Need advice with USB mouse interface on: February 11, 2013, 04:10:49 pm
Yes, but the data path doesn't seem good to me.
I mean this: from gaming mouse to Arduino is possible, but the analog output to be able to use a multichannel analog input doesn't seem right to me.

Can you use an analog optical sensor and connect that directly to the A/D board ?

I'm not very familiar with Matlab setups, so I don't know what else would be possible.
67  Using Arduino / Programming Questions / Re: Reading and writing to a single digital pin on: February 11, 2013, 02:06:40 pm
I get a little lost reading your code.
Why do enable the internal pull-up resistor, and have an external pull-down resistor. That doesn't make sense.
Can you make two functions ? One to turn the led on and off, and another to read the switch ?

Code:
// example code, not tested.

int ledIsOn = false;

// Function Led.
//    Usage: Led(true); to turn led on
//               Led(false); to turn led off
void Led( int On)
{
  if( On)
  {
    // Set output high, before pin is made output.
    // If the output turns low, it could shortcut if button is pressed.
    digitalWrite( pushButton, HIGH);
    pinMode( pushButton, OUTPUT);
    // write once more to be sure.
    digitalWrite( pushButton, HIGH);

    ledIsOn = true;       // remember state of pin
  }
  else
  {
    // Can't make the output pin low,
    // that would shortcut if the button is pressed.
    // Return the pin to input state, without internal pull-up.
    // The led will turn off.
    pinMode( pushButton, INPUT);

    ledIsOn = false;       // remember state of pin
  }
}


// Function Switch.
//    Usage: return value is true of switch is pressed.
int Switch( void)
{
  int val;

  if( ledIsOn)
  {
    // The pin is in output state, we have to change that
    // to read the switch.
    pinMode( pushButton, INPUT);
    delay( 1);           // wait, due to the capacitance of the circuit.
    val = digitalRead( pushButton);
    Led( true);          // turn led on again.
  }
  else
  {
    val = digitalRead( pushButton);
  }
  return( val);
}

68  Using Arduino / Project Guidance / Re: New to this. Need advice with USB mouse interface on: February 11, 2013, 01:45:35 pm
What is the precise position needed for ?
A digital caliper is also very precise.
Some optical parts of a mouse can be controlled by an Arduino: https://www.sparkfun.com/products/10105?
A hall sensor and a magnet could be used for precise movements.
But not many devices can beat the precision of a gaming mouse, so the USB host shield can be used to read the mouse, like this project: http://www.circuitsathome.com/mcu/controlling-robotic-arm-with-arduino-and-usb-mouse

As PeterH wrote, using analog makes it harder, and I think you will also loose all the precision. Why do you want to use an aquisition board ?
69  Using Arduino / Project Guidance / Re: Read Wacom Tablet information on Arduino on: February 11, 2013, 11:46:25 am
I wish it would be that simple.

Do you know what the pins are ?
Do you know the serial baudrate ?
Do you know the communication protocol ?

The best way is to use one of the unused serial ports, and echo to the serial monitor what is received.
But you need an example of someone who has done this, otherwise I would not know how to do it. You want to implement a driver into an Arduino, that's not an easy task.
70  Using Arduino / Motors, Mechanics, and Power / Re: three servos, 4 motors, LED's....How do I power all this stuff? on: February 11, 2013, 09:09:24 am
The second one (DC-DC Buck converter) is okay. If 2A is okay for you.

I have doubts about the first one (switching power supply 12Volt 5 Amp). I bought a few switching power supplies from Ebay, and most of them can not deliver the current and they get overheated and get broken within a few month.

If you would also use a DC-DC converters for the motors, you don't need a regulated power supply. Perhaps you have some DC power supply already ? Or an adaptor of 19V for a laptop.
71  Using Arduino / Programming Questions / Re: pin-11 dysfunction on: February 11, 2013, 07:29:56 am
Is the pin high impedance while keeping the reset button pressed ?
72  Using Arduino / Motors, Mechanics, and Power / Re: three servos, 4 motors, LED's....How do I power all this stuff? on: February 11, 2013, 03:28:03 am
Are the DC to DC converters you describe the same as "buck converters?  I am looking at tutorials to understand your suggestion. Are these circuits or a single component?

DC-DC converters is a common name for step-up, step-down, boost and buck-boost converters.
Sometimes it is a small black box (with the components inside), but mostly it is a circuit board.
Some examples: http://www.ebay.com/sch/i.html?_nkw=dc+dc+converter
73  Topics / Education and Teaching / Re: Radio Frequency Interface Projects Books or Tutorials? on: February 11, 2013, 03:23:58 am
In the bar at the top is a "Playground" section.
This is about wireless communication: http://playground.arduino.cc//Main/InterfacingWithHardware#wireless
74  Using Arduino / Motors, Mechanics, and Power / Re: three servos, 4 motors, LED's....How do I power all this stuff? on: February 10, 2013, 07:56:34 pm
A 78-- or LM317 are for 1A or a little more and they get hot, you might need a heatsink.
A DC-DC converter is very efficient.

Do you use an Arduino and a motor driver ?
If the servos are 6V, you could use a DC-DC converter to 6V and use it for the adapter plug (or Vin) of the Arduino and the servos.

If you can power the leds with 12V or a with second DC-DC converter, you would only need a power supply of 12V.
75  Using Arduino / General Electronics / Re: Help Chosing a MOSFET to drive a fan on: February 10, 2013, 07:49:49 pm
Those are perfect.

Normal good old power mosfets need about 9V or 10V at the gate to switch it on.
So that's why you need a 'logic' power mosfet. They are designed to operate with logic levels from a microcontroller or a Arduino.

You could also buy any n-channel logic power mosfet from Ebay.
Pages: 1 ... 3 4 [5] 6 7 ... 68