The artist that needs help!!! ;)

blocco a spirale

Joined Jun 18, 2008
1,535
You can practice PIC programming for free by downloading the MPLAB IDE from here:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002

For this application, whether you use stepper motors with an 8-pin PIC per motor or run servos from a single PIC the code will not be complicated.

For stepper motors the PIC will simply output bit patterns whereas servos require pulses of particular width. There is no need to use interrupts or timers for either.
 

theamber

Joined Jun 13, 2008
321
That is true. However, the moment our OP attempts to connect a stepper motor or servo to it, he's either going to need a LOT of batteries, or a power supply.
No a 9v rectangular battery can supply 500mAh
That might be quite a hike for the OP. The big problem is, he won't have access to the board here while he's shopping, to ask questions about what might be a good thing for him and what's not. It could seem like a rather bewildering experience.
I think a one on one duplex conversation is better than leaving messages and waiting for answers.
I'm afraid I don't see your logic. While they are indeed both motors that can be controlled via a uC, the methods used to control the two types is completely different, as you must surely know.
I said it for wiring simplicity 3 versus 4 ,5, 6 or 8 wires and because the board of education has two connectors made especially for the servos and because usually small servos need less power to operate than small steppers so he does not need to build a driver to start with nor he needs a power supply.
He does not even know yet whether to use servos or steppers. With the BS would be easy to start with servos then maybe move to steppers latter on. So he can see both in action and work the complicated ladder progressively. He is not going to do what ever we said he is going to experiment with what is available progressively then he will desire what is better. Is this logical to you now?
However, with this large of a project, he's going to need to use a rather large number of uC's, and they're all going to have to talk to each other. A Basic Stamp just won't be fast enough, and it'll be really expensive.
No, and No you need to check the Javelin BS. He can use a decoder output expander or a shift register output expander he does not need to use a whole bunch of uCs. Besides my recommendation is always been to START with ONE for EXPERIMENTATION only! Also he said the cubes will move randomly first, then at certain time of the day they all will go to a determined position; so he does not need to make them talk to each other or synchronize them he just need a central timer in each program that will run at unison and will send the pulses at unison at that particular time. He will need however small tolerances for the smallest deviation on the parts he chooses.
The PIC12 line is so inexpensive that the OP could have two PIC uP's on every stepper motor for what a dozen BS2p40's would cost him - and he sure wouldn't be able to get the job done with a dozen BS2p40s.
No, he can use something like this to extent the outputs:
http://www.st.com/stonline/books/pdf/docs/13709.pdf
You have to agree with me that BASIC is much easier to learn than C or Assembler.
You have to agree with me that he needs to start with the simplest thing first.
You have to agree too that the BS is better for educational purposes and will be cheaper to START(the reasons already exposed here) with BASIC and easier to assemble (actually the BS requires no assembly nor soldering) than PIC, actually he does not need a breadboard the board of education has one, he does not even need to solder a wire to start programming a servo with the BS.
With the PIC he needs to buy a PIC BASIC compiler software $99 or $249,a PIC chip,a breadboard, maybe a crystal oscillator,resistors,capacitors,a socket, wires, solder, a soldering station, a power supply, a PIC programmer, books.(Too complicated and expensive for a novice)

Basic stamp he needs a BS, a board of education, a BASIC compiler(Free),all the reading material to start(free) connect the servo to the board and start programming (clean cheap and easy for anyone).
As I said this is just to get him accustomed to the uC environment I do not recommend any particular one for his project, he will know what serves him better when he has a clue of what needs to be done. But all this are my opinions I may be wrong.
There is nothing wrong with SgtWooke recommendations however I think they are more oriented towards someone with more knowledge of uCs and his recommendations are also more oriented towards the realization of the project. But he is probably an Engineer with a lot of experience and I am just a layman.
 
Last edited:

blocco a spirale

Joined Jun 18, 2008
1,535
Not sure why anyone needs a $99 basic compiler for a PIC. All you need to develop PIC software is a cheap programmer. All development software is free.
 

blocco a spirale

