Show Posts
Pages: 1 ... 102 103 [104] 105 106 ... 114
1546  Using Arduino / General Electronics / Re: Turn Short Pulse Into Longer Pulse on: February 28, 2012, 12:27:20 pm
Hi,
   Thanks for the replies, I have found a few sample circuits by searching for the term 'pulse stretcher'.

   I was planning to try them out this evening, but I picked up some 556 Timers earlier today and have been migrating my transmitter from cascaded 555s to a single 556 - its so much easier to work with on strip board :-)

   I will get back to the pulse stretcher tomorrow.

   In the meantime, thanks for all your help

Duane B

rcarduino.blogspot.com
1547  Using Arduino / Project Guidance / Re: Using a camera to guide an RC car from a computer. on: February 28, 2012, 12:51:27 am
Hi,
   Just to add my few cents worth -

   If you can stretch to lipo batteries and a charger for them, you will get all the power you need, they are also much lighter than older nimh or nicad batteries.

   For lower speeds, its common to fit lathe or crawler motors to cars, these provide low speeds, very smooth control, longer run times and sufficient torque to move around whatever equipment you load the car up with - my crawler can push my four year faster than I can walk in his go kart.



   As previously mentioned you should get a hobby grade radio, this will give you proportional control for smooth and accurate movement, my low end system has a range of over 100 meters, thats as far as I can still see and usefully control the car, more expensive systems will give much greater range, my eyes won't !

Duane B

rcarduino.blogspot.com
   

   
1548  Using Arduino / General Electronics / Re: Turn Short Pulse Into Longer Pulse on: February 28, 2012, 12:32:59 am
Hi,
   Thanks for the replies.

    Its for an IR Decoder, I am generating a 40Khz IR signal from a 555 Timer which activates the decoder, this 40Khz Signal is being switched at 100Hz by another 555 Timer which is the signal I am interested in at the IR Decoder end. In daylight there is sufficient light to cause momentary pulses on the IR Decoder, its very simple to filter these out in software, however I have an LED attached to the decode which lights whenever it reads a signal, its very simple an LED connected between Vcc and the decoder output, when the decoder output is pulled low, the LED Lights. This works very well for testing my hardware with or without software running, but the pulses caused by environmental light are generally too short to visibly light the LED. What I would really like is a low component count solution to extend the pulse length in hardware so that the pulse is visible on the LED. I was hoping for something with fewer components that a 555 monostable, but given the difference in the tigger pulse and visible pulse durations it might be my only options unless anyone can expand on the suggestion from goforsmoke -

"If the pulse is strong enough then let it charge a resistor-capacitor(-ground) to light the led or hold the pin HIGH. If it isn't then use a transistor to make it strong enough."

Duane B

rcarduino.blogspot.com


   
Thanks
    Duane B.

rcarduino.blogspot.com


1549  Using Arduino / General Electronics / Turn Short Pulse Into Longer Pulse on: February 27, 2012, 10:17:13 am
Hi,
   I have an application where I expect a certain amount of environmental noise on my input, I have my hardware set up so that an indicator LED lights in the presence of this noise however the duration of some noise is too short to visibly light the LED. I would like to use hardware to generate a longer visible pulse, I know that I can easily do this in software, but I like the current arrangement where the hardware is reporting its own state - its a sanity check on my software.

   Can anyone point me in the direction general direction of a hardware approach - I am thinking something along the lines of a transistor to switch a higher current that would charge a series capacitor. I know I can use a 555 Timer but would be interested to learn of and try out an alternative.

Thanks

Duane B

rcarduino.blogspot.com
1550  Using Arduino / Motors, Mechanics, and Power / Re: ESC arming problem on: February 25, 2012, 10:08:47 am
Hi,
   For heli 0 is an appropriate arming value.

   As for the beep it could be anything at all, it might be a low voltage alarm, a signal alarm, anything.

   I don't have any experience with Heli ESCs, but if you post a picture someone might be able to tell what it is or if its a generic copy, what it was copied from.

   Other than that do you have radio equipment to program and test it with, does it beep with a radio or just with Arduino ?

