Show Posts
Pages: 1 ... 38 39 [40] 41 42 ... 68
586  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet Shield + Pro Mini 3.3 v on: August 07, 2012, 09:06:52 pm
You can send a 3.3V signal to a +5V Arduino. The 3.3V is seen as "HIGH".
But you can not send a 5V signal to a 3.3V Arduino.

If you look at the schematic of the Ethernet Shield, the main chip, the W5100, is at 3.3V
The ethernet board contains logical level shifters to be able to connect it to an Arduino at +5V.
But to change the ethernet board, to make it run at 3.3V... perhaps that is possible, but I doubt it.
587  Using Arduino / Project Guidance / Re: Timing Issues To Make Arduino RC Car Realistic on: August 07, 2012, 08:49:45 pm
That 500ms is easy. It would take perhaps a few milliseconds.

If you use a RF link, it has to be reliable. The cheapest modules are not very reliable.

I think that measuring time is not needed. The main thing is the smoothing of the accelerometer. The accelerometer will have strong output changes for little vibrations. So you have to average or smooth it, and that will need a number of readings and will take some time.

You also need a driver module for the motor. And perhaps a DC-DC converter for the 5V of the servo.

The RC car has to stop if it is out of range. You could send keep-alive commands twice a second. If the RC car doesn't receive those anymore, it could stop.
588  Using Arduino / Project Guidance / Re: interfacing a display with arduino on: August 07, 2012, 08:38:52 pm
If you go to the website on that datasheet :
And choose "software examples", you will see some code. Choose 'C' code.
Also check the "application notes"
589  Using Arduino / Motors, Mechanics, and Power / Re: Sharing Base Transistor fries H-Bridge! Why? on: August 07, 2012, 07:40:47 pm
It can work, but you have to connect all four bases with a resistor to Arduino outputs.
Most of the time, it is used like this:
- One of the PNP-transistors is switched on.
- The opposite NPN-transistor (on the other side) is a PWM signal to regulate the speed of the motor.

If you want to turn the motor left and right, and control it with PWM, you have to use 4 Arduino pins, or use a special ic (that ic might also need 4 pins of the Arduino).
If you want to turn the motor left and right, without PWM, just two Arduino pins are needed, but the H-bridge needs 8 transistors, or 4 transistors with the emitter connected to the motor, to make it safer.

Here is such a 'safe' version with the emitter connected to the motor:
590  Using Arduino / Programming Questions / Re: Data sending and receiving through serial port on: August 07, 2012, 05:20:47 pm
I'm not sure what you write.
You use a PHP webpage, and you use the Serial library for commands and so ?

I'm new to this, but you can request (a GET request) a file from the Arduino webserver. For example request data.txt.
Instead of retrieving that from the SD card, the Arduino detects "data.txt" and generates on the fly that file (or actually a fake file) and fills it with data.
In the PHP script you have to extract the data from the file.

There must be other ways, since I'm just learning this.
I was trying to make an HTML5 live update code of Arduino webserver, but it is not working yet.
591  Using Arduino / Networking, Protocols, and Devices / Re: Serial Communication Problem on: August 07, 2012, 05:09:39 pm
Can you give a link to that sms-module ?
Is it expecting ttl-level signals, or rs232 level (normal, or low voltage).
What is the baudrate ?
The TX of the Arduino should probably be connected to the RX of the sms-module.

Can you check everything once more: baud rate, no parity, 8 bits. No handshake (not hardware, and not software).

If you send something to the serial monitor, that should be the same as using the TX/RX pins, and via adapter to the computer. Can you try to make that work. Do you have an old PC with a serial port perhaps. Or try a different program.

If everything fails, you could try SoftwareSerial. That emulates a serial port on any pin. That way you can use the serial monitor of the Arduino (with normal RX/TX pins), and send messages to the sms device (with SoftwareSerial) at the same time.
The SoftwareSerial is a standard library.
592  Using Arduino / Motors, Mechanics, and Power / Re: Varying Voltage to a Pump on: August 07, 2012, 02:35:35 pm
Yes, that's okay. It is the same.
593  Using Arduino / Motors, Mechanics, and Power / Re: Sharing Base Transistor fries H-Bridge! Why? on: August 07, 2012, 02:21:47 pm
Congratulations, it is the classical how-not-to-make-an-H-bridge error.

