Dc motor control for a selected time

Hi there,

Being couraged by the " there is no stupid question " thing, I!m asking this clever :) question.

I want to control two dc motors. First of all I want to press a button several times (ex. 5 times). After completing the counted press session I will press a second button and the first DC motor will begin to rotate. It will resume rotating for 5 seconds (time differs lineerly by the input press counts, ex. 5 press - 5 sec., 7 press - 7 sec., 23 press - 23 sec. etc. ) and after that it shall stop. After one second ( constant value ) the 2nd dc motor will rotate for two seconds (const.). After the 2nd dc stops there will be 1 second break and the 1st dc motor will again work for 5 seconds without entering value again. And after that the same process will go on again and again... Until a third button is pressed the working should continue.

- the dc motors will always run at max. speed and just one rotation. So May I use just transistors to run these motors?

- what is the scheme of this project?

- what is the code?

:) I know I want so much. But I know again, it's so simple for most of you. I will be pleased If you help me

Thank you very much...

• Yes, a single transistor

• Yes, a single transistor (MOSFETs are typically better for motor drivers than BJT transistors) will be able to drive the motors.

• Do you mean schematic? We need more information, i.e. power supply, physical size, motor specs, controller type, button type, etc.

• Code also depends on the controller type.

Yes I mean schematic. Power

Yes I mean schematic. Power supply will be a PC psu, which will be enough for two 0,5 A - 12 V dc motors. I think I had taken them from an old fax mach. or something else.

Button type is a simple button that gets contacts “close” when you press and “open” when you leave. But I’m sure there will be parasites , so the code should prevent the pic miscount one press as many presses.

controller is something you should decide I think. BecauseI can’t participate in writing the code. If you ask me what codes have you seen up to date, I would say just 16f84 and a 32 bit PIC (microchip) (( I have a : http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2603 and its I/O board http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2615&dDocName=en535444 , I had not used both of them, just bought with a hope but can’t learn without a course or something, and there is no course )).I also have a programmer kit for 16f84.

Thank you vey much for your help.

The PIC32 starter kit you

The PIC32 starter kit you bought should have a series of examples and tutorials included on the CD, I suggest you try those out and become familiar with the hardware. Even if someone writes the code for you, it’ll be hard to figure out how to add the code to your PIC micro without knowing how to use the programmer and Microchip IDE tools.

Do you have any experience with any kind of programming? There are a few different choices for programming that PIC micro, it’s probably a good idea to start with one that’s similar to any languages you might have used before.

Regarding your button, you
Regarding your button, you can take either a hardware or software approach to ensure you only get one trigger event for each button push. Search for "debounce" circuits and progamming examples.

thanks
Thanks again, I will read some examples and try to make one again. But it seems worthless, because its too complicated. And I am just at the first point of beginning :slight_smile: thanks anyway