Show Posts
Pages: 1 2 [3] 4 5 ... 23
31  Using Arduino / General Electronics / Re: What is the minimum wiring for two switches? on: February 09, 2013, 07:51:08 pm
This tutorial  http://arduino.cc/en/tutorial/button should instead have the method proposed by Jack Christensen in it instead of what it currently says or at least, both.
32  Using Arduino / General Electronics / Re: What is the minimum wiring for two switches? on: February 09, 2013, 06:50:22 pm
so I could've done the same for the push button too? why do they show the inferior resistor schematic if it is possible to to it without the resistor?
33  Using Arduino / General Electronics / What is the minimum wiring for two switches? on: February 09, 2013, 06:01:35 pm
How would the wiring diagram below be extended to add a switch to the circuit? I already have a pushbutton on pin 2. I want to also put a simple, on/off switch on pin 3.

34  Using Arduino / Project Guidance / Re: Will this setup cause a fire? on: February 05, 2013, 09:25:11 pm
It needs to be connected with one cable.

Why one? Where did this requirement come from?
Because customers would prefer to buy and string up one cable vs two side-by-side.
35  Using Arduino / Project Guidance / Re: Will this setup cause a fire? on: February 05, 2013, 08:12:12 pm
Pretend like you have a device that draws 12V 7A at most, receives TTL data, and sends back video data. It needs to operate at varying distances, say, 6-100ft. It needs to be connected with one cable. How would you do it? Do you cop out and run an extension chord for the power and a telephone/CAT5 line for the other data, or do you get smart and figure out a solution that meets the requirements?
36  Using Arduino / Project Guidance / Re: Will this setup cause a fire? on: February 05, 2013, 03:51:00 pm
OK. I need AC power, video signal, and RX, TX all on one cable. What cable will do that?
37  Using Arduino / Project Guidance / Re: Will this setup cause a fire? on: February 05, 2013, 03:29:46 pm
What other cable can carry that kind of power and data while being able to be bought locally in different lengths? Cat5 is very convenient. An extension chord would be good too but it only has 3 wires. I need power, RX, TX, and video signal all on one cable.
38  Using Arduino / Project Guidance / Re: Will this setup cause a fire? on: February 05, 2013, 09:13:21 am
I need to power something 100ft+ away with an ethernet cable. The load is 12V and ~7A. If I use AC, I can convert it to DC at the end of the cable. The cable will greatly vary in length from 6ft to 100ft+ so the solution needs to work with either scenario.
39  Using Arduino / Project Guidance / Re: Will this setup cause a fire? on: February 04, 2013, 10:09:45 pm
ignoring the law, can that setup 'technically' work without overheating?
40  Using Arduino / Project Guidance / Will this setup cause a fire? on: February 04, 2013, 08:58:23 pm
I want to run 120V AC through a CAT5 cable. smiley-eek One twisted pair will be hot, another twisted pair will be neutral. The cable may be 6ft to 100ft. At the end will be a 12V, 7A power supply. Will it all melt to the ground? If so, Why? I can already draw 12V, 7A DC through a 6ft length using one twisted pair just fine..
41  Using Arduino / General Electronics / Re: How do you calculate what the voltage will be after a resistor? on: February 04, 2013, 07:19:53 pm
So that would mean that if I have a 100mA load I'm going to get a totally different voltage than I would I I have a 4A load. That's not what I've experienced in practice. The voltage generally remains the same unless something with a massive amp draw is running.
42  Using Arduino / General Electronics / Re: How do you calculate what the voltage will be after a resistor? on: February 04, 2013, 07:05:45 pm
If you have a 12v battery, you put an X Ohm resistor in series, and you measure the voltage after the resistor (at the green terminals in the image below), what will it be?

Twelve volts.
nope. The voltage varies depending on resistance.
Another example is that same battery and a 30ft wire. the voltage measured at the end of that 30ft wire will not be 12v because of the resistance of the wire. if the resistance of the wire is known, what formula will tell me the resultant voltage?
43  Using Arduino / General Electronics / How do you calculate what the voltage will be after a resistor? on: February 04, 2013, 06:46:54 pm
for some reason all of the formulas for this on google involve current. No.

