Robotic Arms with PIC

Hello Mr. Aswinth,
I have her circuit for controlling her robotic arm
rebuilt and used their program without modification to the test of the circuit.
SR2-SR5 work as well as the LCD display
from A-D everything OK. but SR 1 on pin 21 of the PIC does not output a signal, likewise the display E does not show.
I rule out a wiring error
how could i find the mistake what can i do?
Many thanks for your help
With best regards
Herbert Wichmann

 

I think the problem is with setting the PWM registers. Are you using the same controller PIC16F877A with the same crystal value?

Try starting with a simple program to generate PWM signal and control a servo motor. This will give you a better idea of how it works. Use proteus to simulate the results. This link might be helpful 

https://circuitdigest.com/microcontroller-projects/interfacing-servo-motor-with-pic16f877a 

 

  Joined August 16, 2016      998
Tuesday at 12:29 AM

Hello Mr. Aswinth,
Thanks for the feedback,
yes the quartz has 20MHz u. the PIC is a 16F877A
in the diagram of you are the load capacitors on the quartz with 1uF I take as a load capacitors 27pF but there is probably not the problem or?
I'll take a look at your suggestion and try
to understand and apply this.
Thanks again for your help and especially thanks for your explanations and circuits.
With best regards
Herbert Wichmann

  Joined March 02, 2019      23
Saturday at 03:56 PM

in the diagram of you are the load capacitors on the quartz with 1uF I take as a load capacitors 27pF but there is probably not the problem or?

The load capacitor is only to provide a smooth current and prevent the servo motors from shivering. So it is not the problem.

If you have a scope please probe the pin and check what you are getting. If not try using proteus 

  Joined August 16, 2016      998
Tuesday at 12:29 AM

in the diagram of you are the load capacitors on the quartz with 1uF I take as a load capacitors 27pF but there is probably not the problem or?

The load capacitor is only to smooth the current and prevent the servo from shivering, it is not the problem. If you have a scope try probing the PWM pin to check what you are getting, if not use proteus simulation 

Thanks for the words, glad I was helpful 

  Joined August 16, 2016      998
Tuesday at 12:29 AM

Hello Mr. Aswinth
I have with the oscilloscope
all port outputs measured
the PWM Singnale can be
at the outputs SR2 to SR5
measure and with the pots 2 to Poti5
Also adjust how you like it in your program
and describe your documentation. Also in
LCD display will be displayed from A to D and so on.
Only at the output SR 1 pin 21 I measure absolutely nothing, not even when adjusting the pots No matter what potentiometer I take, the voltages at all
Potis can be set from 0 to +5 volts,
and the set tensions come
also on the pins of the PIC. I have
Try a new PIC 16F877A with the
Original hex file recorded by you, but the error on pin 21 SR 1 is still present.
What else can I do with my little experience, so do pin 21 a PWM Singnal
outputs.
Which lines in the program are for the port RD 2
Pin 21 responsible? It is so synonymous when pressing the Poti 1 absolutely nothing Displayed.

I would be glad if you despite me
my very little experience could help.
Thanks for your efforts
With best regards
Herbert Wichmann

  Joined March 02, 2019      23
Saturday at 03:56 PM

Hello Mr. Aswinth
I'm getting the error why pin 21
no Singnal is not spent on the track.
Do you have any idea what I can do with it
also at pin 21 the PWM Singnal is output.
What else can I try?
Thank you
Yours sincerely
Herbert Wichmann

 

  Joined March 02, 2019      23
Saturday at 03:56 PM

Sorry Herbert, but I find it hard understanding your question. Are you telling that except for pin 21 all other PWM pins are working? Have you tried the simulation?

What does your LCD show when you are trying to control pin 21? Also check if the ADC for pin 21 is working 

  Joined August 16, 2016      998
Tuesday at 12:29 AM

Hello Mr. Aswinth
Thank you for your feedback and help.
Everything works outputs SR2-SR5 work.
Only output SR 1 pin 21 does not work, even with the oscilloscope I measure nothing at pin 21.
I can not serve the simulation yet.
Thank you
Yours sincerely
Herbert Wichmann

  Joined March 02, 2019      23
