Hot answers tagged

32

The device Spehro Pefhany's answer builds out of two pots is actually available as a single unit, for example the ALPS RDC803101A. If you turn it, you get two sawtooth signals that are 180° out of phase, so when one output is in its “dead zone”, you can use the other one instead to determine the position. This model also has no detents, so no clickyness at ...


16

Detents are slight "clicks" the encoder will make when you turn it. Think of what it feels like when you scroll your mouse wheel (hopefully mouse wheels you've used have detents :P). They provide some sort of feedback (audible/touch) mechanism for the user to what a discrete step in the encoder is. More information: Wikipedia - Detent


16

The best continuous rotation sensor I've used is the AMS series. Something like this might suit your purpose. Of coursed they can't support infinite output values, but associated with an MCU you can set it to mid scale each time you turn your unit on, or remember last settings. There are also plenty of relatively cheap optical encoders that would allow ...


14

I have not seen something like that, does not mean that it does not exist. It does not particularly lend itself to construction with normal pot designs, including modular ganged pots, because the leads usually come out of one side. There are pots without end stops, however they have a dead angle. Expensive long-life ones are called 'servo pots'. You ...


9

As well as slip rings being an option, you could also use a commutator. When I made a large globe, I found it easier to source commutators from DC motors than slip rings. You can get them in all shapes and sizes. Make sure to get one with at least 4 phases. The one I got had 12 so I joined adjacent phases together to form 4 groups of 3. Then, in order to ...


6

That's not a great algorithm in your handler. You should have ZERO ifs. No decisions. Store your AB state, i.e., 00 or 01, then append your next state, i.e 0001 means AB went from 00 to 01,thus B changed from 0 to 1. Make this a +1. If starting from 00, and you change to 10, then call this a -1. Build a 16 element array of all possible transitions ...


6

The key is how a quadrature encoding works: two signals are out of phase, so you can detect direction by which signal follows the other one. Combined, they have 4 states they pass through, but they will do so in opposite order for the opposite direction. I.e. 00-01-11-10- for right, 00-10-11-01- for left. As you see, they'll pass both the 01 and 10 states ...


6

The way standard corded landline phones work hasn't changed much. That is why you can often still use old phones on a modern phone line. When a phone line is idle there is about 50V DC between the two wires. When it rings the exchange superimposed a low frequency AC ringing voltage (about 100V iirc) on the DC. The ringer in the phone is connected to the ...


6

The easiest way to get a couple of watts across an air gap is to use the electronics and coils from a wireless charging system. These are available inexpensively as a retrofit kit for Samsung Galaxy phones (and others). The receiver side is a coil and tiny circuit board sandwiched between two pieces of thin vinyl. Simply peel the vinyl back to expose the ...


6

What you may find useful is a multi turn potentiometer. Bourns manufactures them in different ranges of resistance. They come in various sizes, small and volume knob size too. They help in precise control of resistance. There are others too, with a dial inside and outside too, from Bourns. I could get a big multi turn potentiometer for my project for ...


5

A Gray code encoder is an ABSOLUTE encoder. You turn your system on, do a reading, and you know the position of what you're trying to measure to within the resolution of the encoder. For these encoders, you often need a digital I/O for every bit of resolution of the encoder. In contrast, an incremental encoder is a RELATIVE encoder. You turn the system ...


5

The debouncing (and any noise filtering, ESD protection circuits) should be on the main PCB. The switches themselves don't need anything local to them, nor would be be optimal to have additional circuitry there. Edit: If the Gray code encoder is active (optical or magnetic) some remote circuitry might be useful- certainly supply bypassing, maybe some ...


5

You are looking for a "slip-ring" with two or more contacts. Feed the low-voltage DC through the slip rings. Be aware that you face several challenges with regard to balance on a high-speed rotating system. A small amount of imbalance could shake the thing to bits sending parts flying. If you are trying to display a static image you will also need a ...


5

If you look at the ALPS datasheet for your part, you will see the following diagram: Here, they show you a test circuit on the left side. You are supposed to be able to find that kind of thing in a datasheet. It's a small skill. But one you will need to develop. (You will also need to develop the skill required to find the datasheet in the first place, of ...


5

Chattering is the time during which the output is not stable when a transition from ON to OFF or from OFF to ON occurs. The signal quickly jumps between both states during a few ms. Bounce (you didn't mention it but it is indicated in the datasheet) is the time, when the output is supposed to be stable in the ON state (between chatters), during which the ...


5

You should write one for yourself based on the 'get' function: uint32_t TIM_GetCounter(TIM_TypeDef* TIMx) { /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); /* Get the Counter Register value */ return TIMx->CNT; } So a TIM_ResetCounter should look like this: void TIM_ResetCounter(TIM_TypeDef* TIMx) { /* Check the parameters *...


5

If you're trying to use 64 encoders as "frob knobs", the more typical way of doing this is to use each encoder for multiple purposes, and have some way of controlling which purpose the knob is serving at any given moment. Otherwise, I'd probably urge you to throw a microcontroller at each encoder, or at least have more than one microcontroller, each ...


5

Yes, but... Yes, they can, it is simply a question about the sample rate. You have to perform some calculations. You have to determine the maximum speed for which you want your encoders to function. Then you have to figure out how fast the signals will change. This depends on the number of pulses per revolution that your encoder has. You now need to scan ...


5

There will be a gap in each of the two pots near where they (ideally) instantaneously switch from 95% to 5% or vice-versa depending on the direction of rotation. I suggest using the center range of each- switching from one to the other when the current one goes out of the center of the range, in this case it would be 50% +/- 22.5%. There will tend to be a ...


5

It is almost certainly an audio taper version. They have a pseudo-logarithmic law that works better for audio applications because of the way that we perceive loudness. The A10K means audio taper potentiometer 10 kilo-ohms. One marked B10K would have a linear law that does what you expect. The picture was taken from this site Resistor Guide


4

What you're going to have to do is decode both of them into step and direction bits, combine those, and then regenerate the quadrature outputs. The first part can be done with a couple of flip flops and a couple of xor gates. See http://www.fpga4fun.com/QuadratureDecoder.html . Then you OR the step bits together and use a mux to select which direction ...


4

Most of the HDD motors are BLDC (brushless) motors. They can be driven by brushless ESC. Cheapest would be to buy hobby RC ESC and drive it by PWM. Something like this would be fine. (turnigy plush 25A). 25A means that it can be used to run motors up to that current without damaging ESC. You could find lower current ESC as well (but this one is cheap ...


4

The differences between Grey coding and incremental coding, on a per-code basis, are nil. Incremental coding is basically 2-bit Gray coding which has been compressed and repeated into a series of "clicks". There is no difference between one rotation of Gray coding and one click of incremental coding. The main difference is that Gray coding covers the full ...


4

They're called "rotary stepping switches" and one version is made by coupling a rotary solenoid to a rotary switch, as shown below. A bit overkill for your application, which can be easily handled by six relays driven individually by separate MCU I/Os, or driven by something like a 74HC138 with omly three IOs required from the MCU.


4

You can get a reed relay, such as this one, with contacts rated at 200 VDC @ 500 mA, and a nominal coil voltage of 5v. The datasheet is here. The advantage of a relay over a transistor solution is it would provide total isolation. Also the easiest way of integrating into your current system, just wire the relay contacts across your switch contacts. Since ...


4

You'll notice that there are 8 magnets, but the "coil" (the serpentine traces) have 3-fold symmetry. This means that as the magnets rotate, the induced voltage in the pickup will vary with rotation, with a period 3 x 8 or 24 (EDIT - oops, 12, since the magnets need to alternate north and south) times the shaft rotation rate. This varying voltage is AC-...


4

What might be the problem with the SPI? That scope trace suggests that there is another driver on the MOSI signal, in addition to the MCU. That is bad, since MOSI typically uses a push-pull driver and multiple push-pull drivers will conflict, if they attempt to drive to different logic levels at the same time. As a result, you tend to see a "stepped" ...


4

How "clicky" was the ball movement on an old-school ball mouse? That uses a rotary encoder. It's only a simple 2-bit one though, which is enough for speed and direction of motion, but does not give an absolute position. Do you actually need an absolute position though? This really comes down to your application. If cost is an issue, you can also drastically ...


3

I have seen stepper switches which are solenoid-controlled rotary switches. You pulse the solenoid for a specified time at a specified voltage, and the switch advances to the next position. However, such things are physically large, not easily and commonly available, and quite expensive. The right solution is to step back two logical layers and define ...


3

I am not sure if I got your question correctly but I am assuming you are asking how to make the HDD motor spin continuously (also assuming you don't have a circuit in place to spin the motor yet). AFAIK HDD motors are stepper motors with 3 coils to supply input source at different phases of rotation of the motor. You will need to provide it with a 3 phase ...


Only top voted, non community-wiki answers of a minimum length are eligible