Duane B

rcarduino.blogspot.com
1551  Using Arduino / Programming Questions / Re: Button Function - Call throughout when button action needed on: February 25, 2012, 10:04:16 am
Hi,
 We might be getting off the OPs topic at this point, but a reasonable improvement from your suggestions would be to make the delay a parameter of the function.

In addition it would also be possible to pass the mask to getKeys so that only the keys of interest are poled and the delay is only active if a LOW is detected on a key of interest.

The three functions obviously implement a blocking/poling approach to the user interface, it is the simplest approach and based on the original topic - 'Button Function - Call throughout when button action needed' would appear to be an appropriate response.

Duane B.

rcarduino.blogspot.com

1552  Using Arduino / Programming Questions / Re: Button Function - Call throughout when button action needed on: February 25, 2012, 09:06:26 am
Hi,
   Your are right, reading through an unrelated thread, someone mentioned 20ms as more than sufficient to debounce a switch, I will update accordingly.

Thanks

Duane B.

rcarduino.blogspot.com

1553  Using Arduino / Motors, Mechanics, and Power / Re: ESC arming problem on: February 25, 2012, 08:56:48 am
Hi,
    Is it a car, marine or air ESC ?

    If its a car ESC I would expect that it should be armed with 90 and for longer at least 2 seconds.

    Duane B

rcarduino.blogspot.com
1554  Using Arduino / Programming Questions / Re: Button Function - Call throughout when button action needed on: February 25, 2012, 08:34:12 am
Hi,
   In my RC Car/Go Kart lap timer project I have 4 keys to drive a user interface - scroll up, scroll down, ok, cancel.

The following very simple functions drive this -

getKeys -
Very simply poles the pins to see which buttons are pressed - non blocking

waitForKeyPress -
This one loops until one of the keys passed when the function is called gets pressed, for example if I am looking for OK or Cancel and I am not interested in up and down I call waitForKeyPress(KEY_OK|KEY_CANCEL) this will ignore up and down but will return with ok or cancel if one of these two gets pressed

waitForKeyRelease -
This one waits until all keys are released, its important when cancel might mean 'get me out of this mode' but then means 'delete' in the next mode - we need to wait until no keys are pressed before assuming a cancel press
means the user wants us to delete something.

Its simple stuff, I don't see much to gain from classes and arrays for four buttons so here it is, as used in my lap timer project, feel free to use it, you may of course want to add or change buttons.

Project Intro Here - http://rcarduino.blogspot.com/2012/02/rc-lap-timer-go-kart-lap-timer-part-2.html

Code:
//////////////////////////////////////////////////////////////////////////////////
//
// Key related helpers
//
// getKeys - pole keys
// waitForKeyPress - block waiting for keys based on a mask
// waitForKeyRelease - block waiting until no keys are pressed - used between menu contexts
//
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//
// getKeys
//
// read the inputs and create a bit mask based on the buttons pressed
// this does not block, need to review whether we should make this block, in most
// cases we loop waiting for a key, sometimes we also loop waiting for no key
// could put both options here with an input parameter.
//
//////////////////////////////////////////////////////////////////////////////////
short getKeys()
{
 // Use bit flags for keys, we may have a future use for
 // combined key presses

 short sKeys = KEY_NONE;
 if(digitalRead(KEY_UP_PIN) == LOW)
 {
  sKeys |= KEY_UP;
 }
 if(digitalRead(KEY_DOWN_PIN) == LOW)
 {
  sKeys |= KEY_DOWN;
 }
 if(digitalRead(KEY_OK_PIN) == LOW)
 {
  sKeys |= KEY_OK;
 }
 if(digitalRead(KEY_CANCEL_PIN) == LOW)
 {
  sKeys |= KEY_CANCEL;
 }
 
 // absorb any switch bounce here
 delay(200);
 
 return sKeys;
}

