![]() | ![]() | ![]() |
| | |||||||
| Robotics Chat Specific to discussions about robots and the making of. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| hello guys hope you are all fine... well i have an idea in my mind but yet not really ready so am asking for help from my fellow experts i will tell you the idea abtractly: i want to control a bunch of four servos on a vehicle or something through a joystick in my hand. the system is wired and hence i want to have the wire as thin and light as possible and this means that we need to have the number of wires going from the joystick to the bunch of servos are minimal. well in addition each two of the four servos will recieve the same command and hence we can see that generally there will be only 4 possible commands to the servos from the joystick (for each two (up and down= 2X2 =4 ))......... can you get my idea guys. i need to see what kind of circuits do i need on the joystick interface and on the servo side if i would use digital commands or so...... i need to know any feed back , help suggestions and comments on the idea, if someone really knows a site to find some similar things that would be just great. | |
| |
| | (permalink) |
| The problem is that how far from your joystick to the servos. Because, if it's as short as 50cm to 10m, you can use serial communication, and you need only 2 wires to control as many servo as you wanna. If it's less than 1m, you can use I2C and it works perfectly. In your joystick, you should use a MC to communicate with your joytick, then, you need another MC at the servo board. These two MC can communicate with each other. In case that your distance is less than 1m, you can build a I2C communication and you need only one MC at the joystick as the master chip, and all other chips on servo board are slave. It will work good with 2 wires only.
__________________ Falleaf mail@falleaf.net English forums at PIC Vietnam - Vietnamese Electronics forums R&P Trading and Forwarding Co. Ltd. Distributor of Microchip in Vietnam | |
| |
| | (permalink) |
| Your suggestion of four 'commands' isn't correct, servo's are analogue devices operated by varying width pulses (usually between 0.5mS and 1.5mS long). Probably the easiest way to do it would be to use the encoder and decoder chips from a radio control system - you could easily feed the signal down a couple of wires, or for that matter use the RC system itself?. Feeding two servos from one output shouldn't be a problem. There are various more complicated ways you could do it, including uses PIC's as encoder and decoder IC's, creating your own coding scheme to feed down the wires. Or, even simpler, if you can feed three wires rather than two, feed the servo pulses directly down the wires, with everything done at the joystick end. | |
| |
| | (permalink) |
| If you build your joystick yourself, you can take the I2C or serial communication of the joystick to make it as master chip or serial transceiver chip, and you won't need another outside chip to communicate with the joystick anylonger.
__________________ Falleaf mail@falleaf.net English forums at PIC Vietnam - Vietnamese Electronics forums R&P Trading and Forwarding Co. Ltd. Distributor of Microchip in Vietnam | |
| |
| | (permalink) |
| hello guys, thanx alot for your help.... first, i am planning that the wire is very long, more than by 1 meter by far. hence, the second point is that we need to try to keep the number of wires minimal ( would two wires help us in our system ??) i would like it to be not really complex involving many PIC's... that is i would like it to have all the complexity in one side only , the joystick side and minimize all circuitry in the servos side. IN SUCH CASE WHAT KIND OF CODING AND ENCODING SHALLWE USE?? or what is the logic of the communication?? (we have total four servos and taking in mind that each two will recieve the same siganl)) : D thanx guys, i am a bit of a biginner but you will diff. help me have a nice day | |
| |
| | (permalink) |
| Dear Nigel, I built my final robot as this: The servos will be driven by a MC, and four servos, I used 4 MC to control it. The four MC have the same program, if we want to control the servos in the same way. Actually, in my case, it was 2 servos and 1 stepper. Then, I use one PIC to be the MASTER and the Master is connected to the PC. The program on slave should be: 1) Receive: velocity, accelerate, and position 2) Send: the current velocity, accelerate and position of motors through reading encoders. As I need to control a motor, I only send the suitable data to the slave, and the slave automatically control the servo. I'll not care what I'll really do with the master but as a transceiver only. This structure make the robot work with more ease, and we don't have to compute muchie. Therefore, if we develope this structure into this application, we can use serial communication to talk in a distance of 10m with the master chip. That's all what we have to do. It's fact that we have to use many MCs here, but with more MCs, we don't have to compute much, and we can do many things more, even wireless communication.
__________________ Falleaf mail@falleaf.net English forums at PIC Vietnam - Vietnamese Electronics forums R&P Trading and Forwarding Co. Ltd. Distributor of Microchip in Vietnam | |
| |
| | (permalink) |
| hello guys.... dear falleafd.. well i would like to have the solution with minimal MC and PIC and if possible we can put all the circuitry and MC on the Joystick side and almost nothing in the servo side....... I really need no perfect control, i send a command and the servo replys with current status. i dont really want it so complex. just to move according to the signal right or left.... plus i should make it clear that the length of the wire is much more than 10m and hence we have to take an assumption that the length of the wire is infinity in technical computations and hence (as far as i can guess... need clarification??!) the serial technique wont be a good solution??? | |
| |
| | (permalink) | |
| Quote:
1) With each servo (or 2 or 3 or 4) you need only 1 PICs to drive it. And this PIC will works as a slave chip. And the pcb of this scheme will be simple enough to build on one side board. 2) Imagine that, you have 4 PICs (or less) to control 4 motors. Then you add another PIC to send controling data to each 4 PICs above. Then, at the joystick, you add another PICs to communicate with the joystick. As result, you have to add 2 more PICs than you intended to do. And this two PICs have a simple tasks is that transceiver. As you use serial communication between two PICs, you have to use only 2 wire to do so. 3) Don't worry about your board. Take care of the drivers you would build to control the 4 motors. In each 4 PICs I mentioned above, you have to write the full program to control one servo. And the program need the parameters to control the velocity or positions or acceleration.... to run the motors. 4) The PIC connected to joystick will work as a decoder, it change the positions of joysticks into control parameters to send to the 4 PICs joystick <-> PIC (works as a decoder) ----serial----- PIC <-> Your drivers (I will use 4 PICs in your case).
__________________ Falleaf mail@falleaf.net English forums at PIC Vietnam - Vietnamese Electronics forums R&P Trading and Forwarding Co. Ltd. Distributor of Microchip in Vietnam | ||
| |
| | (permalink) | ||
| Quote:
Quote:
Perhaps you might like to explain better what you are trying to do, we may be able to make further suggestions. | |||
| |
| | (permalink) |
| Yes, Nigel is right. For a 10m distance control, you should use RF remote control. I'm just stupid that trying answer your question but don't care about real world application. However, if faka is a beginner, and he cannot build RF control, he may use serial communication here. But I think, in spite of using serial here, you buy a RF control and use it. The more expensive you pay, the better control you will get. As Nigel suggested, you should buy a 4 channel RF control. And you know, in helicopers applications, they use 6 channel RF control to drive the helicoper. And it work very very very good. Of course, they also use servo motors. Well, it's nice that, I saw a circuit of helicoper, it's only as small as your finger. It includes a receiver, and controllers using 2 x 16F84SO... It works so good.
__________________ Falleaf mail@falleaf.net English forums at PIC Vietnam - Vietnamese Electronics forums R&P Trading and Forwarding Co. Ltd. Distributor of Microchip in Vietnam | |
| |
| | (permalink) |
| hello guys... well i guess we need to clear some ideas here, i might have not expressed the idea well the first time. I need to make a system of two sides: side one is just a simple joystick connect to side 2 with a long wire (propably 500 meters or moreeee) side 2 is a combination of 4 servos (normal servos we use in RC planes) used to control something like a pillar or a post with some sort of signs that i will control with the joystick to point in different directions. each two servos will move in the same direction, that is recieve the same signal. both falleafd and Nigel (thanx guys) have suggested to use some sort of RF system, well it is easy and nice idea , but the problem is that i might recieve interference from other surroundings i live beside an airport by the way, thats a point PLUS i am taking into consideration that my system the side 2 of it possibly will be destroyed or be damaged due to its job nature, so i cannot afford each time to install a reciever each time i have a damage, so i tend to just use as little circuitry and stuff in side 2 and have most of my circuits and things on the joystick side.... however if you still see that there are cheap RF modules or reciever we might take it still as an option. in both cases i need to know how technically we can use serial communication????? i have some sort of a primative idea in mind you expert guys can tell me how much it is feasable. what if we use 3 wires. one wire will carry the signal(with the appropriate length according the the angle of movement or.....) the other two wires can be used as addresses specifiers. that is if you have: a signal in 1st wire + a signal in the 2nd wire = servo 1 & 3 move right a signal in 1st wire + no signal in the 2nd wire = servo 1 & 3 move left no signal in 1st wire + a signal in the 2nd wire = servo 2 & 4 move right no signal in 1st wire + no signal in the 2nd wire = servo 2 & 4 move left this primitave way of encodeing i guess it wont cost us alot to make a decoder in the servo side right ??? i need your comment on this fellows. thanks alot and hope i made the idea clearer have a nice day : )))) | |
| |
| | (permalink) | |
| Quote:
Your 'encoding' scheme doesn't provide any pulses, so wouldn't do anything!. Servo's have a three wire connection, ground, +ve, and input - assuming the supply is available locally at the servo end (and sending power down 500m of cable probably is best avoided), you only need to provide a ground connection (common to all four servo's) and an input wire for each pair of paralleled servo's - this gives a total requirement of three wires. It would probably be a good idea to use a screened cable, where the screen can be the ground connection, with two wires inside. I've no idea how well the servo pulses would travel down 500m of cable, you may have to amplify them to overcome the cable capacitance. If that won't work, some kind of serial scheme involving a PIC at each end could be used - keeping to a slow speed should allow it to carry 500m, or you could use a simple modem system and send audio tones down the wire. | ||
| |
| | (permalink) |
| i just wanted to say that the four servos will have for example a common ground and onborad power supply. OK? how ever the signal will come in one of the three wires from the joystick curcuit.. now we have the power and the signal now we need somethin to tell us which servo will work and to which direction. i suiggested that we have a new circuit that will know which servos to work from the addresses on the other two wires and it will act upon it be give the siggnal on the third wire to the servos responsible after decoding the incoming address on the othe rtwo wires. sorry for my ignorance but i hope you will be able to help me more. thanx Nigel | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| well this diagram kinds of explains more and in other word is almost perfect. however i still have a question, now...... i want to move the servo this much to the right, how the signal would look like??? and now i want to move the same servo that much to the left, now how would the signal ook like now ??? and if i will depend on the length of the signal to trigger up the servo, what kind of logic will be ised in the servo side, if any ???? thanx alot Mr. Nigel | |
| |