Show Posts
Pages: 1 2 [3]
31  Using Arduino / Motors, Mechanics, and Power / Re: Enough juice to drive a Darlington transistor? on: July 02, 2011, 03:38:59 pm
With a 1k resistor in series with the base there's no chance you're going to damage your Arduino. Even if the base voltage is 0V (it won't be -- it'll be around 1.5V) the current will be limited to 5V/1k = 5mA.

The TIP122 has a current gain of 1000 so with a 1k series resistor you should be able to get 1A going through your motor.

The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected

Thanks for the quick reply! Much appreciated.
- K.
32  Using Arduino / Programming Questions / Re: What happens when I digitalRead() a pin that is in PWM output mode? on: July 02, 2011, 02:43:44 pm
Post-bottom-line note: The digitalRead() function disconnects the timer from the pin, so PWM is no longer applied to the output. It definitely does not automatically set the pin mode to input, and the result is that the pin's bit value in the output register is applied to the pin.  Subsequent analogWrite() function calls can be used to connect the timer signal to the PWM pin again.

Finally, note that if you execute an analogWrite() function to a pin that is not one of the PWM pins, the function writes a zero if the byte value is less than 128, and writes a one if the byte value is greater than or equal to 128.

Wow, thanks everyone, especially Dave. Some very interesting tidbits!!

So if I am resding this correctly, it seems like if a pin is sending PWM output and an attempt to digitalRead() from that pin will cause the PWM output to stop. Does the pin output revert to the last value that was set for this output pin, or just back to 0? I'm assuming the former.

It's also interesting to see the behavior of analogWrite() to a non-PWM pin - definitely not what I expected!

Thanks and kudos,
- K.
33  Using Arduino / Motors, Mechanics, and Power / Enough juice to drive a Darlington transistor? on: July 02, 2011, 02:34:27 pm
Hi folks, newbie here and working on my first project. I'm trying to build a DC motor controller using the PWM output pins to drive a Darlington transistor (TIP122) using an emitter ground configuration (with an IN4004 and 100nF capacitor across the motor terminals). To be honest, I have not designed hardware for quite a while so I'm a bit rusty (and analog circuits were never my strength) and can use some help.

I'm using an Uno board and I noticed the output pins are rated at 40mA. I'm supplying 12V for the motor and I expect it to draw about 1A and I wanted to make sure the PWM pins provide enough juice at the base to properly drive the transistor. The reference circuit uses a 1K 1W resistor to drive the base and I'm worried that the transistor might be drawing too much current and damage the board. The motor controller is designed for continuous duty.

Any help will be greatly appreciated!

- K.
34  Using Arduino / Programming Questions / What happens when I digitalRead() a pin that is in PWM output mode? on: June 25, 2011, 01:37:51 pm
Hi there, I'm wondering what value would I get when I digitalRead() from a pin that is currently set to output in PWM mode (analogWrite)? Would I expect to read whatever value that is being driven by the PWM output, or would I get a fixed value?

Thanks much,
- K.
35  Using Arduino / Networking, Protocols, and Devices / Re: Any way to detect USB disconnect event? on: June 25, 2011, 01:32:46 pm
Hi Paul, sorry it took me a while to test this, You are right in that properly closing the serial port (e.g. closing the serial monitor) will reset the board, but I seem to observe a different behavior when I just unplug the USB plug from on my stock Uno board.

With a separate power supply, unplugging the USB cable seems to not reset the board and the loop continues to run. However, I did notice that if I plug in the USB again, then the board is automatically reset.

Does this make sense to you?

- K.
36  Using Arduino / Networking, Protocols, and Devices / Any way to detect USB disconnect event? on: June 23, 2011, 12:59:26 pm
Hi all, this is my first post here. I'm using an Arduino Uno and I've been experimenting with the USB COM connection usng the Serial class, and it seems to be manageable so far. Now I'm wondering if there is a way to detect if the USB is disconnected (assuming I have an external source that powers the Uno board)?

It seems like there is no way to do it using the Serial class, short of requiring some sort of a heartbeat or querying the host. Does anyone have any wisdom to share?

- K.
Pages: 1 2 [3]