![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| PIC Programing / Design Discuss programing of PIC chips here and design of electronics using PIC chips. |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
I have been reading a lot about building BDC Servo Drivers. And was wondering if any one has tried out any of these. http://www.e-sonic.com/whatsnew/Micr...nput/AN532.pdf or http://www.datasheetarchive.com/preview/683956.html From what I have read microchip stuff seems to be the most intuitive for me. And after reading through the pdfs the simple design of the dev boards looks like something that I could handle. |
|
#2
| |||
| |||
| Hi there, Just a quick background on me, I am a Electronics Technologist, IE: I design embedded systems for the most part. In my experience with learning and using microcontrollers is that PIC's are the easiest to learn because of their small command set(34 instructions) compare to motorola or AVR's (130ish). I also looked at those application notes and both are very doable since Microchip makes good app notes, I don't know your packground but if you are less than electrically inclinded I would probably lean towards the AN718 since it doesn't take much figuring for the electronics and it mostly code which seems to be mostly given. The other(AN532) gives all the schematics for making the controller with alot of descrete parts, and also most of the code. Either way this is going to take alot of effort but after you have it figured the first time you will be able to make as many as you want. |
|
#3
| ||||
| ||||
| I am a Mechanical/Design engineer by trade. And also have a lot of IT and computer programming skills. I have learned quite a bit about electronics hands on over the years but this would be pushing it to venture alone. My brother in law is an Electronics Engineer and he said that he would help me out with it. He is a little unfamiliar with the application as he mainly works with RF stuff. So any guidance by an experienced hand is welcome and appreciated. I am not looking to mass produce them or anything just to learn more and pay it forward. |
|
#4
| |||
| |||
Hi , Just some additional comments: (a) You first need to look at your requirements, the PID implementation here may be more than you need. Figure out how much mass you are trying to position, how much friction you have and how quickly you are trying to move it, and how much backlash you have. A simple proportional only control with deadband does surprisingly well. (aa) Do you need profiling capability? (i.e. synchronised motion between two or more motors) this adds a lot of extra complexity, and may lead you to using a larger chip that drives two or more axes. (aaa) How are you planning to drive the servo controller?, there are two basic flavours, using a "goto xxxx" command through a serial port or using a step and direction input to emulate a stepper motor. (b) I'd recommend first buying a micro on a header board (you can plug this into a bread board and play with it without lifting a soldering iron) or a development board (eg from http://www.olimex.com/dev/index.html , e.g. the PIC-P18 ), . Get some software you can handle, and a programming cable. (this shouldn't cost more than $200 all up). As I'm in Australia I can get all my stuff from Dontronics (www.dontronics.com), but in the US you have a larger supplier base, hobbyengineering.com has a good collection of microcontroller kits. (http://www.hobbyengineering.com/CatPCPROTO.html) (c) ensure your system incorporates an in-system programming cable and a serial port - both of this are critical for rapid debugging and development. DON'T buy a dedicated programmer, this will be a waste of money (until you start manufacturing hundreds of servo controllers!) (d) Be aware that most of the H -bridge IC's on the market tend to be a bit optimistic on the current ratings, and that in most servo motors the peak currents can be very much higher than the average current. (e) The pitman motors are a good choice for prototyping, you can get them on Ebay for ~ $20 , but don't expect to be able to move heavy payloads with them, they will drive printheads and the like. Once you move to bigger motors you will probably need to change to discrete MOSFETs on the H bridge. (f) While you are experimenting it is a good idea to put a small filament bulb in series with your motor (automotive stop lamp or headlight depending on motor size), this makes the whole system less edgey, and if the servo system oscillates or the motor hits a stop, it just lights up the bulb rather than smoking the driver chip. (g) Be aware with most micros that some of the pins have multiple functions, so check the data sheet to see what you are sacrificing to get your desired features. This is important with PWM pins as PWM mode usually disables some other timer function. Personally I prefer the Atmel AVR range, but this preference dates back 10 years or so ago when ATMEL had EEPROM, ADC's, crystal oscillators, and FLASHRAM on chip. I also prefer to code in BASIC , and compile this using the MCS-electronics compiler. But there's no obvious reason to prefer AVR or PIC (it's the same choice as GM vs Ford). It usually boils down to which one has peripheral I/O functions that best match your application. Cheers, BobT |
|
#5
| |||
| |||
| given that you want to learn I would go with the app note 532, because it is easier to modify but works in a similar fashion. Hopefully money isn't much of an issue cause most of the cheap programmers for PIC's can't program the one they suggest and the other programmers are fairly expensive. Any specific questions just ask I will help as much as I can. |
| Sponsored Links |
|
#7
| |||
| |||
Hi, The topic is the one I want to work on. We can make some experiments and share the results in a project page. can someone do this documentation and project management stuff? I want to suggest you an atmel based platform which is free for the experiments. please check http://www.arduino.cc/ |
|
#8
| ||||
| ||||
| Wow thanks for all the great advise! I am going to just try it out with a small motor on a bench to start with. I would like to use step and directions signals from a PC. I have read through most of the note's on the PIC16F 18F and 30F on the microchip site. And they have a lot about the feed back and control loop. But I don't see any mention of any thing other than ASCII commands for positioning. Is this something I could program the PIC to do? Or should I just order a couple and learn a bit more by playing with them? |
|
#9
| ||||
| ||||
| After a bit of research I bought a few DSPIC30F's to play with. After all the documentation I have went through it makes a lot more sense to me now. Reading about these looks interesting! you could drive BLDC, BDC and I think steppers off this thing with some creative programming. I will post some info after I get something spinning. |
|
#10
| |||
| |||
| The only thing that might be an issue for you unless you can program plds, is that you might have to implemenet the encoder pld as discrete logic instead of using a pld. Other than that, it looks like a fun project! AND, in fact, the link http://www.datasheetarchive.com/preview/683956.html has a pdf wherein just such a circuit exists using a pair of d flipflops! This is for a quadrature encoder. Last edited by Horsedorf; 10-22-2007 at 03:17 PM. Reason: adding link |
| Sponsored Links |
|
#11
| ||||
| ||||
| This is the one that I am getting it is A DSPIC30F4011 http://ww1.microchip.com/downloads/e...Doc/70135E.pdf It says it has a quad A and B interface module. I found an example on the web but it is uses an opamp instead of an Hbridge. And it says it uses quadrature for the input. http://members.shaw.ca/swstuff/dspic-servo.html Once I get the chip's I can start playing and it shouldn't take me long to learn it's lingo. I have programmed different stuff in C before so it makes it a little easier. I am thinking I will need to code something to use the discrete logic to collect the step pulses and direction signal and couple this to the rest of the loop. |
|
#12
| |||
| |||
| Ah, good. I presume you already have a pic programmer so that you can program those puppies when they show up. That schematic looks ... uh.. kind of odd to me. For example, the use of +/- 25 volts to drive the motor seems like it would be a pain in the rump. I'm not sure why they wired it up the way they did.The use of quadrature input on the dspic , if it has that built in, should work out well. I also don't see any inputs other than the serial port, so I'm assuming it's a vector based implementation. (I'll have to look at it more closely tomorrow), and if so, you can just use the direction and step pins to increment or decrement the target location, and HOPEFULLY, if the code is well written as it stands (Again, I'll sneak a peek at it tomorrow), then it will jsut move the motor to the desired location... OH! I get the voltages now, yeah, it's an opamp in unity gain mode, so it will try to allways drive the output to equalize the inputs. So when you drive teh output, you will be using a voltage from the pic, (Pin labled as RE2) and the current limit is set by varying the voltage to the ilim pin on the op amp. HUH... not sure if I like it, but it looks like it would work. ![]() and 7.5 amps is a lot of current. That could turn a pretty hefty motor. Okay, I lied, I'mlooking at it now. ... cmd_posn is the variable you want to modify to make the servo seek to a new position.Rick Last edited by Horsedorf; 10-22-2007 at 08:35 PM. Reason: add finding. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help with servo and servo drive | littlejohn | Servo Motors and Drives | 0 | 09-14-2007 06:22 PM |
| Servo drive / Servo Amplifier | Ken_Shea | Servo Motors and Drives | 9 | 07-10-2007 06:12 PM |
| pm feild servo servo | eloid | Servo Motors and Drives | 4 | 03-03-2007 05:27 PM |