Analog joystick controlling stepper motor

Click For Summary
SUMMARY

This discussion focuses on using an analog joystick to control a stepper motor and a relay circuit. The primary suggestion is to utilize the 68HC12 microcontroller, which includes an A/D converter, for this project. An alternative recommendation is the Z8 Encore Flash microcontroller, which is also programmable in C and offers an 8-bit architecture. The conversation emphasizes the importance of implementing a dead band to prevent erratic behavior due to joystick centering issues.

PREREQUISITES
  • Understanding of microcontrollers, specifically the 68HC12 and Z8 Encore Flash
  • Familiarity with analog-to-digital conversion (A/D) techniques
  • Knowledge of stepper motor control and stepper controllers
  • Proficiency in C programming language
NEXT STEPS
  • Research the specifications and programming capabilities of the Z8 Encore Flash microcontroller
  • Learn about implementing dead band techniques in joystick control systems
  • Explore stepper motor controllers compatible with the 68HC12 microcontroller
  • Investigate alternative microcontrollers with built-in A/D converters for cost-effective solutions
USEFUL FOR

Electronics hobbyists, embedded systems developers, and anyone interested in integrating joystick controls with stepper motors and relay circuits.

frogdogbb
Messages
45
Reaction score
0
Hi all,
I want to use an analog joystick to control a stepper motor and also power a relay which powers a second circuit. When the joystick is pressed side to side I want the stepper motor to turn at a rate dependent upon the position of the joystick. If the joystick is pressed forward or backward I want to close a relay. I want both to be on in the intermediate positions like forward and left ...etc. I am trying to figure out the cheapest and best solution for this. I thought about using a 68hc12 microcontroller with the A/D converter only because I have experience with these. But I am open to easier cheaper solutions. I would like to use C programming. Any ideas on how to get my idea off the ground would be much appreciated. Thanks
 
Engineering news on Phys.org
Sounds like you have a good start.

I'd use one of the joystick buttons to activate the relay, simpler than a 2nd AD.
I don't remember off the top if the 68hc12 has built in AD, but if it doesn't I'd change to a Up that does.
Also you would need a Stepper Controller, the Up won't be able to drive that directly.
And you might need some sort of position feedback from the stepper, unless all you care about is rotation speed and direction.
 
the 68hc12 has an A/D in it. I really need the relay to operate off the joystick so I figured I could just use two channels of the A/D, one for each direction. I don't need a position sensor it is not neccesary.
 
You could probably still get away with one channel AD.
If the joystick centered(null) position is <stop> define the dead band to disengage the relay.
Joystick mechanical centering is kinda sloppy, so you need this dead band anyway to keep the thing from hunting.
 
frogdogbb said:
Hi all,
...I am trying to figure out the cheapest and best solution for this. I thought about using a 68hc12 microcontroller with the A/D converter only because I have experience with these. But I am open to easier cheaper solutions. I would like to use C programming. Any ideas on how to get my idea off the ground would be much appreciated. Thanks


try Z8 encore flash microcontroller, it is programmable in C
8 bit architecture, flashed base RAM..
for more info visit:

www.zilog.com[/URL]
 
Last edited by a moderator:
Both the main electrical cable (three-phase, line to neutral=230V, line to line =400V, 50Hz) and the water supply line(ppr pipe) are underground, below the earth in the garden, located next to each other, the main electrical power has damaged insulation, bare live line is exposed to a water leak from a broken main potable water line. So fault contact happen before RCD. Could this situation be dangerous, especially if a person is showering at the same time? I am trying to understand whether...

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
474
  • · Replies 3 ·
Replies
3
Views
11K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 14 ·
Replies
14
Views
5K
Replies
1
Views
3K
Replies
21
Views
2K
Replies
17
Views
3K