Saturday at 03:56 PM

I had a similar problem with a different version of PIC and the problem was with the fuse bits. 

OR 

May be the PIC is not getting any input signal from the respective ADC pin to trigger the PWM signal. Try hardcoding the PWM signal and check if it is working 

  Joined April 17, 2018      120
Tuesday at 07:57 AM

Hello Mr. Hiro Hamada,
Thanks for your help.
I beg my bad English to be guilty
I work with German English translators.
With the exception of pin 21, all of the other PWM pins work.
Would you please show me exactly how I have to hard-code the Fuse Bits and the PWM Singnal for verification.
So on the ADC pin can be the voltage of 0-5 volts with potentiometer 1 regulate.
I do not understand why only a single output does not work neither on the display nor on pin 21
Thanks again
Yours sincerely
Herbert Wichmann

  Joined March 02, 2019      23
Saturday at 03:56 PM

Hi Herbet, since you have told that even the LCD does not show anything. The problem should be with potentiometer on hardware side. 

Only if the PIC RA0 gets an analog voltage the LCD will display something and the pin 21 will generate PWM signal. Use a multimeter on pin 2,3,4,5,6 and check if they are getting variable voltage as you rotate the pot 

  Joined August 16, 2016      998
Tuesday at 12:29 AM

Hello Mr. Aswinth,
it's about the poti 5
which at pin 7 a variable voltage of 0-5 volts
gives off, the tension is OK.
The voltage can be regulated with potentiometer 5 at pin 7
but neither the display shows something and pin 21 has no output Singnal.

Poti 1-4 Create on press The desired display and outputs SR1-SR4 will have their PWM signals as well.

What else can I try ?
Thanks for your help
Many greetings
Herbert Wichmann

  Joined March 02, 2019      23
Saturday at 03:56 PM

Robotic Arms with PIC

December 2, 2019 - 4:14pm

Hello Mr. Aswinth,
it's about the poti 5
which at pin 7 a variable voltage of 0-5 volts
gives off, the tension is OK.
The voltage can be regulated with potentiometer 5 at pin 7
but neither the display shows something and pin 21 has no output Singnal.

Poti 1-4 Create on press The desired display and outputs SR1-SR4 will have their PWM signals as well.

What else can I try ?
Thanks for your help
Many greetings
Herbert Wichmann

  Joined March 02, 2019      23
Saturday at 03:56 PM

Hi Herbet, I do understand that neither your LCD nor your PWM signal is working. Let's break down the problem and solve thing one by one. First let's make the LCD display the value when the pot is being turned. 

" Use a multimeter to measure the voltage at pin 7. When you turn the POT you should notice the voltage on pin 7 changing from 0-5V "

After confirming this if your PIC still does not display changes on LCD then maybe that particular pin on your PIC is damaged. Try changing the PIC controller 

 

  Joined August 16, 2016      998
Tuesday at 12:29 AM

Hello Mr. Aswinth,
At pin 7, the voltage can be
from 0-5 volts with the potentiometer 5
but nothing happens on the screen.
and at pin 21 output SR 1, nothing works.
Have exchanged the PIC but it does not work.

All other pins work.

Thanks for your help
Many greetings
Herbert Wichmann

  Joined March 02, 2019      23
Saturday at 03:56 PM

Hello Mr. Aswinth
I found the error or it works now
thank you all 5 pots with 5 servo motors.
I have in the for loop
  for (int pot_num = 0; pot_num <0 = 3; pot_num ++) swapped the 3 for a 4.
Then everything works as it should.
About a feedback from you and a short further explanation as in this case the for loop counts, I would be glad.

Many thanks

Many greetings
Herbert Wichmann

  Joined March 02, 2019      23
Saturday at 03:56 PM

Happy that you finally got it working. I should have noticed that mistake. It somehow escaped me. Anyway cheers :-)

  Joined August 16, 2016      998
Tuesday at 12:29 AM