Just doing some initial testing with the motor controller and a BS2. Documentation states that in demo mode any serial data received on the RX line will be echoed on TX line.
I have the following connections:
GND - BS2 Vss
Vcc - BS2 Vdd
RX - BS2 Pin 1
TX - BS2 Pin2
RESET - BS2 Pin 0
Jumper between pins A and B
I am then using the following code
’ Reset Qik
'detect baud rate’
SEROUT 2, 84, [$AA]
'send out a data byte’
SEROUT 2, 84, 
'read back echo’
SERIN 1, 84, [echo]
DEBUG "serin = ", DEC echo, CR
The only thing I get back is
serin = 0
Any insight would be appreciated.
The qik echoes the byte as it receives it, just as if you had connected your transmit line on your BS2 directly to your receive line. What happens if you temporarily remove the qik from the system and just connect your BS2 transmit pin to your BS2 receive pin? I have no experience with the BS2, but I am under the impression that it is not capable of simultaneously transmitting and receiving. Is this correct? If so, it would explain why you aren’t getting the echoed bytes from the qik, and it would mean you should see the same behavior when you bypass the qik and just connect transmit directly to receive on your BS2.
Hi Ben -
Thanks for the information. You were correct. Checking the TX line on the scope verifies that the echo is working correctly.
This leads into the next question. With my board in demo mode - I am not getting power to either M0 or M1.
The board LED’s indicate that the board is cycling in demo mode. I have an independent 9V battery connected to motor supply GND and VMOT and both M0 and M1 have motors connected (each is a Pololu #995 Micro Metal Gear Motor).
I am not getting any voltage across either motor - verified by checking with my scope.
Is it possible that I received a dead board?
We test every qik before it ships, so unless you have damaged the board in some way since receiving it, it is likely the problem is with your setup. There are a few things you could try:
Measure the voltage across the motor driver outputs with no motors connected. If you have any spare LEDs lying around, you could connect one to each motor port in series with an appropriate current-limiting resistor (say 1k).
Try to drive one of your motors directly from your 9V battery.
Try using a different power supply for your motors.
9V batteries cannot deliver much current, which makes them fairly terrible for high-current applications like driving motors. I’d recommend using AA or AAA cells (preferably NiMH or NiCd).
Please let me know if you continue to have problems getting the motors working.
Both motors work fine when connected to a power source. I have switched out the 9V for a DC power supply. I have it set for 8V. In Demo mode for M0 (red LED on) I am getting a series of pulses with a period of 32us and the pulse width varies. Looks like a good PWM. The problem appears that there is no voltage being passed from the VMOT input. I get the same pulse train with a peak to peak voltage of of 125mV with or without the DC power supply connected.
That certainly sounds strange. Could you post a picture of your setup that shows how everything is connected? By the way, you don’t have your power supply set up to limit the current to something tiny, do you?
Hi Ben -
It looks like I had a ghost in the machine. I took the setup apart and rewired it to make it easier to see in a photograph - and then the darn thing started working. Not sure what I was doing wrong in the first place…
I have included two images of my current set-up just in case anyone wants to see how the qik 2s9v1 looks wired up to a BS2 in Demo mode.
Thanks for the help…
Maybe you had a loose/bad connection between your motor power and the board? I’m glad to hear that things are working for you now. Thank you for posting pictures of your setup.