PIC microcontroller project - help?!

Ask and answer questions, share tips and resources for installing lighting and other electronics in your models.

Moderators: Sparky, Moderators

Post Reply
FrankC
Posts: 9
Joined: Tue Jul 11, 2006 12:09 pm
Contact:

PIC microcontroller project - help?!

Post by FrankC »

Hi,

I was wondering if there were any microcontroller experts out there that can help point me in the right direction. I was thinking about building a SS Probe Droid and wanted to have it move, light up, sound, etc. I noticed online that Hyperdyne made a board that did that but I wanted to try and do it myself to avoid the costs. I have a board to program the chip but I'm just lost on the code.

Is there anyone out there that knows how to write code? I think this could be an interesting project for the board.

-Frank
Styrofoam_Guy
Posts: 638
Joined: Wed Oct 12, 2005 1:58 pm
Location: Toronto Canada
Contact:

Post by Styrofoam_Guy »

You might want to look into the PICAXE. All you would need to know is how to write basic language.

I think it is much simpler then code
jwrjr

Post by jwrjr »

I write PIC code in ASM. (I can't see why people think that it is difficult.) What did you have in mind (other than what it says in the post)?
FrankC
Posts: 9
Joined: Tue Jul 11, 2006 12:09 pm
Contact:

Post by FrankC »

This is what I'm trying to accomplish:

http://www.youtube.com/watch?v=4cuLv2dVbnk

I'm just not sure how to write code to make the chip do that. I have the Velleman K8048 PIC programming board which I believe will be able to transfer the code to the PIC but when I start to learn the code I get lost with the servo movement, etc.
jwrjr

Post by jwrjr »

None of the individual parts are particularly difficult, although doing them all on one chip might pose a problem. It all depends on how you want to store the sound. You have twio choices there (that I know of, there may be more). The ISD sound storage chips have advantages, but can be tricky to use. Or you can store the sounds on EPROM. Technically straightforward, with a lot of tedious wiring. The biggest problem with sound playback is that Microchip doesn't make any controller chips with enough memory to store the sound onboard.
The light control is easy. The servo control (it looks like it uses a radio control servo) is just a matter of generating pulses. But if you want to choreograph the motion, programming the motion is a little more complicated.
The bottom line, I am afraid, may be that it will be better to buy the controller. But if you still want to do it yourself, I may be able to help.
FrankC
Posts: 9
Joined: Tue Jul 11, 2006 12:09 pm
Contact:

Post by FrankC »

Okay, so i have a question - can I activate the PIC with something like this - http://www.electronickits.com/kit/compl ... /ck209.htm

to trigger the servos and this sound card http://www.electronickits.com/kit/compl ... ck1212.htm

So, before I give up - can I program the PIC to activate with the motion sensor and make 2 servos move to extend the antenaes (micro servos), a third servo to rotate the head, fade the light up and trigger the sound card? after a few seconds the light would fade out and the servos would return to position one.

If I'm out of my mind let me know, but if you can help make this happen with me I would really appreciate it.
jwrjr

Post by jwrjr »

The answer to all but your last question is "it should be possible". As for your last question, the answer would be "that depends. If this is your first programming attempt, it could be troublesome. If you have written programs before (and just need a little guidance), it should be "do-able".
FrankC
Posts: 9
Joined: Tue Jul 11, 2006 12:09 pm
Contact:

Post by FrankC »

jwrjr - thanks so much for all your info.

Styroguy - thanks for the tip on PICAXE, I never knew that existed and Basic does seem easier to understand.
jwrjr

Post by jwrjr »

You are entirely welcome. I like to see people make the most that they can in lighting their models (or props, or whatever).
Post Reply