Continuing the "practicum," here's the scope output from the code in post #31 driving the circuit in post #29 (using 2x NEC2501, 2x 1K input divider, and 510R pull-downs on the outputs):
Hopefully all solutions work on the Stamp as well as the Prop. I listed this challenge in the Picaxe forum to draw off their knowledge base, since the Picaxe is somewhat Stamp-like.
This circuit can drive 2 analog servos independently.
One assumes the 1mS to 2mS PWM pulses are sequentially generated in software.
1. The lower servo is pulled high directly by the Prop Pin for the required PWM time. Then the Pin is set to input.
2. The upper servo is pulled high when the Prop Pin is pulled LOW for the required PWM time. Then the Pin is set to input.
Morphing #36, and tristate-port ideas, it can be done in ONE part - a HEF4017
Connect 4017,Qn to 4017.CLK to Prop IO and then the Prop can self-sync. Less dead time than #36, and no passives.
Prop Generates a CLK edge (which briefly overdrives the feeble 4017 Qn drive), then tri-states the IO pin to check if Qn is High yet.
Once it reads-back a Hi, it has sync.
Duane C. Johnson's post #9 provided the first schematic and a descrete 4 component solution.
jmg's #2 post suggested using a PUMD9 part number (referenced in post #28), but still no schematic. The PUMD9 from this location... www.nxp.com/documents/data_sheet/PEMD9_PUMD9.pdf
...has a descrete component count of 6 and as he said still would require an inverter for one of the servo channels.
Phil Pilgrim (PhiPi)'s post #29 although technically I said no IC's other than the processor, this soluition would require 6 descrete componets, but offers wider voltage operating range and a cleaner output signal
...And since the rules weren't stated clearly on an IC counting as a single component, jmg pulls it off with using a single 4017 decade/divider IC.
Note: I have not had a chance to test the solutions here, but I will leave that to the scrutiny of our peers.
jmg inspired me to order some 4017s, but I haven't had time to try them out.
I had an offbeat relay/plywood level concept using a center-tapped transformer which, coupled with two diodes, would yield two different pulses, but I needed an isolation transformer and $50 was too rich for my blood.
Comments
-Phil
-Phil
http://www.picaxeforum.co.uk/showthread.php?22991-Challenge-2-Servos-on-One-Pin
Total cost of additional parts might play a factor. Is that IC costing less than the transistors and resistors?
Connect 4017,Qn to 4017.CLK to Prop IO and then the Prop can self-sync. Less dead time than #36, and no passives.
Prop Generates a CLK edge (which briefly overdrives the feeble 4017 Qn drive), then tri-states the IO pin to check if Qn is High yet.
Once it reads-back a Hi, it has sync.
Is the court (Beau) pleased with this application?
Duane C. Johnson's post #9 provided the first schematic and a descrete 4 component solution.
jmg's #2 post suggested using a PUMD9 part number (referenced in post #28), but still no schematic. The PUMD9 from this location...
www.nxp.com/documents/data_sheet/PEMD9_PUMD9.pdf
...has a descrete component count of 6 and as he said still would require an inverter for one of the servo channels.
Phil Pilgrim (PhiPi)'s post #29 although technically I said no IC's other than the processor, this soluition would require 6 descrete componets, but offers wider voltage operating range and a cleaner output signal
...And since the rules weren't stated clearly on an IC counting as a single component, jmg pulls it off with using a single 4017 decade/divider IC.
Note: I have not had a chance to test the solutions here, but I will leave that to the scrutiny of our peers.
So, with that in mind, the Winners are:
Duane C. Johnson
jmg
Phil Pilgrim (PhiPi)
Thanks for playing!!!
jmg inspired me to order some 4017s, but I haven't had time to try them out.
I had an offbeat relay/plywood level concept using a center-tapped transformer which, coupled with two diodes, would yield two different pulses, but I needed an isolation transformer and $50 was too rich for my blood.