Go to Post Engineering is all about trade offs. You can design yor system to do A, B or C easily. Combining A abd C or A and B or B and C requires some effort. Combining A, B and C should be near impossible. - Mike Betts [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-03-2004, 20:50
Salik Syed Salik Syed is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Alumni
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Stanford CA.
Posts: 514
Salik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud of
Send a message via AIM to Salik Syed
Unhappy Problems hooking up a joystick to edubot

Okay...so i want to drive the edubot via a joystick, so i solder a connecter that puts it out to PWM cables. Now the connecter etc.. works but i can't get the joystick to output anything except 255
basically the code is :

speed=Get_Analog_Value(rc_ana_in01);
speed1=speed/4;
pwm01=pwm02=speed1;
Now when i run printf says 255 all the time for speed1!
The joystick works, all the connectors are fine, but when i measure volts it always says ~5V even if you connect SIG and Ground or SIG and +5V or +5V and Ground
regardless of joystick movement!!!!>????
I went in to the code and set analog inputs to 3 etc...but before i had a gyro hooked in analog in 1 and it worked so i don't get why this doesn't work!
Any help appreciated
Salik
__________________
Team 701
  #2   Spotlight this post!  
Unread 24-03-2004, 21:34
FotoPlasma FotoPlasma is offline
\: |
no team
 
Join Date: Jul 2001
Rookie Year: 2001
Location: San Jose
Posts: 1,900
FotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond repute
Send a message via AIM to FotoPlasma
Re: Problems hooking up a joystick to edubot

Have you tried using different joysticks or potentiometers? It sounds like you either have something connected wrong or you are using a defective joystick.
__________________
I played hacky sack with Andy Baker.

2001-2004: Team 258, The Sea Dawgs
2005: Team 1693, The Robo Lobos
  #3   Spotlight this post!  
Unread 24-03-2004, 23:56
Random Dude Random Dude is offline
Oregon State Head FTA
AKA: Chris
no team (Oregon Robotics Tournament & Outreach Program)
 
Join Date: Aug 2002
Rookie Year: 1998
Location: Oregon
Posts: 142
Random Dude will become famous soon enoughRandom Dude will become famous soon enough
Re: Problems hooking up a joystick to edubot

Quote:
Originally Posted by FotoPlasma
Have you tried using different joysticks or potentiometers? It sounds like you either have something connected wrong or you are using a defective joystick.

Well, the problem is you can connect the joystick directly to the analog input of the EDU bot (or the RC for that matter), with out modifiying the joystick or adding an external resistor. (or other circuitry)

To hook a pot up to the analog input, you connect one side to +5, the other to Gnd, and the center to the input. this the creates a voltage divider such that the voltage on the signal pin varies as you turn the knob.

However, with a joystick, only one of the ends, (the Gnd side) and the wiper are wired to the connector. To hook it directly to the analog input you would either need to connect the other side of the pot in the joystick to +5, or connect a resistor from signal to +5. 50k is about what you want I think (1/2 total value of the joystick. )

The problem with the external resistor is that value read by the joystick is no longer linear with the movement of the joystick.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Joystick Problems anupalsingh Programming 0 23-02-2004 17:50
Changing 1 joystick code to 2 (rookie team) Brawler006 Programming 5 20-02-2004 17:00
quatro OI for edubot problems Benedictine1 Robotics Education and Curriculum 2 22-12-2003 12:47
robot goes haywire with the one joystick default code Miles Programming 7 24-01-2003 14:58
joystick problem archiver 2000 12 23-06-2002 23:08


All times are GMT -5. The time now is 05:19.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi