Show Posts
Pages: 1 2 3 [4] 5 6 ... 66
46  Using Arduino / Programming Questions / Re: Hall Effect Sensor A3144 -help on: June 29, 2014, 09:00:49 pm
I'm really not sure about the max frequency of these kind of sensors (nothing about it in the datasheet), but it's probably much more than you need.

Can someone correct me if I'm wrong smiley-wink
47  Using Arduino / Programming Questions / Re: Hall Effect Sensor A3144 -help on: June 29, 2014, 08:02:26 pm
Hello,

No problem it will work, and for a much higher speed than you can go with a bicycle smiley-wink

Don't forget that you have to solidly attach a magnet to the wheel. I recommend that you buy something like this:
or
Search "sigma magnet" on ebay
48  Using Arduino / Programming Questions / Re: ds3231 and time libraries on: June 29, 2014, 03:31:33 pm
Hello and welcome,

Follow this tutorial: http://www.l8ter.com/?p=417
49  Using Arduino / General Electronics / Re: Basic Power Supply Question: Amp requirements for shared power supply on: June 29, 2014, 02:50:29 pm
Yes at least 4.2A but I would recommend at least 6A
50  Using Arduino / Programming Questions / Re: Arduino <--> Serial on: June 28, 2014, 11:19:16 pm
NP and glad you got it working smiley-wink
51  Using Arduino / Programming Questions / Re: Arduino <--> Serial on: June 28, 2014, 11:00:34 pm
No you didn't understand, but this is probably because I have a hard time trying to write english smiley

You can send not only from that textbox, but from any devices (or programs) capable of sending data to a serial port.

I know Processing can do that, but I've never used it. See here: http://www.processing.org/reference/libraries/serial

What you want to do is just not possible with the Serial monitor. But it will be possible with Processing:

1) Arduino send message
2) Processing read message and send it back to Arduino
3) Now in the Arduino, Serial.available will be greater than 0 so it will execute your if statement






52  Using Arduino / Programming Questions / Re: Conversion on: June 28, 2014, 10:38:48 pm
I guess it should be:

Instead of:
Code:
float positionSensor = ( ( positionSensorVolts-0.5 ) / ( 4.5 - 0.5 )) * 100.0 ;

positionSensor = ceil(positionSensor);   // <<<<< round to the following integer
Use:
Code:
uint8_t positionSensor = (uint8_t) ceil( ( ( positionSensorVolts-0.5 ) / ( 4.5 - 0.5 ) ) * 100.0 );

And then add:
Code:
lcd.print(positionSensor);
just before:
Code:
lcd.println ("% ");
53  Using Arduino / Programming Questions / Re: Arduino <--> Serial on: June 28, 2014, 10:26:05 pm
No, you can of course read data from another serial device smiley-wink

But when you do Serial.print, you just output data from the arduino to another device, such as the serial monitor from the Arduino IDE which just show in a window the message that was received. The serial monitor will not re-send the message back to the arduino as this is pointless. You can send data from the serial monitor to the arduino by typing whatever in the Textbox at the top and press Send.

By the way, welcome smiley-wink
54  Using Arduino / Programming Questions / Re: Arduino <--> Serial on: June 28, 2014, 10:10:32 pm
Serial.available() will only be true greater than 0, if there is something in the input buffer. Actually you just output things. If you want that your print messages go back into the arduino, place a wire between TX and RX smiley-wink
55  Using Arduino / Programming Questions / Re: Reading serial data without 'terminator' on: June 28, 2014, 07:28:25 pm
It could really help if you tell what kind of machine it is, and if you could find any datasheet.

Maybe the lenght of the answer will be variable, depending on which command was sent, no? For example one command expect an answer of 4 bytes, another command could expect an answer of 32 bytes, whatever...

To read a constant lenght... Basically something like this:
Code:
const uint8_t ANSWER_LENGTH = 20;
uint8_t answer[ANSWER_LENGTH];
uint8_t answer_index = 0;

void loop()
{
  if ( Serial.available() > 0 ) // if there is something in the serial buffer
  {
    answer[ answer_index++ ] = Serial.read(); //read one byte

    if ( answer_index == ANSWER_LENGTH - 1 ) // if there are 20 bytes in the answer array
    {
      answer_index = 0; //reset index for next answer
      //process answer here
    }
  }
}

This is really crappy but should get you started...
56  Using Arduino / General Electronics / Re: Simple help for explaining the rating on: June 28, 2014, 07:03:37 pm
No you have to understand that these are really 2 separate circuits, the arduino only need to provide a small current to the transistor. The transistor need this small current to "link" the 12V power supply and the solenoid, which will "suck" 120mA from that power supply.

To understand better, you have to understand how a transistor work. Look some videos on youtube smiley-wink

And if you are talking about the 2.2 KOhm resistor in the linked tutorial:
Quote
This type of transistor is switched by current and not voltage, so we need to make sure to supply the correct current to the base to switch it, so a resistor is connected from the Arduino to the base to limit the current to the proper amount.

The resistor is not connected to the solenoid, at all smiley-wink
57  Using Arduino / General Electronics / Re: Simple help for explaining the rating on: June 28, 2014, 06:22:42 pm
When given order from the digital Pin on Arduino, the transistor then inter-connects the solenoid and Arduino which finishes the circuit so that now the solenoid is working.

In other words, the purpose of transistor is a switch to separate the circuit connecting solenoid to Arduino unless received order from Arduino saying now connecting. And the resistor is to make sure the 120mA from the working solenoid is lowered to 20mA so that the Arduino will not be fried.  

Am I right.....

No, the arduino control the transistor, and the transistor control the solenoid. Those are 2 separate circuits.

Like... when you turn on a lamp in your house: you are the arduino, the switch is the transistor, the lamp is the solenoid: you never need to touch the wires of the lamp directly, you only need to provide minimal effort with your finger (pressing the switch) to turn on the lamp smiley-wink
58  Using Arduino / General Electronics / Re: Simple help for explaining the rating on: June 28, 2014, 05:50:12 pm
Also read this carefully: http://bildr.org/2011/03/high-power-control-with-arduino-and-tip120/
59  Using Arduino / General Electronics / Re: Simple help for explaining the rating on: June 28, 2014, 05:32:06 pm
Hello,

The 120mA is what the solenoid will use (approx), so your 12V power supply must be able to provide at least 120mA. If you have for example a 12V 1A power supply then it's all good. As long as it's at least 120mA smiley-wink.

It's not related to the max current output of the arduino pin.
60  Using Arduino / Installation & Troubleshooting / Re: Arduino IDE rxtxSerial.dll and Arduino Leonardo on: June 28, 2014, 01:29:30 pm
Hello,

I think this problem was fixed in latest Arduino IDE
Pages: 1 2 3 [4] 5 6 ... 66