Hello, I am in the process of building a hexapod that is controlled by arduino. For some reason I was persuaded into making my own 18 servo control unit ( cause humans are crazy).
So I have attached two documents that show the major parts of the controller in the form that I intend to solder onto a strip board (power supply and mcu).
I would like to start things off with some questions:
I know that in order to control a servo that is powered by external power source you need to connect the servo GND and arduino GND together. Did I connect the servo GND in the right spot (Power supply image)?
Follow up question: do i need to add a diode before the junction as to separate the regulator GND line and the external power source GND line?
is the 500mA fuse sufficient for an atmega microcontroller? I looked at the datasheet but I want to be 2000000% certain
will it be ok if I add a 1K resistor and a LED to the rx tx pins? (I plan on connecting a bluetooth module to the mcu and it would be nice to have LEDs that will show me everything is working)
My fear is that it will somehow interfere with the communications if they are connected in series.
If you have any pointers or tips (values, connections, how to juggle, etc) I would greatly appreciate it! This is my first "real" project after roughly 2-3 years of learning and tinkering with electronics.
Servo ground to the ground terminal at the regulator looks OK to me.
NO diodes here, that will create different levels and you don't want that.
The datasheet is the correct source to find a suiting fuse.
What does that datasheet say ?
If you are afraid the the resistor and LED will interfere with comms, look into building a buffer for that.
You can find examples of such buffers in the schematics of Arduinos.
On the Uno R3 (click !) have a peek what's going on on pin 13 (19 on the chip), or SCK.
RX and TX LEDs in there aren't connected to the chip, they are connected to a dedicated pin on the USB adapter chip.
1 Absolute Maximum Ratings*
26.2 DC Characteristics
Operating Temperature....................................-55⋅C to +125⋅C
Storage Temperature ..................................... -65°C to +150°C
Voltage on any Pin except RESET
with respect to Ground ................................-0.5V to VCC+0.5V
Voltage on RESET with respect to Ground......-0.5V to +13.0V
Maximum Operating Voltage ............................................ 6.0V
DC Current per I/O Pin ............................................... 40.0 mA DC Current VCC and GND Pins................................ 200.0 mA
hmm it seems I made a mistake and the max is 200 mA. Odd, I suppose I got confused because the arduino uno has a 500 ma fuse on it according to the site. I'll resource the matter more.
You need to take the peripherals on board in account when deciding on a fuse.
And the fact that you can't get fuses in the exact value you might get when adding all currents.
The 500 mA seems a bit too much for just a controller.
Did you see that you showed the maximum current to power the controller, and aslo the current listed per port ?
There has to be some extra data concerning that too.
The 328 can source 40 mA per port too.
But it will break for sure if you get all ports to source 40 mA.
I have no doubt that will be the case here too.
MAS3:
You need to take the peripherals on board in account when deciding on a fuse.
And the fact that you can't get fuses in the exact value you might get when adding all currents.
The 500 mA seems a bit too much for just a controller.
Did you see that you showed the maximum current to power the controller, and aslo the current listed per port ?
There has to be some extra data concerning that too.
The 328 can source 40 mA per port too.
But it will break for sure if you get all ports to source 40 mA.
I have no doubt that will be the case here too.
Yes, I just came to that realization too. Surely if I place a resistor that will lower the current but also the voltage to the servo. I think the best course of action is too see how much current one servo draws. If it's below 40 then I'm good I suppose. If not then I'll need to figure out a solution
EDIT: say the signal current will be roughly 20-30 ma, do you reckon there will be an issue if all pins will work at the same time (this is worse case scenario, usually no more than 10 servos will work at the same time).
A servo doesn't draw significant current from an output port of a controller.
It gets a signal which has similarities to PWM, but it isn't PWM (it's more like PLM).
A servo has 2 power wires, and one control wire.
The servo could draw a lot of current through the power lines.
So you do have to check the current the servo of your choice will draw.
And you'll need a serious power supply for your 18 servos.
A servo doesn't draw significant current from an output port of a controller.
It gets a signal which has similarities to PWM, but it isn't PWM (it's more like PLM).
A servo has 2 power wires, and one control wire.
The servo could draw a lot of current through the power lines.
So you do have to check the current the servo of your choice will draw.
And you'll need a serious power supply for your 18 servos.
Ah! Why'd you scare me then.
about the power supply, I am still deciding on the matter.
Just so we are on the same page: The arduino and the servos are going to be powered by separate power sources.
The schematics show an ATMEGA644, so i assumed you are going to build your own variant perhaps because of a need for more pins or some other specifics to that controller.
I'm not intending to scare you.
Just trying to not skip information, like why you see a 500 mA fuse when power lines might only need 200 mA.
See my signature.
Make sure the GNDs of both power supplies are connected, of create full isolation, perhaps by using 18 optocouplers.
Yes, I will change the fuse to 200mA. I simply got confused because the uno has a 500mA but that's because the uno has more ICs and complicated circuitry.
I am using an Atmega644 with the saguino bootloader.
I will of course make sure the GNDs are connected well, but I don't think I'll need full isolation as I am only sending a one way signal and the connect to GND on the other end.
Unless connecting the arduino to external gnd that runs ~6V with massive current is a problem (would connecting the GND to the servo power supply parallel to the servos be safer?)
Your servos will generate some noise on the power lines.
Because a servo is a relative high load to a power supply (compared to an Arduino), and you have a quite large number of them, you should take that noise in consideration and not underestimate it.
I can see what you mean. I'll be careful and take things step by step. If I see there is a problem with the power lines I'll look into capacitors to lower the noise.
Tomorrow my local shop will be open and ill be able to solder the current version of the board.
Well I am using MG995 TowerPro servos. There isn't much information on the matter. From what I understood it can go from 100mA stall to ~500mA with torque. Now this isn't exact as there are 3 different joints on the legs, each one has its own leverage/opposite force it needs to overcome.
I hope to be able to do more exact measurements once everything is in place.
Please note: I don't need for the servos to work at maximum speed. As thus I can handle lack of current.