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.

Urgent Pic 16f877

Status
Not open for further replies.

akk182

New Member
:confused: I want to controll 2 DC motors for my robot movement (i.e. Forward, reverse, left, right) the Microcontroller I'm using is PIC 16F877. I want to use PWM to controll the dirve.

**broken link removed**

the above link shows exactly what I want but with PIC 16F877 microcontroller and PWM for drive.

I havent done much work in electronics circuit and would be very glad if someone could help me modify the circuit in the above link for PIC 16F877 Microcontroller and Pwm for drive..

HELP :(

regards
Alia
 
William At MyBlueRoom said:
The PWM pins are labeled CCP1 (pin 17) and CCP2 (pin 16) on a 16F877.
Sir i know that much :)...If you look at the link i have given.. I dont understand that incase of the latching relays in that circuit to which pin will I give the PWM?...like will i connect the PWM to the coil? so that the switch is connected for the duty cycle..
 
It's rough but should give you the info you require. I like IRF510 as a motor driver. You could also use the solid state relay.
 

Attachments

  • pwm relay.png
    pwm relay.png
    6.1 KB · Views: 596
Bill
I know its a very dum question ..but I'm new and a dum person so help me understand :)

As your figure shows the upper coil will be activated through pins 9 and 10 of the relay..so they basically controll the motor direction? say motor moves forward...

now to make the motor move in opposite direction i'll activate the lower coil through pins 1 and 2 of the relay?...

the PWM will controll the time for which the motor should rotate in either direction?
 
Last edited:
Bill

Now looking at PIC 16F877 datasheet... I can connect RA0,RA1,RA2 and RA3 to DPDT Pins 9,10,1 and 2 respectively?...Ra0 to RA3 pins are analog input/output pins....can i use port B pins aswell for the other motor? or do i need an analog in/out pin?....the circuit you posted earlier ..is it exactly what i have to make?

I read that i need a diode on the output of a relay because of high spikes on coil discharging can effect the rest of the circuit..do you agree?
 
Last edited:
Bill

Thankx alot you have been a great help :)...Right now i have 1 more question and that is with the PWM pin why do i need IRF510?..what does it do?
 
controll 2scr with 16f877 full rectifier single pahase

I want to controll 2scr with 16f877 full rectifier single pahase Microcontroller I'm using PIC 16F877. I want to use PWM to controll the dirve.:)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top