//////////////////////////////////////////////////////////////////////////////////
//
// waitForKeyRelease
//
// we can enter a function while the activating key is still pressed, in the new
// context the key can have a different purpose, so lets wait until it is released
// before reading it as pressed in the new context
//
//////////////////////////////////////////////////////////////////////////////////
void waitForKeyRelease()
{
  do
  {
    // do nothing
  }
  while(getKeys() != KEY_NONE);
}

//////////////////////////////////////////////////////////////////////////////////
//
// waitForKeyPress
//
// convenience function, loop doing nothing until one of the sKeyMask keys is
// pressed
//
//////////////////////////////////////////////////////////////////////////////////
uint8_t waitForKeyPress(uint8_t sKeyMask)
{
  uint8_t sKey = KEY_NONE;
 
  do
  {
    sKey = getKeys() & sKeyMask;   
  }
  while(sKey == KEY_NONE);
 
  return sKey;
}

Duane B

rcarduino.blogspot.com
1555  Using Arduino / Sensors / Re: Suggestions on IR communication on: February 25, 2012, 08:12:41 am
Hi,
   The approach I suggested does not involve the IRRemote library. If all you want to do is send a signal to a servo and a motor through Infra red, then just  use the servo library to generate a servo signal, but connect it to an IR Emitter instead of a servo. On the other end you can read the signal and send it straight out to a servo with no additional coding or decoding on either end.

   What IR Receiver are you using, if its one that expects a signal in a given frequency range, you can build a small circuit with a 555 Timer to create this signal and then switch it using a PIN driven by the servo library. I can point you to some good online resources for building this part if your receiver needs it, but let me know what type it is first.

   Once you have one channel up and running its easy enough to add some more to the signal.

Duane B

rcarduino.blogspot.com


1556  Using Arduino / Project Guidance / Re: Slotcar speed controller with display and electronic memory project on: February 24, 2012, 10:06:52 am
Hi,
   I searched for 'meat board' after reading your post the first time, couldn't find anything that wasn't related to livestock !

   Duane B

rcarduino.blogspot.com
1557  Using Arduino / Sensors / Re: Problems with pulseIn and servo.h on: February 24, 2012, 06:30:39 am
Hi,
    I have checked the source for pulseIn and as far as I can see, it does not use any of the hardware timers.

    The problem could be in your hardware design or code, what are you using for power and are you using current limit resistors on your inputs and outputs ?

    For an example of using interrupts to measure and incoming pulse, see a post on my blog here -

http://rcarduino.blogspot.com/2012/01/how-to-read-rc-receiver-with.html

Duane B
1558  Using Arduino / Sensors / Re: Problems with pulseIn and servo.h on: February 24, 2012, 06:00:18 am
Hi,
I don't have access to the Arduino files to check right now, but it is possible they are using the same timer. why don't you switch to using interrupts for the incoming pulses instead ?

Duane B
rcarduino.blogspot.com
1559  Using Arduino / Project Guidance / Re: Help! I can't even begin my project. on: February 24, 2012, 05:48:37 am
Hi,

Dubai has an electronics souk where you can buy ATMega8 chips and everything else you need to make a standalone board. I am sure Saudi has the same shops, in Dubai they are all around the satellite Market and my guess is that they would be in a similar area in Saudi.

for your first board it is much easier to buy a Ready built UNO, it will make programming any boards you later build so much easier.

Your nearest distributor is in Jordan, you can find the details if you search around the main Arduino site.

Duane B
rcarduino.blogspot.com


1560  Using Arduino / Project Guidance / Re: list of shaft hub bushing sources on: February 24, 2012, 05:36:52 am
Hi,

These are RC car wheel hubs, I think they are 11mm at the hex and the shaft is 4mm, will check a set later today. you will see that they fix to the shaft using a pin, if your shaft does not accept a pin, there are similar types where the pin is held within the hex in which case you could probably cut a thread and use a grub screw in place of the pin. Assuming no one suggests a simpler off the shelf solution.

http://m.rcmart.com/mobile_product_info.php?cPath=1389&products_id=14465

Duane b
rcarduino.blogspot.com




Pages: 1 ... 102 103 [104] 105 106 ... 114