Show Posts
Pages: 1 2 [3] 4
31  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Is it possible to break a servo with pulses? on: January 08, 2011, 11:32:05 am
I think so because I just did.

I made a mistake in my code and the servo input went berserk giving even negative values.
Now everytime the servo comes to it's end and returning to neutral there is a spark like sound.

I can still use it for testing but I will not put it in a plane or any vehicle.
32  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: arduino in italiano possibile per ┬áprogrammazione on: January 06, 2011, 01:17:20 pm
Duh?
33  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: File Association?? on: January 01, 2011, 05:57:49 am
Quote
Exactly - and when I do that it acts as if I had selected cancel instead of ok, it drops back to the list of programs and does not open ardiuino-0021.

Same problem over here and 0021 is my first Arduino compiler installed.
Windows 7 Ultimate.

I'm opening sketches from the compiler now.
34  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: RC car control Help on: January 02, 2011, 06:06:57 am
I should have known.

Thanks!
35  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: RC car control Help on: January 02, 2011, 05:56:26 am
Quote
thnx for replying, but I should've mentioned that you can consider me as a biggner.

Can you provide more comments for the codes?

thnx

I would like that too.

Thanks,
36  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: PWM Generation on: December 25, 2010, 11:14:42 am
Quote
and the ESC will react the same way as the servo? where am I going to get the potentiometer value is it given on the data sheet for the ESC

I think so, I have to try. I think you have to try using the mapping command which limits to use.

You often have to calibrate the ESC so I think there are electronics inside the ESC using a kind of mapping code for the receivers signals suggesting the ESC can take a range of values.

(WARNING: I don't know if you can damage the esc or board by using the wrong limits but my guess would be not)
37  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: PWM Generation on: December 24, 2010, 10:41:33 am
If you search in the servo library (on the Arduino home page) for knob you will find the information needed to make servos move using a potentiometer.

The esc accepts PWM at 50Hz I think.
(I think PPM is often used to get the information from transmitter to receiver and the receiver makes a PWM signal for each channel, AWOL please correct me if I'm wrong)

Duration is usually from 1ms to 2ms and the sketch includes servo.h if I remember correctly so it's all done for you.

38  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: code for PWM signals to H bridge on: December 24, 2010, 02:46:19 pm
Ok, sorry.

I have two npn transistors and with opening I mean make them conduct by putting the signal on the base.

I guess I have to get a couple of PNP transistors also.
39  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: code for PWM signals to H bridge on: December 24, 2010, 01:49:07 pm
I have tested the sketch and it works fine. I had to use outputs 2 and 3, 1 is not a PWM output.

When I try to open 2 transistors using one output it doesn't work???

When I use one transistor I can it works and I have checked direction using leds.

Could there be a timing problem? I checked the transistors and they work fine until I make the base common and it will not work anymore. Even when it's working with one transistor and I only connect the base of the second transistor (so not using collector and emiter) it doesn't work anymore.
EDIT: base only works but collector of second transistor connected makes it go bad.


I knew there was magic smoke involved in electronics but apperently there is even more magic???
40  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: code for PWM signals to H bridge on: December 24, 2010, 09:49:22 am
You mean like this?

I have broadened the dead-band.

Code:
int potpin1 = A1;  // analog pin used to read the potentiometer voltage
int PWMPin1 = 1;    // PWM signal to digital pin 1
int PWMPin2 = 2;    // PWM signal to digital pin 2
int value1;
int value2;
int pinread;

void setup()
{
  // nothing happens in setup
}

void loop()
{
pinread == analogRead(potpin1);  
  if (pinread < 482)
  {
    value1 = map(pinread, 0, 481, 255, 0);
    analogWrite (PWMPin1, value1);
  }
  else if (pinread > 554)
  {
    value2 = map(pinread, 555, 1023, 0, 255);
    analogWrite (PWMPin2, value2);
  }
  else
  {
    analogWrite (PWMPin1, 0);
    analogWrite (PWMPin2, 0);
  }
}  

Thanks Groove, fixed it.
41  Forum 2005-2010 (read only) / Frequently-Asked Questions / code for PWM signals to H bridge on: December 24, 2010, 08:10:42 am
I'm about to order a small motor and components to build a H-bridge.
I have written the following code and compiling gives no trouble.

Will this work?

I mean to control both directions with one potentiometer so the mapping is very important in this sketch. The value in the first mapping is inverted, will this work?

Code:
int potpin1 = A1;  // analog pin used to read the potentiometer voltage
int PWMPin1 = 1;    // PWM signal to digital pin 1
int PWMPin2 = 2;    // PWM signal to digital pin 2
int value1;
int value2;

void setup()
{
  // nothing happens in setup
}

void loop()
{
  if (analogRead(potpin1) < 512)
  {
    value1 = map(potpin1, 0, 511, 255, 0);
    analogWrite (PWMPin1, value1);
  }
  else if (analogRead(potpin1) > 524)
  {
    value2 = map(potpin1, 525, 1023, 0, 255);
    analogWrite (PWMPin2, value2);
  }
  else
  {
    analogWrite (PWMPin1, 0);
    analogWrite (PWMPin2, 0);
  }
}  

Thanks,

Leo
42  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: XBEE how does it work? on: December 16, 2010, 12:04:45 pm
Ok thanks,

That's a good reason to buy me an Arduino Uno smiley.
43  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: XBEE how does it work? on: December 15, 2010, 03:59:35 pm
Thanks, didn't think about latency. I was thinking about an Emaxx type vehicle with an aluminum/plastic sheet on top to put all the stuff on.

Getting somewhere however would be more important than getting there fast. (fortunately in this case)

There is no real goal in building the car other than learning from it.

I made a mistake in my previous post. I meant the esc has to receive a PWM signal from the XBEE/board like the servos do.

(I'm getting there slowely, tonight I managed to make a walking string of 8 leds with a potentiometer smiley)
44  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: XBEE how does it work? on: December 15, 2010, 11:42:14 am
I would like to have an Arduino in the controller (stationary) with an XBEE on top.

In my car I only want an XBEE, battery, esc, motor and servo and maybe sensors (have to think of a use for sensors)

Can I use the XBEE in the car to generate the PWM signals for the servos and motor and send back data from the sensors to the controller?

The Arduino in the controller can process the sensor data and send new PWM commands to the car.

45  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: XBEE how does it work? on: December 14, 2010, 01:39:53 pm
Ok, thanks. Would it be possible to keep the Arduino in the controller so it won't be bashed around in the car?
The XBEE in the car would only have to give PWM signals to the servos and controller and send back info from sensors or maybe other things.

I would like to extend the Arduino pins wirelessly.
Pages: 1 2 [3] 4