I have a few questions I was hoping to get answered before I try out these Qik 2s9v1 motor controllers. I have read the manuals and couldn’t find answers…
Provided I use the “Pololu” serial protocol and setup unique device ids as stated in the manual, what would you say would be the maximum number of controllers I could comfortably daisy chain by simply tying together the TTL RX lines with short leads of say 1 inch between each … 6 of them? what about 12?
What sort of latency should I expect between these two events: a) TTL “Motor M0 Forward” command appears at the RX pins of the Qik and… b) The Qik driver actually starts sending current to the motor ?
In automatic baud detection mode, provided I send the correct startup byte as stated in the manual (0xAA), are the Qik Motor Controllers able operate at the non-standard baud rate of 31,250 bps? (this happens to be the baud rate of the MIDI music standard).
I think that’s it for now, looking forward to your thoughts
The answer to this question really depends on the characteristics of your serial transmit I/O line. Assuming you have a buffered output (rather than an open-collector pin) and are using short wires, I expect you should be able to control six qiks, and probably even more. Using lower baud rates should also make it possible to add more qiks to the chain without problems. I think the best way to evaluate the situation would be to look at your transmit line on an oscilloscope with multiple units connected. If you don’t have an oscilloscope handy, you should try connecting multiple units using the maximum possible baud rate and see if you get any errors. If you have things working reliably at 38.4 kbps, you can be even more confident that it will be okay at lower baud rates.
I just performed some tests on a qik 2s9v1 here and found that the M0+ motor driver output goes high approximately 40 to 70 us after the final rising edge of the Motor M0 Forward command.
Yes, the qik will measure the baud rate from the 0xAA byte and configure its UART to run at the closest achievable baud rate, and 31,250 bps is one of the achievable baud rates on the 2s9v1. The achievable 2s9v1 baud rates are given by the formula:
baud = 500000 / brr
where brr is any integer greater than or equal to 1. When brr is 16, the baud rate is 31,250 bps. Note that the qik 2s9v1 cannot reliably measure 0xAA bytes transmitted at baud rates higher than 38,400 bps, so while the qik’s MCU is capable of 500 kbps serial, the qik cannot in practice be used with brr values below 13.
Wow your detailed reply is very helpful! Thank you very much…
I was actually hoping to hookup up 8 Qiks (for total 16 motors) to receive the output from a single Arduino serial TX pin. I must admit I am a beginner in interfacing with the hardware world (having worked in software development for many years). So forgive me for my ignorance in this subject and for my “thinking out loud”. I just want to make sure I understand you.
So I could feasible use something like the 7407 hex buffer (6 buffers in one chip) in a chain to strengthen and isolate the transmitted serial signal between say each pair of Qiks? If so, then what about a daisy chain like this (crude diagram):
Arduino TX ouput => Buffer => 2 Qiks (4 motors) => 1 Buffer => 2 Qiks (4 motors) => 1 Buffer => 2 Qiks (4 motors) => 1 Buffer => 2 Qiks (4 motors)
I guess since the 7407 is open collector I’ll need a pull up resistor to the 5V ref.
And thanks again!
First off, with short wiring and low data rates, you might be okay without any buffering. If you do attempt the buffering approach, the general idea is to branch quickly as opposed to making big chains. So, you might have your arduino pin go to two buffer inputs, and have each of the buffer outputs go to four qiks. The open-drain/open-collector buffer is not great, but buffer chips alone are not very common. You can get a push-pull buffer by putting two inverters in a row or using OR or AND gates with their inputs connected.
Looks like this single chip could handle my requirements:
I’m trying to operate at 31250 baud rate. I don’t know if that counts as a fast or slow or medium speed
I guess at this point I need to stop with theory and start trying… so I ordered some parts and will tinker around and hopefully report back.
31.2 kbps is somewhat on the low-speed side. Please let us know how it works out!
One more quick question. Nowhere in the Qik manual does it mention anything about putting in diodes for back emf protection which seems like pretty standard advice for most motor drivers (for example if abruptly changing directions). So do the Qik motor controllers have this protection built-in?
I just don’t want to break anything
If you look at the diagrams on pages 3 and 4 of the TB6612 datasheet, you can see that these diodes are built into the driver IC. MOSFET-based H-bridges such as the TB6612 typically don’t require external diodes because the body diodes of the MOSFETs themselves provide a path for the back-EMF current to circulate.