04/09/2018 at 22:04 •
Those are the slides from my talk for the Dublin 2018 Hackaday Unconference. Since the slides themselves contain only graphics to be explained in the talk itself, I'm also adding explanations below them. Unfortunately I have no idea what I actually said during the talk (I hope I didn't offend anyone or anything like that) — all I remember is red mist and then I woke up in the plane — so the comments are more what I *wanted* to say and less what I actually said.Read more »
03/24/2017 at 13:01 •
Or what are voltage and current exactly?
I have seen this explained with water, but that doesn't make any sense. Water doesn't have any volts!
Let's start with a simple case. You have a battery, and you have a light-bulb that you connect to it.
That is like a bottle of vodka and a drunkard. The voltage stored in the battery is like the strength of the booze in the bottle -- it's given by the chemistry of the particular kind of battery. The current, on the other hand, is given by how fast the drunkard drinks it. He can sip it slowly, and thus get only a little bit druk, while the bottle lasts long, or he can guzzle it straight from the bottle, which is the equivalent of making a short. Of course, the more he drinks, the hotter he gets. To get to the same level of inebriation with a lower voltage, you need to drink more of it, so if you want to do it in the same time, you need higher current. The slowness of drinking is the resistance.
The bottle has its own resistance too. The bottleneck is the bottle neck. You can only pour so fast from it. However, if you connect two or more bottles in parallel, you can get much more current from them. (Connecting bottles in series gives you higher voltage, which is where this metaphor breaks, but bear with me.)
Of course, if you have several drinkers in parallel, you will need higher current. (Again, the metaphor breaks when you connect them them in series, but let's not dwell on that.)
Now, what happens when the drunkard tries to drink faster than what the bottle can manage? In fact, a bottle is more like a capacitor than like a battery. It holds a certain amount of electricity at a certain voltage, and lets you draw all of it from it. (But not quite, to make it exactly like a capacitor, you have to top it up with water after every pouring, so that voltage drops.) A battery is more like a distillery. It produces as much vodka as needed (at a certain voltage), but when you try and demand more than it can produce, it will start topping it up with water, and thus you get a voltage drop. If you do it too much, the distillery will break.
Now, if you connect two distilleries in parallel, they will double the voltage of the resulting booze. If you connect them in parallel, you can draw more current.
That's pretty much it. The important thing to remember is that the voltage is determined by the distillery, but the current is determined by the drinkers (and limited by the distillery by voltage drops).
03/11/2017 at 00:58 •
SG90 is one of the cheapest and most common hobby servos available. That is probably because it's also the most commonly cloned hobby servo. If you bought one of these very cheap. there is a very good chance that it wasn't actually produced by Tower Pro, but it was manufactured in one of the hundreds small factories in China based on designs that have been passed from person to person.
As you can expect, the parameters of this servo, including its quality, but also exact dimensions, speed, torque, accuracy, dead band, maximum and minimum voltage, size of the shaft, etc. – will vary wildly depending where it is sourced from, and even when. It is common, for example, for the servo horn from a servo from one batch to not fit the shaft on a servo from a different batch. That means that any designs using those servos have to either have large tolerances, or be adjusted for the particular batch of servos.
Those servo typically come in a plastic bag, with a smaller plastic bag inside containing additional elements: a horn screw, two mounting screws, and three servo horns: a single arm, a double arm and an asymmetrical cross. The holes in the horns are spaced 2mm apart.
The brown, red and yellow wires are typically a little over 15cm long, and end with a standard JR female plug with 2.54mm pitch. That plug is a little thicker than 2.54mm near the top, so when a lot of them are put together, there have to be some additional space between them.
They have shape of the typical 9g microservos: 23mm long, 12.2mm wide and 29mm high. They have two "ears" with mounting holes, but the sizes of the ears and the holes vary greatly. They are held together with 4 long screws. When those are removed, they will break into three parts – the bottom with the wires and electronics, the middle with the motor and the pot, and the top with the gearbox and the shaft.
The gearbox is composed of four nylon double gears, mounted on two shafts – the potentiometer's and an auxiliary shaft. There is a fifth small gear on the motor's shaft. The last gear is connected with the main shaft, which has a piece of plastic preventing the servo from rotating all the way. There is no bearing – the plastic case of the servo holds the top of the shaft, and the brass bushing of the potentiometer holds the bottom. The gears can be very delicate, and it's quite easy to strip their teeth by trying to force the servo's movement by hand.
The electronics used in this servo vary, but are usually analog.The servo expects a PWM signal at around 50Hz, with the pulse width between around 400 and 2400µs, with 1500µs being the middle position. The maximum and minimum pulse widths vary between individual servos, even in the same batch. The exact amount of motion corresponding to a particular change in the pulse width also varies. The total range is usually a little over 180°.
The torque and speed of this servo also vary from batch to batch, but are somewhere around 1.8kg×cm and 0.12s/60° at 4.8V. This is affected both by the power voltage and by the frequency of the control signal – the higher the frequency and voltage, the stronger and faster the servo. However, this also affects its lifetime.
It is possible to modify this servo for continuous rotation, by cutting the limiters on the shaft, drilling the shaft to make it move freely on the potentiometer, and gluing the potentiometer in its center position.
It is also possible to add a wire to the center of the potentiometer to read the servo's position, and to one end of the motor's leads to read the servo's force – both signals will be between 0 and the power voltage.