Qik 2s9v1

Hi,
Could you please help, I’m using a qik 2s9v1 connected to an Arduino Micro to control roller blinds in my house (24/7).
Most of the time the Arduino is just waiting for an IR signal and the qik 2s9v1 is at rest (heartbeat flashing every 2 seconds).
This morning the motor stopped normally but after that the qik 2s9v1 started flashing a green light rapidly (I guess this is the 0.4s mentioned in the manual). After that I tried to use it and the qik showed a red light (had to reset to fix the problem).
Could you please advise what the problem could be or how I can check further, here is my setup:

  • Arduino Micro (input power 12v from switching adapter vin/gnd)
  • Qik 2s9v1 (controls 2 motors when activated(1 motor is on each blind))
    –a) 5v logic from the Arduino
    –b) 12v power from the power supply
    –c) Only RX and RESET are connected from the Qik (excluding power)
  • 2 pololu reflectance sensors (only active when the motor moves to auto stop the blind)
  • 1 Infrared receiver (using IRremote libary)
  • System has been running in a first test for about 15 hours +/- so far

I also have a separate question on the qik 2s9v1 (not really important but thought you might know or like to)
When I execute: Serial.write(qik.getFirmwareVersion());, it kills the Serial of the Arduino micro(or locks it - I can’t tell). No other serial print/println’s work after that. On my Arduino UNO this doesn’t cause any problems.

Thanks in advance for your help!
Paul

Hi, Paul.

Are you using the qik in its default “automatic baud detection” mode? If so, it sounds like the qik reset and went back to waiting for you to send the initial 0xAA byte that teaches it the baud rate. I’m not sure what caused the qik to reset, but it could be the result of a drop in your power supply voltage or from motor noise. You might try adding some extra capacitance across VIN and ground (and maybe VCC and ground as well), and soldering some 0.1 uF caps across your motor terminals close to the case could help with motor noise. Additionally, you might consider sending the 0xAA byte before every command or putting the qik into fixed-baud mode so that it can more seamlessly recover from an unanticipated reset.

I haven’t heard of this happening before, but it sounds like an issue with your Arduino micro. Can you simplify the problem? For example, what if you try:

char firmware = '2';
Serial.write(firmware);  // do you see this?
Serial.write("!");  // do you see this?

Or what about:

byte firmware = qik.getFirmwareVersion();
Serial.write("firmware = ");  // do you see this?
Serial.write(firmware);  // do you see this?
Serial.write("!");  // do you see this?

- Ben

Hi Ben,
Thanks for you reply, my Qik was still set to “automatic baud detection” so I will try soldering on the pins for a fixed baud jumper. If there’s still a problem then I will also try the caps and sending the byte the mentioned.

Regarding the other problem, I tried all the tests you sent and the first one worked fine:
char firmware = ‘2’;
Serial.write(firmware); // do you see this?
Serial.write("!"); // do you see this?
(all ok)

The second test showed nothing at all on ‘Serial Monitor’ - just completly blank:
byte firmware = qik.getFirmwareVersion();
Serial.write(“firmware = “); // do you see this?
Serial.write(firmware); // do you see this?
Serial.write(”!”); // do you see this?

I also tried putting some ‘Serial.write’ commands in the ‘void setup()’ and found that these also show nothing in the Serial Output.
Since the Arduino Micro is a new board (release near the end of 2012) I was suspecting that it has a few bugs that need ironing out still.

Could you please help me with one other question, I recently puchased a Teensy 3.0 and was wondering if you had any experience with the ‘Teensy’ Series with the Qik’s? So far I have loaded some simple programs to it and it is lightning fast but I haven’t yet soldered the pins on it to test a Qik.

Thanks for your help and Best Regads,
Paul

Sending an 0xAA before every command is only helpful if you want to continue operating in automatic baud detection mode, since if the controller resets and goes back to waiting to learn the baud rate, it will figure it out the next time you send the 0xAA. If you switch to fixed baud mode, that should allow for a relatively seamless recovery from unintended resets, though those could still get annoying, which is where additional caps could help out.

Please let me know how it goes.

It sounds like the processor is hanging when you call qik.getFirmwareVersion(). Are you able to read other information from the qik, such as the error byte or the configuration parameters? Are you able to read any serial data at all on your Arduino micro? If you can correctly read the firmware byte using the Uno, then I suspect you have a general problem with serial receiving on your Arduino micro (either with software or with your serial connections to the Arduino).

