dsPIC33FJ256GP506A micro-controller for many purposes

Status
Not open for further replies.

alphaxindia2012

New Member
Thanks reading my query.

I want to run 8 dc motors (forward, reverse and brake). 8 Potentiometers to get digital position of output shaft. I also want to control voltage of DC motors (all 8) so that its RPM can be manipulated.

DC motors are small size 6vdc upto 500mA current drain.Standard analog potentiometers are to be used.

I want to control above devices from ethernet (ENC28J60-Ethernet-Module) with SPI.

I want to Program dsPIC33FJ256GP506A microcontroller for this purpose.
Is my selection of MCU correct? Can I control 8 motors and 8 A-D values of Potentiometers by connecting ethernet?

MCU has Memory of 256Kb, and RAM 16384 bytes. Other specs are:


Analog-to-Digital Converters (ADCs):

Up to two ADC modules in a device 10-bit, 1.1 Msps or 12-bit, 500 Ksps conversion:- 2, 4 or 8 simultaneous samples- Up to 32 input channels with auto-scanning- Conversion start can be manual or synchronized with 1 of 4 trigger sources- Conversion possible in Sleep mode- ±2 LSb max integral nonlinearity- ±1 LSb max differential nonlinearity
Timers/Capture/Compare/PWM:

Timer/Counters, up to nine 16-bit timers:- Can pair up to make four 32-bit timers- 1 timer runs as Real-Time Clock with external 32.768 kHz oscillator- Programmable prescaler Input Capture (up to 8 channels):- Capture on up, down or both edges- 16-bit capture input functions- 4-deep FIFO on each capture Output Compare (up to 8 channels):- Single or Dual 16-Bit Compare mode- 16-bit Glitchless PWM mode
3-wire SPI (up to 2 modules):- Framing supports I/O interface to simple codecs- Supports 8-bit and 16-bit data- Supports all serial clock formats and sampling modes
 
You may be able to do that project with one PIC33F but it is NOT a beginner project.

What you seem to be describing are 8 individual closed-loop DC "servo" systems, using a pot and ADC for each servo's rotation feedback.

Even just getting one ADC driven DC servo working well is a fairly comples task, but combining 8 individual and simultaneous servo systems in one PIC is going to take quite a bit of skill, as will including real time ethernet capability.

The project is possibly do-able but sounds like the type of project a professional coder would take a few weeks doing and charge you >$5000 for.

Maybe as an alternative you could use RC hobby type servos, these are complete with the closed loop servo action and you just need to send them a pulse duty signal to set their position. The project would get many times easier, and also similar things are available readymade from hobby robotics outlets;

**broken link removed**

Mini Maestro 12-Channel USB Servo Controller (Assembled)
https://www.pololu.com/catalog/product/1352
 
Hmm,

It is possible, if you try to drive the motors directly with the PIC something bad WILL happen mind!! For full control over the motors in the safest way (I presume they are standard DC motors and not servos / steppers etc) is to use a high side and low side driver with effectively an H-Bridge for each motor.
ADC's and DAC's etc can be read / written fairly simply, I have used them to drive a pan tilt for a CCTV camera, to get the positional feedback from the motor (and drive the motor), there is some pretty meaty components on our board for driving the 2 motors used in that assembly.

Controlling the voltage can be done via PWM, again, quite simple stuff.

The good thing about the micros is that if you don't have enough on board peripherals you can get IC's to extend on the I2C / SPI bus for extra ADC's, PWM Channels and DAC's for example.

But, as Mr RB has mentioned, it is NOT a beginner project!

It took us 3 months to get the fine control over the motors we needed, and a LOT of experimentation!

With writing the software, doing the electronics, testing, writing the PC software it took the best part of a year!

To be fair, if you know which parts you will be using you can probably half that time! And if you are not constrained to several specifications you can probably say between 2-6 months depends how fast you work.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…