|
526
|
Using Arduino / General Electronics / Re: transistors?
|
on: March 16, 2013, 11:52:31 pm
|
Well all npn work the same in the sense that active they can switch a collector-side load on, and pnp's active can switch an emitter-side load off. (I think I got that the right way round  ) But they all differ in terms of gain and the voltage and current they can handle. A site like this is useful to get sight of the various datasheets. This site might help, as might this.
|
|
|
|
|
528
|
Using Arduino / Programming Questions / Re: Arduino limit switch robot problem
|
on: March 16, 2013, 11:15:49 pm
|
but now when it hits something it stops and the loop repeats Not quite sure what you mean there... but yep loop() runs all the time, that's what it's for. I'm not going to wade through that code to figure it out, but when the bumper switch gets pressed, are you trying to tell it to back out of there? I'd be inclined to back out from an obstacle with a bit of a turn for a short while, maybe a second or so; maybe a random amount of turn and random time?) Then move forward again, hoping this time to miss the obstacle...
|
|
|
|
|
530
|
Using Arduino / Programming Questions / Re: button trouble?
|
on: March 16, 2013, 11:05:13 pm
|
You should be using a multimeter to make sure that the switches are wired correctly Especially to get your head around how those 4-pin square pushbutton switches work. If you don't have a meter, at least hook up an LED and a resistor in series with a power source (you could use the Arduino's 5v for that....) , and probe those switch pins with the button pushed and not-pushed, and draw a sketch like the one I posted.
|
|
|
|
|
534
|
Topics / Home Automation and Networked Objects / Re: Driving Relay with Darlington (TIP120)
|
on: March 16, 2013, 04:29:11 pm
|
|
I'm not trying to be funny, but why don't you just connect it like that example I linked to a few hours back. It's dead simple...
From the high voltage side, hook to the relay. The low side of the relay, to the collector. Diode across those two, backwards (cathode stripe to positive input. Emitter to ground.... Arduino digital pin to the base. Arduino earth and transistor emitter earth one and the same.
As Lefty says, you have no high side connection the relay as it shows in your Fritzing...
|
|
|
|
|
538
|
Using Arduino / Programming Questions / Re: button trouble?
|
on: March 16, 2013, 02:10:58 pm
|
Funny you should say this Paul: It's far simpler, though, to use the internal pullup resistors...... HIGH will be not pressed; LOW will be pressed. I always forget about them, and even as we speak have two buttons with external resistors on my board. I think one of the reasons I forget them, is that I still expect a HIGH from a pushed button, not a not-pushed one. But seeing as I'm working with interrupts, and the attachInterrupt method has a LOW mode but not a HIGH mode (on an Uno anyhow), a pullup makes more sense. So thanks for reminding me....
|
|
|
|
|
539
|
Using Arduino / Programming Questions / Re: Switching on Serial Monitor from code?
|
on: March 16, 2013, 02:00:34 pm
|
So arduino switches on AC power to a PC, PC boots up and has a bat file script run at start-up that loads a serial terminal program and Bob is your uncle. If the PC is already running, have it running the PC go between unio (sp?) PC program that listens on a given comm port and activates a terminal program when commanded to from the arduino sketch, and Jane is your aunt. I was thinking more along the lines of: Serial.startMonitor; 
|
|
|
|
|