Show Posts
Pages: 1 2 [3] 4
31  Forum 2005-2010 (read only) / Interfacing / Re: ENC28J60 does not respond to microcontroller on: June 26, 2008, 04:30:58 pm
Is it necessary to connect the reset pin to common Vcc thru a pull resistor.

Im not familiar with that chip, but it is generally considered a "bad thing" to leave inputs floating unless the part is documented as having internal pull ups/downs. Grab a couple K ohms or couple 10s of K ohms and put it in there.

32  Forum 2005-2010 (read only) / Interfacing / Re: DMX transceiver on: May 29, 2008, 08:15:46 pm
Me thinks he is speaking of DMX512, a lighting communication standard using RS-485 @ 250Kbps.

Maybe he is talking about the rapper? I don't get rap.


I'd get me an RS485 to TTL serial converter, connect to the hardware input pins, set rate to be 250K, then set to decoding packets. Should be doable but at 250K you'd need to decode your packets efficiently. No time to waste.

33  Forum 2005-2010 (read only) / Interfacing / Re: Arduino RC Car motor on: May 30, 2008, 08:20:21 pm
I think my problem is trying to get the ESC to arm.  From what I've heard I need to start it out with 1000 us pulses for a couple of seconds, which I've tried and haven't had any luck.  This weekend I'm going to see if I can use the arduino to sniff the signal the radio receiver sends the ESC and then try to replicate that.

ESC safeties tend to take a specific pattern to unlock. Try a couple seconds of 1000 uS, followed by a couple seconds of 2000 us, followed by 1000 uS. You should now be "armed." If that doesn't work, try the reverse.
34  Forum 2005-2010 (read only) / Interfacing / Re: Parsing VGA data with arduino? on: June 02, 2008, 06:55:38 pm
Arduinos almost seem like magic, but they aren't. This won't work for many reasons. Overall speed... A/D can't sample all channels of the A/D at the same time...and I may be wrong, but I believe there is just 1 A/D and a multiplexer to each of the inputs. Being able to read 1 channel at x Hz does not mean that you can read all channels in parallel at x Hz.