Look for example at the left side of the bridge.
The base current for Q3 becomes the base current for Q1.
So Q1 and Q3 will turn fully on and cause a shortcut. The current through R3 can't help preventing it, because the base current is almost unlimited.

With the example that didn't fail, the base of Q1 is to ground, so Q1 is never active.
The base of Q4 is to 5V, so that is also never active.
The current flow through Q3 - M1 - Q2, so the motor is on.

If you understand how the current flows, you know how an H-bridge works.

You could connect the emitters to the motor, and make a 'safe' circuit.
Or you could use a driver ic. Like the old L293D, or a MOSFET driver.
594  Using Arduino / Motors, Mechanics, and Power / Re: Varying Voltage to a Pump on: August 07, 2012, 02:10:23 pm

Now you can use a digital output pin instead of the potmeter, and start playing with.
Have fun !

const int pinMotor = 9;   // write your own pin here

void setup()
  pinMode (pinMotor, OUTPUT);

void loop()
  analogWrite (pinMotor, 20); // too slow
  delay (3000);
  analogWrite (pinMotor, 50); // very slow
  delay (3000);
  analogWrite (pinMotor, 80); // slow
  delay (3000);
  analogWrite (pinMotor, 120); // medium speed
  delay (3000);
  analogWrite (pinMotor, 255); // full on
  delay (3000);
595  Using Arduino / Motors, Mechanics, and Power / Re: Varying Voltage to a Pump on: August 07, 2012, 12:30:41 pm
The flyback or snubber diode should be the other way around.
A flyback diode is for an inductive load, and is parallel with the inductive load.
For a motor, the voltage could not only give a high voltage peak (inductive), but also be negative (dynamo).

To be sure, I would place both diodes, like in this picture I found elsewhere in the forum:

596  Using Arduino / Storage / Re: Webduino, getting data from SD card on: August 07, 2012, 11:58:35 am
If the file could not be found on the SD card, you could return an 404 error.
597  Using Arduino / Sensors / Re: Flex Sensor on: August 07, 2012, 08:23:54 am
Please don't cross-post:,117624.msg884961.html,117623.msg884959.html
598  Using Arduino / Motors, Mechanics, and Power / Re: DC Motor Control on: August 07, 2012, 08:23:30 am
Please don't cross-post:,117624.msg884961.html,117623.msg884959.html
599  Using Arduino / Motors, Mechanics, and Power / Re: Varying Voltage to a Pump on: August 07, 2012, 08:20:49 am
You are going in the right direction.

If you use an analog input for the transistor, it might get very hot.
PWM is just on or off, that prevents it from getting hot.
Your circuit will work with the potmeter and 9V.

But an output of the Arduino is HIGH +5V. So the motor will never get 9V.
To control it with an Arduino, you better place the motor at the collector of the transistor. And the emitter at ground. A pull-down is not needed, but you need a resistor from the Arduino to the base of the transistor.
The protection diode can be placed as a flyback diode over the motor.
600  Using Arduino / General Electronics / Re: Relay Switching on: August 07, 2012, 04:09:21 am
My advice to have a single line at the bottom for ground was wrong. Sorry.
You use the ground symbol, that makes it a lot easier.

I still don't understand how you use the incoming signals.
The resistor at the /RESET line was to ground, it should be to Vcc.
You connected Aref to Vcc, but the most standard way is to keep that open, with a capacitor to ground.
The 7805 must have those 100nF capacitors close to it, so I placed them next to it in the drawing.

I tried Fritzing a few times, so I gave it a try.
Now the picture is a lot larger, but the layout is more standard.
You can use my fritzing file if you like it.
Pages: 1 ... 38 39 [40] 41 42 ... 68