EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Asking for some PIC guidance

Started by Unknown December 11, 2005
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!

On 11 Dec 2005 16:49:15 -0800, the renowned slavinger@yahoo.com wrote:

>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!
Budget? For hobby or is this a commercial project? Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
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?

On 11 Dec 2005 18:37:07 -0800, the renowned slavinger@yahoo.com wrote:

>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?
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" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
slavinger@yahoo.com wrote:
> 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!
There are application notes on the microchip site for driving small dc motors.
slavinger@yahoo.com wrote:
> 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?
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
slavinger@yahoo.com wrote:

> 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!
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
On Sun, 11 Dec 2005 16:49:15 -0800, slavinger wrote:

> 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!
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
> 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.
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
<slavinger@yahoo.com> schreef in bericht 
news:1134348555.055868.283400@g44g2000cwa.googlegroups.com...
> 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! >
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

The 2024 Embedded Online Conference