If you have a 12v battery, you put an X Ohm resistor in series, and you measure the voltage after the resistor (at the green terminals in the image below), what will it be? See how that doesn't involve current? Now what is the formula for that? It should only involve initial voltage, resistance, and final voltage. Current should not be a factor.

44  Using Arduino / Motors, Mechanics, and Power / Re: Pololu TREX motor controller and Arduino problem on: February 03, 2013, 11:57:19 am
that was it. thx
45  Using Arduino / Motors, Mechanics, and Power / Pololu TREX motor controller and Arduino problem on: February 03, 2013, 10:19:39 am
I Can send data to the TREX but don't get any motor LED response

Blue solid, red solid and green flashing but no motor LED activity

all jumpers removed except +=Vcc, and mix

Problem is likely with the code but the code is real simple and should work.. Anyone worked with these enough to know what might be happening?




Code:

// Included for serial communication
#include <SoftwareSerial.h>
 
// Define pins you're using for serial communication
// Do not use pins 0 or 1 as they are reserved for
// standard I/O and programming
#define TXPIN 4
#define RXPIN 5
 
// Create an instance of the software serial
// communication object. This represents the
// interface with the TReX Jr device
SoftwareSerial pololu(RXPIN, TXPIN);
 
// Main application entry point
void setup()
{
  // Define the appropriate input/output pins
  pinMode(RXPIN, INPUT);
  pinMode(TXPIN, OUTPUT);
 
  // Begin communicating with the pololu interface
  Serial.begin(9600);
  pololu.begin(19200);
  delay(5);
}
 
// Main application loop
void loop()
{
  // Loop through 127 to 0, forward
  for(int i = 127; i >= 0; i--)
  {
    // Say that we are setting our speed
    Serial.print("Setting speed 0 to: ");
    Serial.println(i, DEC);
 
    // Set speed to motor 0 and forward
    SetSpeed(0, true, i);
    delay(100);
   
    // Say that we are setting our speed
    Serial.print("Setting speed 1 to: ");
    Serial.println(i, DEC);
 
    // Set speed to motor 0 and forward
    SetSpeed(1, true, i);
    delay(10);
  }
 
  // Loop through 0 to 127, backward
  for(int i = 0; i < 128; i++)
  {
    // Say that we are setting our speed
    Serial.print("Setting speed 0 to: ");
    Serial.println(i, DEC);
 
    // Set speed to motor 0 and forward
    SetSpeed(0, true, i);
    delay(100);
   
    // Say that we are setting our speed
    Serial.print("Setting speed 1 to: ");
    Serial.println(i, DEC);
 
    // Set speed to motor 0 and forward
    SetSpeed(1, true, i);
    delay(100);
  }
}
 
// Set the motor index, direction, and speed
// Motor index should either be a 0 or 1
// Direction should be either true for forward or false for backwards
// Speed should range between 0 and 127 (inclusivly)
void SetSpeed(int MotorIndex, boolean Forward, int Speed)
{
  // Validate motor index
  if(MotorIndex < 0 || MotorIndex > 2)
    return;
 
  // Validate speed
  if(Speed < 0)
    Speed = 0;
  else if(Speed > 127)
    Speed = 127;
 
  // Send the "set" command based on the motor
  // Note that we do not accelerate to the
  // speed, we just instantly set it
  unsigned char SendByte = 0;
  if(MotorIndex == 0)
    SendByte = 0xC2;
  else if(MotorIndex == 1)
    SendByte = 0xCA;
  else if(MotorIndex == 2)
    SendByte = 0xF0;
 
  // If we go backwards, the commands are the same
  // but minus one
  if(!Forward)
    SendByte--;
 
  // Send the set speed command byte
  //pololu.write(SendByte);
  pololu.write(SendByte);
 
 
  // Send the speed data byte
  pololu.write(Speed);
}
Pages: 1 2 [3] 4 5 ... 23