D5 and Motor controller not working


10 posts
by 44_bh » Fri Nov 02, 2012 9:31 am
D5 doesn't work in 'led' test. Gert has suggested in another thread that some pins are re-numbered in a rev2 board. Is that also the case with the motor controller (G17 and G18) pins? I get nothing from my motor in this test although the screen displays the test. The motor works as a stand alone.
Posts: 6
Joined: Sat Sep 22, 2012 10:38 am
by Gert van Loo » Fri Nov 02, 2012 11:40 am
No, from the Gertboards view these are the changes:
On REV2:
GPIO21 has become GPIO27
GPIO0 has become GPIO2
GPIO1 has become GPIO3
The GPIO 17/18 have not changed.

I take that information from here:
http://www.raspberrypi.org/archives/1929
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2096
Joined: Tue Aug 02, 2011 7:27 am
by 44_bh » Fri Nov 02, 2012 11:43 am
I'm using Wheezy Raspbian as OS. Is there any way to check that GPIO18 is being switched to it's alternate PWM state for the motor test?
Posts: 6
Joined: Sat Sep 22, 2012 10:38 am
by Gert van Loo » Fri Nov 02, 2012 12:16 pm
Al I can think off is to read the GPIO alternate settings register.
But I assume you are writing that yourself with the correct value.
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2096
Joined: Tue Aug 02, 2011 7:27 am
by Grumpy Mike » Sun Nov 04, 2012 3:29 pm
44_bh wrote:I'm using Wheezy Raspbian as OS. Is there any way to check that GPIO18 is being switched to it's alternate PWM state for the motor test?


It matters not what the OS sets it to, when you declare the pin as an output that over rides any alternate function that has been previously set.
User avatar
Posts: 791
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
by poglad » Mon Nov 05, 2012 12:35 am
44_bh wrote:I'm using Wheezy Raspbian as OS. Is there any way to check that GPIO18 is being switched to it's alternate PWM state for the motor test?

Okay, I'm going to answer this with a Yes. You just connect GPIO18 through a resistor to an LED on a breadboard - take the Gertboard out of the equation for the moment. When you run the motor test, you'll see the brightness of the LED going up and down based on the PWM signal.

This hasn't actually helped me, however, as my motor isn't working either. I've got as far as verifying that 18 is behaving as expected, and will have to continue investigating to find out what's wrong for me. :(
User avatar
Posts: 102
Joined: Tue Jul 31, 2012 8:47 am
Location: Aberdeen, Scotland
by Gert van Loo » Mon Nov 05, 2012 9:08 am
First places to check:
- R23
- the fuse
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2096
Joined: Tue Aug 02, 2011 7:27 am
by poglad » Mon Nov 05, 2012 7:54 pm
Thanks Gert - checking! 8-)
User avatar
Posts: 102
Joined: Tue Jul 31, 2012 8:47 am
Location: Aberdeen, Scotland
by malcolmf » Sun Dec 09, 2012 7:30 pm
I fear I've damaged the LS6203 chip. I was just setting up to test the motor control when I found that the 9V battery, and the LS6203 were hot :shock:
I'd hooked the battery up the wrong way round. :oops:
Once everything had cooled off, I tried with the correct connections. No joy. No motor movement: 0V measured across MotA/MotB while the motors test program was running.
To test GPIO18, I hooked up GP18-B7, and put in the jumper B7 : then running the leds test program showed D7 would light up, and running the motors test program also lights up D7 with a variable brightness.
Fuse is OK, R23 seems to test as 0.5ohm(?)
Will I need to replace the LS6203?
Posts: 11
Joined: Tue Jun 19, 2012 2:20 pm
by Gert van Loo » Mon Dec 10, 2012 12:32 am
Possible.
That chip is rather robust but reverse voltage is always a bad idea.
Simplest test is to connect one control input high and one low.
So try e.g. MOTA = 3V3 and MOTB = GND.
No need to have any SW running.
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2096
Joined: Tue Aug 02, 2011 7:27 am