Just because the update rate may be 30fps, you don't have the whole 1/30 of a second. You have H&V blanking times included in that which must be subtracted. And who runs their output that slow anyway. Good, non--flicker scan rates go way above that. I'm at 75 right now. (Don't know if it is interlaced.)

To do just low res 640x480 even as slow as 30fps, you'll need ~ >10Msps on each channel (RGB) and trigger the A/D function on all 3 colors in simultaneously. There is a reason frame grabbers cost $.

35  Forum 2005-2010 (read only) / Interfacing / Re: Enabling Internal Resistors on: April 26, 2008, 08:38:48 pm
 If so, how?

digitalWrite( 3, HIGH );
digitalWrite( 4, HIGH );

36  Forum 2005-2010 (read only) / Interfacing / Re: how can i do light detection??? on: April 04, 2008, 02:05:40 pm
I see what you are trying to do. An anti-cockroach. (seeks light rather than avoids light) That is fine. Great starter project. (What is sensor 1 for? Will it go up too?)

But since you need to learn electronics, programming, and how to build a chassis and motorize it, I would strongly advise you to use known and documented parts rather than trying to learn and use a sub-optimal solution.

i also found this it seems like itl be helpful  smiley

That isn't helpful. It is unneccessary complication. As Triffid Hunter & I pointed out all you need is the detector device, a resistor, and an analog input pin. {Just do it.}

               input pin

The value of R should be much higher than the low resistance state of the device (whether that be lit or dark) but also it should be much lower than the high resistance state of the device (opposite lighting condition). By using a defined light sensor, the docs will tell you R(dark) & R(light).

The part might have an R(dark) of 1.2M & R(light) of 10K. In that case I'd pick R to be 100K to 120K. That is, 1/10 the dark resistance but 10X the light resistance. Then, in the dark V out would be 90%  of Vcc (4.5V) and in the light V out would be 10% of Vcc (0.5V). Another thought would be to get a 250K trimmer pot, set it mid-way and then trim one way or the other to get the best center point. (You might very likely need one value for indoor operations and another for outdoor.)

It worries me that you keep bringing up using an LED as a sensor. Yes, it can work. But it is a little like riding a goat to school / work. There are better, faster, more documented ways. Use a phototransistor or CdS cell. Read its docs for hints and tips.

Biting off more than you can chew has killed more potential projects than about any other cause. Save the LED as a photosensor thing for next year's science project.

Break it down into functional assemblies and build and test them separately. After you have 2 things working, bring them together. After you have all things working look for ways to reduce resources. Currently you are consuming 5 analog input pins just to decide where it is brightest. Can you think of a way to use just 1 or 2 sensors and spin the robot or a sensor on a turret to find the light then steer to it? etc.
37  Forum 2005-2010 (read only) / Interfacing / Re: how can i do light detection??? on: April 01, 2008, 07:33:18 am
but i dont know what is used to detect the light :-[  or the code of how to code it onto Arduino

Common light sensors include photodiodes, phototransistors, CdS (Cadmium Sulfide) "photocells". They are all commonly available online, or at Radio Shack if you are in the US. LEDs can be used as photodiodes but I would consider it a novelty, not a part of a production device since the manufacturer doesn't guarantee operation that way.

To read the value into Arduino will depend on what you are connecting. With a CdS cell, it is simply a variable resistor. Connect it in series with a resistor and measure the voltage at that junction with an analog pin. Any of the "how to read a potentiometer" guides will show you how to do that.
You can get fancy and buy a light sensor, such as a light to frequency converter. Here is one that can measure the color of light:


is infrared as good or better than them?  and do i just use the code from here to use any of them?

You ask to compare apples to electricity.

Infrared is a wavelength (inverse frequency). It is not a device. Each sensor device will have a sprectrum it responds to. IR, UV, visible, microwave, etc.


I doubt your code will do what you want, but there is so little I can't tell what you are trying to do. All you are doing so far is defining a bunch of variables and stuffing an initial value into them (13). Note: you can't connect multiple LEDs to one pin (13) and read or control them individually just because you gave them different names.

I think you might be trying to do something like this:

// define input pins
int sensor1 = 13;
int sensor2 = 14;
int sensor3 = 15;
38  Forum 2005-2010 (read only) / Interfacing / Re: i2c contention with USB (won't it?) on: March 08, 2008, 12:29:21 pm
Ahhh. Thanks. I found it now. i2c is using the analog 4 & 5 pins. That will work spiffy!  smiley

The i2c examples I found before seem to predate official Arduino support and, for whatever reason, people were using the tx/rx lines and cobbled it together themselves. I assumed  :-[ that the official library did the same.

39  Forum 2005-2010 (read only) / Interfacing / i2c contention with USB (won't it?) on: March 08, 2008, 07:33:47 am
 I just started with Arduino and all is going well so far. But next up is working with some parts that have an i2c interface, which I understand should work fine using the TWI. It seems to me that would be fine if the Arduino was stand alone, but during development the Arduino is connected to my computer via USB. since the tx and rx bits are shared with the USB, won't any USB activity mess up i2c comms, and won't any i2c activity get sent out the USB? Or does the USB chip somehow know that it isn't valid data to send back to the host?

40  Forum 2005-2010 (read only) / Workshops / Re: South Florida Workshop / Group on: June 23, 2008, 06:51:06 pm
How far south is "south"? I consider myself "central" usually to be found between Tampa & Orlando.

Yours is the first I've seen in Florida, closest so far was Atlanta.  :'(
41  Forum 2005-2010 (read only) / Exhibition / Re: Read PPM signals from RC receiver or Control on: July 26, 2008, 09:49:54 pm
Or, more lazily,  if you lose the receiver switch off engine, pop parachute, and it all floats gently downward... to land on a road and be mangled by a passing truck. smiley

smiley smiley smiley

When I was a teenager there was a guy at the local flying field who landed that way.

Instead of landing in the usual manner, he would fly ~50 feet over the field, then when he pulled both the throttle trim and throttle all the way back the engine would cut off, and (what would be on full scale aircraft) the engine cowling and part of the windshield were released and a parachute, tied to the wing spar, came out.

First time I saw it I thought it was a great trick. Soon discovered he always landed that way. Wasn't till much later I learned that he crashed so much on landing, that one time he blew such a fit, stomping the poo out of his aircraft that he injured his foot (control rod went through the sole of his shoe into his foot). While waiting in the ER he had the idea to rig his next plane to eject the cowling (held down in front by an extra tab on the throttle servo control wire). A 2 or 3 foot nylon chute was folded and mashed against some open cell foam on top of the fuel tank, and held in by the cowling.

42  Forum 2005-2010 (read only) / Exhibition / Re: Read PPM signals from RC receiver or Control on: July 26, 2008, 09:23:27 pm
The code linked in reply 8 above should do what you want. Each channel can be individually set to a user defined failsafe value which will be returned on detection of loss of a valid signal. (Alternatively, any channel can be set to use the last good value received.)

(peeking at other thread)

Oh, now that is just sweet, being able to set failsafe per channel in setup()...or not set it!

For a battlebot or something, last good value before you were jammed may be OK.
For an aircraft that may not be good. (Imagines the beginning of an outside loop...)
43  Forum 2005-2010 (read only) / Exhibition / Re: Read PPM signals from RC receiver or Control on: July 24, 2008, 09:41:07 pm
Fantastic project. One disagreement:

Yes i was thinking that, probably is going to be a big problem, if the receiver fails, the servos will be freeze and airplane BOOM!!!.

Wouldn't this be a great place for a failsafe command set?

Certainly, it depends on what sensors are aboard (horizon detector can tell you "up", compass direction, GPS location, etc.)

At a minimum: If you lose the receiver, neutralize elevator & ailerons, idle throttle (or 1/2, or?). If your aircraft is semi-stable it should return to a flight attitude on its own. If you have a horizon detector, you can be even more sure of it.

Got more sensors? Fly to a GPS coordinate (your flying field?) and circle, again waiting for a signal. If no signal after orbiting the field for 2 minutes, fly to a coordinate downwind of the runway, turn to runway heading, cut throttle to idle. With a little luck your hardware ends up in just a few pieces at your flying field rather than a bajillion pieces lost in a lake, highway, forest...
44  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Motion Capture System on: March 30, 2008, 11:31:20 am
I'm tempted to go with USB because it is a more universal standard and I already have a thumb drive I can use.
Just so you know, FTDI chips only talk to computers over USB. Thumb drives dont work.

Not true. They also make a serial, SPI, or parallel to USB host controller chip, the VNC1L.
45  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Help with printing on: July 20, 2008, 05:49:05 pm
I'm not sure what you are asking. Do you want the Arduino to send something over serial (USB) to your program?

30Hex = 48Dec = "0"

Serial.print( 48, HEX); // generates "30"

Serial.print( 30, DEC); // generates "30"

Do you want a print statement to generate "leading zeros" (in your case the string "30<space>")?

Pages: 1 2 [3] 4