Helpful ReplyHot!Step and Direction commands

Author
mr_si
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2018/08/08 07:57:41
  • Location: 0
  • Status: offline
2018/08/09 04:38:38 (permalink)
0

Step and Direction commands

Hi all,
 
I am new to the world of PIC (I've been aware of PIC for decades since my Computer Science degree, but have never used one).
 
I am currently involved in a project where we wish to use a Stepper Motor with its own bespoke stepper drive unit which are both obtained from the same manufacturer. I have been using an Arduino Mega to send step and direction instructions to the stepper motor drive, utilising a header file called AccelStepper.h, which is designed to allow sending such instructions to a driver rather than having to think about building your own H-bridge motor drives.
 
What I need to know is, is it possible to use a PIC to send the same instructions? I basically ramp up the stepper, run it at a specific speed (which does not change) for a period of time (say, 5 minutes) when a momentary button is pressed or a digital High command is received from an RF receiver/decoder output, or until the button is pressed or RF digital low is received again.
 
Which PIC would I need to use look in to using and are there any particular instruction sets you could point me out to?
 
I appreciate it is possible to program in C, but it's often preferred to program in assembly code. Last time I coded in assembly (8086) it was about 18 years ago.
 
I was encouraged to look in to PIC rather than putting an arduino in each machine we are planning to manufacturer due to the ruggedness of the PIC, the reliability of them, and the inexpensiveness of them.
#1
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
Re: Step and Direction commands 2018/08/09 04:57:20 (permalink) ☄ Helpfulby mr_si 2018/08/10 03:59:48
0
On average, I'd use a PIC24, basically anyone - unless you're short on price and/or size.
 
Most PICs will handle stepper motors, and only if you also want microstepping you may look for those "enhanced-PWM" ones

GENOVA :D :D ! GODO
#2
katela
Super Member
  • Total Posts : 921
  • Reward points : 0
  • Joined: 2013/06/11 05:25:18
  • Location: South Africa
  • Status: offline
Re: Step and Direction commands 2018/08/09 06:21:00 (permalink) ☄ Helpfulby mr_si 2018/08/10 03:59:36
3 (1)
You can look at this Stepper motor design center page at microchip website. There are some advises on which PIC to use, some application notes, development tools etc.
It can be a starting point.

Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
YouTube Tutorials: https://www.youtube.com/user/StudentCompanionSA
#3
NKurzman
A Guy on the Net
  • Total Posts : 16272
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Step and Direction commands 2018/08/09 09:52:48 (permalink) ☄ Helpfulby mr_si 2018/08/10 03:59:57
3 (1)
Since you did not add any limiting features, Many PIC16F1xxx and PIC18 chips would be fine.  As well as PIC24s.
#4
mr_si
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2018/08/08 07:57:41
  • Location: 0
  • Status: offline
Re: Step and Direction commands 2018/08/10 01:53:38 (permalink)
0
Thank you all so far.
 
In all likelihood, if I do go PIC route, I'd get an experienced programmer to code it for me and design any particular circuitry as I work above an electronics firm who use PIC in loads of stuff.
 
I was just considering trying to learn it enough to understand what's going on.
#5
Mysil
Super Member
  • Total Posts : 2879
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: Step and Direction commands 2018/08/10 03:51:35 (permalink) ☄ Helpfulby mr_si 2018/08/10 03:59:23
5 (2)
Hi,
Generating Step and Direction commands for a Stepper motor with a PIC microcontroller,
as 3.3 V or 5 V TTL/CMOS level signals, is not much different from flashing 2 LEDs,
at a frequency and pattern of your choice.
As such, it is a reasonable learning exercise.
 
You may start with any of the 'Curiosity' development boards from Microchip,
http://www.microchip.com/DevelopmentTools/Listing/31241075-647e-4383-b559-5573db019895
the simplest is: http://www.microchip.com/developmenttools/ProductDetails/PartNo/DM164137 
the PIC16F1619 that come with the board is adequate for the requirements stated in message #1.
 
There are tutorials on Microchip website,
and also here: https://www.studentcompanion.co.za/introduction-to-microchip-xc8-compiler/
and Gooligum tutorials: https://www.gooligum.com.au/PIC-tutorials
 
There is a Simulator available in MPLAB X, that may be used to get familiar with the software tools,
until you have hardware available.
 
    Mysil
#6
Jump to:
© 2018 APG vNext Commercial Version 4.5