I don’t have any experience with the Teensy.

- Ben

Hi Ben,
Since your last post I’ve performed a few changes and now the setup has been running a few days brilliantly without any problems so thanks for your help and suggestions :slight_smile:
Your thoughts regarding a possible power drop got me thinking, so the first thing I did was switch the power adapter.
Overall I changed the following:

  • Switch power adapter for more efficient one with better compliance (e.g. ERP, TUV GS safety etc…). It runs totally cold now :slight_smile:
  • Change voltage of Arduino and Qik motors from 12v to 7,5v (Arduino should be happier due to its regulator)
  • Change baud rate from 9600 to 38400 (not sure if this makes any difference)
  • Optimize / simplify code

I haven’t yet tried the fixed baud rate jumper, but hopefully it won’t need setting now.
Can you please tell me if the baud rate could change anything? I don’t really understand if it’s speed makes any real world difference, also does this affect power consumption etc…?
Thanks again for your help, next step for me is to add a simple light sensor so the blinds come up automatically in the morning :slight_smile:
Paul

I’m glad to hear you have things working so well! I don’t expect the baud rate change to make much of a difference. In general, the benefit of a higher baud rate is that you can communicate data faster, which means you spend less time transmitting and receiving, and can potentially have more data available to work with in a given time period. The down side is that higher baud rates are typically going to be more sensitive to noise. If you are going to keep the controller in automatic baud detection mode and you don’t need high update rates, you could leave the baud rate at 9600 bps (or you could even try lower, like 2400 bps) for a potentially slightly more robust connection.

Please let us know how your project progresses!

- Ben

Hi Ben,
The project is going great now and i’m in the process of setting up 10 of blinds (2 per Qik).
Could you please help me with a couple of questions:

  1. Do you know if its ok to use an unmodified PC PSU to power the setup? I was planning to use the 5V PSU output for the Arduino (microusb) and the 12V PSU output for the Qik motors. This would also mean running about 5m of cable connected from the PSU in one direction and 5m in the other (from another 5v output).
  2. Regarding the Qik, Is it possible to turn off the heartbeat LED of the Qik? Until I box them up it gets a bit annoying in the living room :slight_smile:
    Thanks in advance!
    Paul

That power supply could work, though I think you often need to do something special to get a PC power supply to turn on. I am more concerned about the length of your power leads. In general, it’s better to have longer motor leads than power leads if that is at all an option. With long power leads, there will probably be a significant voltage drop as your motors draw current, and there is the potential for destructive LC voltage spikes. If you do use such long power leads, I suggest you make them as thick as is practical and put a large (probably at least a few hundred uF) electrolytic cap across power close to each qik. You probably also want that kind of protection on both the 5V and 12V lines.

Unfortunately, there is no option in the firmware for turning off the heartbeat LED. You can cover it with a piece of electrical tape, or you can try a more permanent solution of desoldering it or its current-limiting resistor or cutting the trace to it.

- Ben

Thankyou, i’m really glad that you told me about the power leads since it would likely have caused me a lot of trouble!
In this case I will just keep the wires short! much simplier I think :slight_smile:
For the motor leads, can you please tell me what is the maximum recommended length?
At the moment they are only around 10-15cm, would there any disadvantage or potential problems in extending them to 150-180cm for example?
Worst case I can also just leave the motor wires short and use multiple power supplys’.
Regarding the heartbeat LED, this is not a real problem - just nice to have since I will eventually enclose the units :slight_smile:
Thanks!

As the motor wires get longer, some of the power that would have gone to the motors will instead be lost due to the wire resistance. Whether this is acceptable depends on your application (specifically, how much power you have to spare). It should be safe, so you can always try it out and see how it works.

- Ben

Hi,
Sorry to bother you again but I remembered 1 last thing after reviewing my setup.
Extending the motor wire length to 1 meter works fine but the setup also contains 2 QTR-1A Reflectance Sensors.
Can you please tell me if I you would expect any problems if the 3 wires of one of QTR sensors is extended to be a total of 1 meter?
(The 5v is taken from the Arduino 5v output).
Thanks,
Paul

It should be fine, but I recommend you test it out first to see how well it works.

- Ben

Thanks so much for your excellent help and sending information so promptly!
You’ve saved me a lot of time and headaches :slight_smile:
Best Regards,
Paul