Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC Chip & Analog Joystick ?

Status
Not open for further replies.

Mr.Cool

Advanced Member level 2
Joined
Jun 20, 2001
Messages
664
Helped
87
Reputation
178
Reaction score
60
Trophy points
1,308
Activity points
7,111
mixing joystick outputs

i was just wondering if anyone can point me to a web site or can provide advice for a project i am doing. i have an analog joystick. i wish to control 2 motors with this joystick. i have the motor control hardware done. simple H-Bridge circuit. now i must provide a PWM signal to the legs of the H-Bridge. i would like to use the PIC 16F877 because i get them free and cause they have ability for PWM output.

my input comes from an analog joystick. This is what i was thinking. Connect Y-Axis resistor between +Vcc ang GND. add a series resistor following this formula:
Joystick Series Resistor = (+Vcc/.02) and 10K - (Joystick R)/2

input this analog signal into 16F877 A/D input.

do the same for the X-Axis input.

now i need software to do channel mixing such that ONE joystick can control 2 motors. preferably i would like this code in Pic Basic or Assembly.

thx for any help you can provide

Mr.Cool
 

joystick pwm output

code examples in 16F84 or 16F84A would also be acceptable

Mr.Cool
 

analog joystick circuit diagram

Look Application note for Siemens GMR sensors.
 

picbasic joystic

here i find an excellent example of taking ANY analog 2 axis joystick (single stick) and convert it to a serial ouput. not quite what i was looking for. i do not want a serial output. i need a PWM output. but contained within the serial output is the PWM signal. perhaps i can decifer this information with another 16F84 chip. time will tell. also using proteus would be a great help in this mannor.

h**p://www.seetron.com/guest/berg/berg_joyssc.htm

Mr.Cool
 

3 axis analog joystick

yes i have found this article. it is EXACTLY what i am looking for. except that the author does not finish the example code. the author produces the direction signal, but not the PWM speed control.

how can i modify this code to get the desired response? i need this circuit to control 2 motors


Mr.Cool
 

resistor joystick

i could use the code as is, minus the parts about serial communication.

then to achieve PWM i could take the values stored for X-Axis and Y-Axis and mix them. coincidentally i just read a post elsewhere on this subject.

Right Motor = X + Y - 255
Left Motor = X + Y

limit output to +/- 127

now, i need to see how i can get 2 PWM outputs using the 16F84! any tips?

Mr.Cool
 

2 axis joystick chip

quick question.

the schematic you posted shows the X/Y-AXIS connected through a polarized cap to ground. what would a good value be?

also, there is no power supply on this section. look the X/Y-AXIS wires simply floating free... they don't go anywhere. is this right???

Mr.Cool
 

analog joystick motor control

Author try to form voltage devider and on pic side is using picbasic POT command. So, X and Y axis must be connected to +5V. Used caps are 0.1 uF.
Command is like this:

POT pin,scale,variable

Measures resistance on "pin" by timing the discharge of a capacitor through the resistor (typ 5k-50k). "Scale" (1-255) is used to adjust for varying RC constants. If "scale" is set correctly, than "variable" is zero near minimum resistance and 255 near maximum resistance.

regards
meax98
 

rc joystick with pic

This is the circuit diagram. this is for half of the circuit the other half will be the same. i've shown switches for the joystick fwd & aft. Hope this helps. Many thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top