Home
Articles
Futaba servo signal interface
2 Design and Construction
Previous
1
2
3
4
A
B
C
D
Next
The original bread boarded circuit I do not have documentation or images of so I will try and explain it. It consisted of a PIC16F877 operating at 4MHz. Connected to Pin0 of PortD was the signal line of a servo output from the Futaba receiver. It passed through a 220Ohm resistor to prevent accidental shorting, and had a 10K pull down resistor to keep the pin from floating. On Pin0 of PortB was a 220Ohm resistor linked to the base of a TIP122 Transistor. The transistors collector was tapped into the 5v line and the emitter to a small relay. This is what caused my first problem which I will explain later. Using the PULSIN (see Appendix A for code terminology) command and an IF statement I got the device to operate the relay upon moving one of the control levers on the controller.
I next designed a board. I switched to a PIC16F84 without testing it with my circuit and code. After the board was built I ran my first test. It was a simple code to pulse each output pin of the device sequentially to check for continuity and the proper workings of the relay driver. Here I ran into my first problem. The code worked fine but there was a problem which arose. The relays would not operate. By watching the device I noticed the LEDs which I had included for visual operation, were lighting but only very dimly. This had to be a problem with how my transistor was being driven or biased. I ventured to the Internet and read up a bit on the operation of Darlington transistors (the TIP122 in particular). I found that my problem was that the transistors emitter should have been directly tied to ground and the collector should have had the device I was trying to drive between it and the positive rail. I fixed this by cutting some traces on the board and putting in a few jumpers. I tested again and all the relays operated perfectly.
I then proceeded to try the code I had tested on the bread board. The device however would not detect the servo signal. I tried many different modifications of the code and none seemed to work. I bread boarded 2 of the same circuit one using the PIC16F84 and one using the PIC16F877. I determined that for some reason the PIC16F84 was not using the PULSIN command properly although the compiler didn't give any warnings about the PIC not utilizing this function as it had told me about others in the past.
From here I went back to the drawing board and started to design a replica board using the PIC16F877. Due to the fact that I had already had most of the circuit drawn up already all I had to do was copy and paste the driver section and implement it to the 16F877. I also took this opportunity to add more outputs to the board. Instead of four transistor relay drivers the new design contained eight, utilizing all of Port B and creating a possibility of controlling forward and backward motion of all four servo inputs. Two of these boards were built, one for the main drive components of the robot and one for the motors of the arm and the claw of the scissor lift that was being designed by team members Jairo, Sandra, Tim, and Andrew.
The second board I added a 12 pin ICD connector connected to Port A of the PIC16F877 and pulled to a logic High. 6 Pins were connected to pins 0-5 of Port A and the pin adjacent to each was connected to ground, to pull the pin low. This ICD connector was implemented to create ease of connecting sensors and limit switches whose states could be used for semi intelligent programming and feedback of mechanical part locations to the Microcontroller. However these ports were never used for the Skills robot and remain mostly untested other than a quick if statement to test their continuity. By removing the Pull Up resistors or rewiring them to ground as pull down resistors this ICD port could then be used as an output connector. (See Appendix B for Schematic and PCB drawings of the final board).
Previous
1
2
3
4
A
B
C
D
Next
Articles
Futaba servo signal interface
2 Design and ConstructionFutaba servo signal interface
2 Design and Construction
The original bread boarded circuit I do not have documentation or images of so I will try and explain it. It consisted of a PIC16F877 operating at 4MHz. Connected to Pin0 of PortD was the signal line of a servo output from the Futaba receiver. It passed through a 220Ohm resistor to prevent accidental shorting, and had a 10K pull down resistor to keep the pin from floating. On Pin0 of PortB was a 220Ohm resistor linked to the base of a TIP122 Transistor. The transistors collector was tapped into the 5v line and the emitter to a small relay. This is what caused my first problem which I will explain later. Using the PULSIN (see Appendix A for code terminology) command and an IF statement I got the device to operate the relay upon moving one of the control levers on the controller.
I next designed a board. I switched to a PIC16F84 without testing it with my circuit and code. After the board was built I ran my first test. It was a simple code to pulse each output pin of the device sequentially to check for continuity and the proper workings of the relay driver. Here I ran into my first problem. The code worked fine but there was a problem which arose. The relays would not operate. By watching the device I noticed the LEDs which I had included for visual operation, were lighting but only very dimly. This had to be a problem with how my transistor was being driven or biased. I ventured to the Internet and read up a bit on the operation of Darlington transistors (the TIP122 in particular). I found that my problem was that the transistors emitter should have been directly tied to ground and the collector should have had the device I was trying to drive between it and the positive rail. I fixed this by cutting some traces on the board and putting in a few jumpers. I tested again and all the relays operated perfectly.
I then proceeded to try the code I had tested on the bread board. The device however would not detect the servo signal. I tried many different modifications of the code and none seemed to work. I bread boarded 2 of the same circuit one using the PIC16F84 and one using the PIC16F877. I determined that for some reason the PIC16F84 was not using the PULSIN command properly although the compiler didn't give any warnings about the PIC not utilizing this function as it had told me about others in the past.
From here I went back to the drawing board and started to design a replica board using the PIC16F877. Due to the fact that I had already had most of the circuit drawn up already all I had to do was copy and paste the driver section and implement it to the 16F877. I also took this opportunity to add more outputs to the board. Instead of four transistor relay drivers the new design contained eight, utilizing all of Port B and creating a possibility of controlling forward and backward motion of all four servo inputs. Two of these boards were built, one for the main drive components of the robot and one for the motors of the arm and the claw of the scissor lift that was being designed by team members Jairo, Sandra, Tim, and Andrew.
The second board I added a 12 pin ICD connector connected to Port A of the PIC16F877 and pulled to a logic High. 6 Pins were connected to pins 0-5 of Port A and the pin adjacent to each was connected to ground, to pull the pin low. This ICD connector was implemented to create ease of connecting sensors and limit switches whose states could be used for semi intelligent programming and feedback of mechanical part locations to the Microcontroller. However these ports were never used for the Skills robot and remain mostly untested other than a quick if statement to test their continuity. By removing the Pull Up resistors or rewiring them to ground as pull down resistors this ICD port could then be used as an output connector. (See Appendix B for Schematic and PCB drawings of the final board).


