Asking for some PIC guidance

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi there,

Apologies in advance if I didn't pick quite the right newsgroups to
post this in.  I'm a total newbie to PIC use in robotics or motor
actuation, however I'm very familiar with embedded development concepts
(Assembly on embedded M68K FPGA, etc).  I'm very familiar with
languages like C, Assembly, and Basic.  What I want to do is drive a
12V DC motor based on several sensor inputs.  When sensor inputs
change, I want the motor to spin in the opposite direction from last
time.  The logic would be very simple, and I need the hardware to be as
compact as possible.  We're talking drive currents in the neighborhood
of several amps.  Where do you suggest I start (buying hardware,
learning resources, etc)?  Thanks in advance for all suggestions!


Re: Asking for some PIC guidance

Quoted text here. Click to load it

Budget? For hobby or is this a commercial project?


Best regards,
Spehro Pefhany
--
"it's the network..."                          "The Journey is the reward"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Asking for some PIC guidance
Spehro,

Right now it's a pet project of mine that has the potential of turning
into a commercial venture if successful.  The budget is couple hundred
dollars at most.  Any ideas?


Re: Asking for some PIC guidance

Quoted text here. Click to load it

That's not quite enough for your parts and the tools I'm personally
familiar with, so I'll leave it to others for specific advice.

I suggest you stick with assembly language and the free MPLAB
development software, which you can download from Microchip. These are
simple devices, your application is not complex, and your learning
curve will probably be less if you don't have to wrestle with another
level of software.  

You may wish to join the piclist. For hardware design, Art of
Electronics is getting a bit long in the tooth (2nd edition) but
should be more than sufficient for your purposes. You'll probably end
up using at least one power MOSFET for the drive (maybe 4 in an
H-bridge or maybe one and a reversing relay).

Your project sounds very simple, and any of the 14-bit instruction
PICs should be able to handle it. Maybe a 16F88 or something like that
if there are enough pins.


Best regards,
Spehro Pefhany
--
"it's the network..."                          "The Journey is the reward"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Asking for some PIC guidance

Quoted text here. Click to load it

Or... download the free C18 'C' compiler (for educational purposes), and use
that. Then you can divorce yourself (not totally), from the PIC
architecture. Of course this means using a PIC18 device. Overkill but hey,
pet projects are about learning as well.
Jim
www.picmodules.com



Re: Asking for some PIC guidance
Quoted text here. Click to load it

Since the PIC aspect sounds incidental, you could try
http://www.zilog.com/z8encoremc/index.html

That's a working Motor Control system, [ PowerFETs and all ],
with USB debug, C compiler, and Motor, all for $199 ?

-jg



Re: Asking for some PIC guidance

Quoted text here. Click to load it

There are application notes on the microchip site for driving small dc
motors.


Re: Asking for some PIC guidance

Quoted text here. Click to load it

If you are familiar with the 68K you are going to find the PIC architecture
and its assembler strange to say the least. You might be better to use a
small Motorola 8 bitter like the HC11 for example..

Ian

Re: Asking for some PIC guidance

Quoted text here. Click to load it

Well, I see news:alt.fan.robotech, news:alt.robotware,
news:alt.sex.fetish.robots, news:alt.tv.robotech,
news:can.schoolnet.robotics, news:comp.robotics,
news:comp.robotics.misc, news:comp.robotics.research, and
a couple with prefixes like fj., sachsnet., and tnn.

Basic on-off/back-and-forth motor control isn't very hard, but
this one has been done to death, so to speak.

Have Fun!
Rich


Re: Asking for some PIC guidance

Quoted text here. Click to load it

Advise to split up the problem first.
One part is the motor and its driver electronics. Regardless of what micro
you're going to use, you need a unit with two control lines: One on/off and
one right/left. Keep in mind that a motor that runs on several amps may have
tens of amps inrushcurrent. I'd want to have a complete and reliable unit
before connecting it to a micro.

Second are the sensors you spoke about. Are they digital or analog? How many
of them do you need? The answers to this questions have major influence on
the micro you need. Keep in mind that sensors almost always need some kind
of adaption that varies from a single R to a full flesh bufferamplifier.
Especially long lines can cath disturbances that may even blow a micros
input pin.

Knowing the above, the choice of a PIC will not be very difficult. The
smallest (and cheapest) that suit your needs wil be the best. (So number of
I/O-pins, AD-convertors and so on.) As your code does not seem to become
very long, program space will hardly be an issue.

You will need some tools to work with a PIC. If your time is expensive
and/or time to market is an issue I'd buy a good (!=cheap) developmentsystem
from Microchip. As you have experience in C a Hi-Tech compiler will be a
good choice. On the other hand, if you're on a low budget, download the free
MPASM development software from Microchip and find a simple programming tool
on the net. A good intro and a programmer can be found on:
http://www.voti.nl/swp/n_index.html
But a little google will show you much more. As you have experience in
assembler programming, you will meet little problems. The only thing you
always need is the data sheet of the PIC at hand.

One thing I wonder is the motor direction. If it has to change when a sensor
is triggered, where does the initial direction comes from? Unless it's in
the nature of the thing you want to control, IMHO toggling is a risky way of
controlling.

petrus bitbyter





 



Site Timeline