Jump to content

Servo picking up random signals?


dharak1

Recommended Posts

I was playing with an arduino trying to transmit signals to a servo. I put together an antenna for the servo and one for the arduino to transmit. I wrote some code and uploaded it. It made the servo sweep. I plugged it in and all of a sudden the servo was picking up signals from pin 14 for communications on the arduino. When I made full contact between the two antennas the movement as smooth and when separated the movement jittered. One problem, the servo didn't sweep. I thought this was just because I didn't put a delay at the end of the loop. Now a few minutes ago I was testing antennas and I found out the smoothest ones. Then I noticed when I made contact between the two antennas that the transmitting one wasn't plugged in. Keep in mind that the arduino couldn't be controlling it because the signal cable on the servo wasn't plugged in to a pin just hooked up to an antenna. It worked much better when it was put to the unplugged transmit antenna, the larger one. Was my servo picking up random signals? Is that even possible? Was it radio or someone else on a micro-controller?

Link to comment
Share on other sites

I was playing with an arduino trying to transmit signals to a servo. I put together an antenna for the servo and one for the arduino to transmit. I wrote some code and uploaded it. It made the servo sweep. I plugged it in and all of a sudden the servo was picking up signals from pin 14 for communications on the arduino. When I made full contact between the two antennas the movement as smooth and when separated the movement jittered. One problem, the servo didn't sweep. I thought this was just because I didn't put a delay at the end of the loop. Now a few minutes ago I was testing antennas and I found out the smoothest ones. Then I noticed when I made contact between the two antennas that the transmitting one wasn't plugged in. Keep in mind that the arduino couldn't be controlling it because the signal cable on the servo wasn't plugged in to a pin just hooked up to an antenna. It worked much better when it was put to the unplugged transmit antenna, the larger one. Was my servo picking up random signals? Is that even possible? Was it radio or someone else on a micro-controller?

I have no idea what you are trying to do but an Arduino isn't a transmitter and the servo isn't a receiver. It is possible to make the arduino control the servo directly with a cable and the proper software.

Do you have some sort of transmitting radio hooked up to the arduino? Do you have a radio receiver unit to plug the servo into?

Link to comment
Share on other sites

I have no idea what you are trying to do but an Arduino isn't a transmitter and the servo isn't a receiver. It is possible to make the arduino control the servo directly with a cable and the proper software.

Do you have some sort of transmitting radio hooked up to the arduino? Do you have a radio receiver unit to plug the servo into?

From the sound of it, there was some sort of RF transmission going on, and possibly some sort of signal interference.

Link to comment
Share on other sites

I am a total noob when it comes to anything electronic. I saw a TX pin on the arduino and my mind popped to radio. I had the servo taking 5V power from the arduino and A curled up 2 foot length of wore on each end as antennas. Obviously not this easy as now I see there are whole shields for wireless. I have no idea what the servo could have been doing. Could it have been power changes? I noticed when you plug in a servo it twitches a bit. This was making full rotations in one go.

EDIT: Ok i lied, I didn't want to admit it but i used some meccano parts for the transmitter and receiver. I think they worked better than wire.

EDIT2: A quick video I made of what i have going on: http://www.youtube.com/watch?v=ISwNOrYnN0k&feature=youtu.be

Edited by dharak1
Link to comment
Share on other sites

Sounds like an issue with grounding. Keep in mind that while the signal to the servo is pulse-modulated, the typical servo is just a voltage comparator. So if you have any floating pins, you'll end up with erratic behavior which can be dependent on absolutely anything, from stray radio signals, to mains in your house, to proximity of your own fingers near the device.

Link to comment
Share on other sites

I am a total noob when it comes to anything electronic. I saw a TX pin on the arduino and my mind popped to radio.

That pin is for the serial interface, theres no radio functionality there.

Servo PWM is .. well, not actually PWM for starters. They look at the width of the high pulse rather than the duty cycle. Any stream of pulses between about 40hz and 200hz will trigger them, and mains voltage is 50 or 60 hz depending on where you are, so its not surprising that theres some random noise about thats suited to triggering a servo randomly.

Link to comment
Share on other sites

its hard to drive servos and receive data from a radio simultaneously. if you do it in software, its practically impossible. arduino's servo library, i think, sets the pin high, then sets a timer. then an interrupt service routine is triggered when the timer expires, and the pin value is set low. you can use multiple servos because there is about 20-50ms of idle time between pulses, plenty of time for sending pulses on other servos. sometimes you will have another library that wants to use the same timer. there is a library called ServoTimer2, which as its name suggests, uses timer 2 to drive the servos, which may help. i think it works about the same as the stock servo library.

i had this problem a lot when i was using ask modules with protocols that rely on interrupts or timers. ive since switched over to nordic rf modules (which can be had for about $3) and the spi interface and the mirf library doesn't seem to interfere with the servo library as much, since the dedicated spi hardware on the mcu and on the rf module would handle everything without getting in the way of your program. it would definately help if we knew what kind of radio you were using you weren't trying to use the usart as a radio.

No, This is still in question. I think the largest possibility is I am getting signals from the ghost world and they are attempting to possess my arduino.

you are probibly just picking up random garbage, since the pins are essentially just floating.

Edited by Nuke
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...