Joined Jun 18, 2008
1,535
If you intend to program in BASIC then you will need a BASIC compiler. However, for someone starting from zero it is no more difficult to learn PIC assembler than it is BASIC.

Anyone reading that they need a $99 or $249 BASIC compiler to work with PICs might be put off. When the truth is they don't need a BASIC compiler at all. Nor do they need to buy books or a power supply or breadboard. Clearly our Artist friend will need to buy some tools and components to complete the project whatever technology is chosen.

I know we all have our favourite micros, but let's not make misleading statements about devices that for whatever reason we don't favour. The reason PICs are so popular with hobbyists is largely due to the extremely low start-up and device costs and the simple instruction set.
 

theamber

Joined Jun 13, 2008
321
Not only the price but simplicity too BS is far superior.
http://www.mikroe.com/en/books/picbasicbook/01.htm
This is a video I am sure Youtube has plenty
http://make.blip.tv/file/171566/
It just don't get easier than that.
As I said before to START for starters, for novices, for beginners, for first timers only! I recomned the BS, especially if one has no prior knowledge of eletronics.
The Artist said does not know much about electronics and you want him to start with a PIC?
As I note I preffer the PIC rather than the BS by the way the PIC is much more flexible than the BS.
As logic the less parts you have to worry about the easier it is I think. Also looks like the Aurdino plataform could be a good candidate.
http://todbot.com/blog/2006/09/25/arduino-the-basic-stamp-killer/
But I still will recommend him the BS for programming simplicity and installation in general.
 
Last edited:

blocco a spirale

Joined Jun 18, 2008
1,535
This is quite a tricky one in that we know the Artist has limited experience of electronics and software but in order to complete the project some knowledge of both is essential.

It would help if the hardware can be pinned down before we start trying to select controllers. The Stamp may be the best solution in some circumstances and the PIC in others.

I think this project is a great combination of engineering and art:)
 

Thread Starter

Artist needs help!!

Joined Jul 6, 2008
6
PHP:

Hello again everyone,

I just want to say thanks again for all your help and I'm going to dive into this so let me recap what I'm going to purchase and please feel free to add in suggestions if you think I'm missing something.

Also to make sure I'm understanding everything correctly with each component I list I am going to be saying its function for what it's for or if I'm incorrect I am sure one of you will be able to rectify my misunderstanding.

· Microcontroller : Part Number: DV164120 - PICkit 2 Starter Kit I'll be purchasing the starter kit which will have software to it allow me to program the board so I can rotate the squares in whatever direction I want
· Driver : ULN2803A This'll be installed on the microcontroller board and aid me in programming the motors to turn in whatever revolutions I desire.
· LED illuminator and light detector : could use recommendations on where to purchase one of these. This will also aid the stepper motor to stop at the positions I would like the motor to stop at.
· Stepper motors : MOTOR,STEP,7VDC/20ohms UNIPOLAR,S/A 3.6deg,.08"D SHAF these motors will provide the movement that I desire
· Power supply : ATX bench supply. This'll provide power to all the components
· Programming book: Programming and Customizing PICmicro Microcontrollers", 2nd Edition. This will be my reference guide for questions I might have for programming the microcontroller.

I've chosen to go with Stepper motors because I like to have my scope to be as quiet as possible and being that I'm a newbie to this this just seemed to be the easiest for me to understand I do appreciate all the help and advice that was given

Thanks again for the help!

Sincerely

T. N A
:)
 

SgtWookie

Joined Jul 17, 2007
22,201
Well, I'll have to say I'm pleased that you're going with most of my recommendations. :)

Have a look at this page: Microchip's Recommended Products for Stepper Motor Control
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2125&param=en026706

A PIC12F508 would be a very low-cost option for driving a single stepper motor, and would be great for learning.
However, a PIC16F684 could enable you to control two steppers with one uC, which would match up nicely with the ULN2803A that could possibly drive two steppers. (I say possibly, because it depends upon the abilities of the programmer!)

You would also have a couple of lines left over for signalling from other uCs.

Application Notes and Source Code for Stepper Motors:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2125&param=en026751

