Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

20 to 40 motor DC vibrationmotor control (on/of)

Status
Not open for further replies.

wytzaaa

New Member
Hello,

I am busy with a project that is a part of a driving simulation at University of Delft. They are working with C++ and the OS Linux. So I am fixed on that. I need to control about 20 and maybe in the future 40/50 DC vibrationmotors(Mobile) (just on/of).

So (I think) I am bounded to the following:

- Linux!!!
- C++ !!!
- indepent motor controle(matrix design?)!!!
- Real-time?(maybe it wouldn't be a big problem if I don't use a PIC and program it
well)???

Till recent I never heard of a I2C which might be something I need. What's the reason of using a I2C bus instead of a serial port? The info on the internet is a bit unclear to me. I suppose it is meant as a replacement for the serial /parallel port/usb. (or in combiation with?)
..I would like to learn more about it but the problem is I have to finish this project in 3 (max 4) mnth time (incl. learnig and programming C++). If it's worthwile looking for, maybe someone can give me some hinds were to look for. Otherwise I think Ill be focusing on the Pic controller in combination with a serial bus.

If you have any hints on were to watch out for with regard to the serial port and pic-controller I would be pleased to hear about it.

Till now I didn't find any C++ compilers under linux (mostly Viual basic or expanisve, but that was for WindowsXP) . Maybe I looked in the wrong way or do I have to write the program in "PIC (assembly?)" -languages?
Thanks alot for the info of course.

Gr. Wytze
 
wytzaaa said:
Till recent I never heard of a I2C which might be something I need. What's the reason of using a I2C bus instead of a serial port? The info on the internet is a bit unclear to me. I suppose it is meant as a replacement for the serial /parallel port/usb. (or in combiation with?)

I2C is designed for communication between IC's, not for using with a computer. Basically it was designed to make television construction easier, by having a standard 2 wire serial bus it makes large TV PCB design a great deal easier.

But I2C is fairly complicated, and no advantage for what you want to do.

..I would like to learn more about it but the problem is I have to finish this project in 3 (max 4) mnth time (incl. learnig and programming C++). If it's worthwile looking for, maybe someone can give me some hinds were to look for. Otherwise I think Ill be focusing on the Pic controller in combination with a serial bus.

That looks an easy choice, you could link them together for as many as you need - so the serial port from your PC feeds to one pin of the first PIC, another pin feeds from there to the next PIC - and so on.

You then simply give each PIC an ID number, the PC program sends out the ID number and pin that you want to turn on (or off), each PIC checks the ID against it's own, if it's not correct it passes it on the the next PIC.

Don McKenzie wrote PIC routines for this many years ago, you can download the code from his website at https://www.dontronics.com/picex.html, it also explains the system more fully. All it needs is simple ASCII text commands.

If you have any hints on were to watch out for with regard to the serial port and pic-controller I would be pleased to hear about it.

A 16F628, using an internal 4MHz oscillator, provides 16 I/O pins in an 18 pin package - using two pins for serial in and out, this leaves 14 pins available for feeding motors. There are a few restrictions on the I/O pins, but by careful selection you would be able to manage 14 motors per PIC, so two would give you 28 motors.

Don's routines aren't written for the 16F628, but would be simple to transfer to it. You could also use larger PIC's, a 16F877 would do more than 20 motors on a single PIC.

Till now I didn't find any C++ compilers under linux (mostly Viual basic or expanisve, but that was for WindowsXP) . Maybe I looked in the wrong way or do I have to write the program in "PIC (assembly?)" -languages?
Thanks alot for the info of course.

The best way on the PIC is really assembler, but if you go Don's route it's already written for you - just a few tweaks required.
 
Status
Not open for further replies.

Latest threads

Back
Top