Don't worry too much about finding the home position at the moment. Just getting a single stepper motor to turn at a predictable rate is enough of a challenge for the moment.

As far as the ATX form factor power supply, see if you can pick up a few at a an electronics salvage place. No point in buying new at the moment if you can avoid it.
Your project when eventually completed will require quite a bit of power. A single supply won't be adequate.

If you are single-stepping a single motor of the type you're ordering, it will require about 1/4 ampere, with some overhead for the uC. A 250W ATX form factor supply might put out 25A. You'll need about one 250W supply per 80 stepper motors, or about four 250w power supplies for your 326 steppers.
 

theamber

Joined Jun 13, 2008
321
There is a tutorial on using the Arduino (ATmega168)
to do unipolar stepper motor control.
Checkout http://tinyurl.com/5ean3r

There is a You Tube video showing Arduino stepper motor
control. The circuit in the video uses an LED and photodiode
to limit the range of motion of the stepper motor.

Checkout http://tinyurl.com/5zqdmu

(* jcl *)

www.wiblocks.com
The artist friend he just did not get that he can use stepper motors with ANY microcontroller eviroment. That is the reason he chose the PIC.
I did recommend him the PIC for the flexibility to finalize the project, however to start for a novice I see more logic in starting with a Basic Stamp and with BASIC programming. The artist seems to be a nice person I hope he does not get discouraged and finish this sculpture soon.
 

John Luciani

Joined Apr 3, 2007
477
The artist friend he just did not get that he can use stepper motors with ANY microcontroller eviroment. That is the reason he chose the PIC.
I did recommend him the PIC for the flexibility to finalize the project, however to start for a novice I see more logic in starting with a Basic Stamp and with BASIC programming. The artist seems to be a nice person I hope he does not get discouraged and finish this sculpture soon.
I agree that any uC with the proper output buffering will work.

The reason I like the Arduino is the software environment and the large community.
The Arduino software tools were designed for non-progammmers. It is essentially
a front-end and set of libraries for GCC. You can use any of the GCC libraries
but most people just use the Arduino libraries. I know many artists and novices
that have started with these tools. Lots of examples at arduino.cc. I have a
few examples at www.wiblocks.com

Here is "Hello World"

Rich (BB code):
int ledPin = 13;                // LED connected to digital pin 13

void setup()                    // run once, when the sketch starts
{
  pinMode(ledPin, OUTPUT);      // sets the digital pin as output
  digitalWrite(ledPin, HIGH);
}

void loop()                     // run over and over again
{
  digitalWrite(ledPin, HIGH);   // sets the LED on
  delay(1000);                  // waits for a second
  digitalWrite(ledPin, LOW);    // sets the LED off
  delay(1000);                  // waits for a second
}
Another nice thing about the Arduino stuff is that there are many people making
a variety of inexpensive boards. You could use a $50 board with a USB port to develop your project and then purchase $10 boards to deploy it. Same software runs on
both boards.

Personally I like the MSP430 chips, Freescale chips and ARMs. For a novice
I really like the Arduino (which is based on the ATmega devices).

(* jcl *)
 

Thread Starter

Artist needs help!!

Joined Jul 6, 2008
6



I have a qestion for SgtWookie
What is the diffrence between Microcontroller :Part Number: DV164120 - PICkit 2 Starter Kit and PIC 16F684 ? is this an extra part I need or a diffrent microcontroller I should use


Thanks fo the help

TNH:)
 

SgtWookie

Joined Jul 17, 2007
22,201
Well, the PICkit 2 Starter Kit comes with a PIC16F690 microcontroller installed on the low pin count demo board - so you'll have plenty to keep you busy when it arrives ;)

The PIC16F684 is a different model of microcontroller.
You bought an entire starter kit, which includes a microcontroller as well as a prototyping board and a PICkit 2 programmer, and software and lessons.

Take it slowly, and go through all of the lessons, making sure that you understand everything. Read a few things, then try a few things, then take a break. :) If you find yourself becoming frustrated, walk away for a bit.
 
Top