Need help with motor + GrovePi+


#1

hi all,
i need help with running a motor using the GrovePi+.
I have a small motor (Geared Motor GA13YN050) and the 2-coil latching relay that is compatible with the GrovePi.
any ideas as to how to connect the motor + battery (standard 9 volts + 80 ohm resistor)?
there are 2 connection sets on the relay and i dont want to try anything and cause damage.
I also have a PWM controler (Grove I2C motor driver) that is not supported. if anyone as an idea on how to start writing a driver i might give it a shot.
Tnx


#2

Hey,
The GrovePi would not be able to power a motor and you might risk damaging both the GrovePi and the Raspberry pi if you try to power it directly.

The I2C motor shield should be good enough to run the Raspberry Pi motor shield. To make that shield run with the Raspberry Pi, you’ll have to port this code to Python: https://github.com/Seeed-Studio/Grove_I2C_Motor_Driver/blob/master/I2CMotorDriverDemoCode/I2CMotorDriverDemoCode.ino . It looks pretty simple to port and you basically have to send a command and a data if anything is associated via I2C. We have had other people port similar libraries and you should have a look at this: https://github.com/DexterInd/GrovePi/blob/master/Software/Python/grove_barometer/basic/grove_barometer_lib.py to look at how it is done.

There are a couple of other examples too in the GrovePi repo that should help you out. You might also find this a bit helpful in understanding how the GrovePi works: http://www.dexterindustries.com/GrovePi/engineering/grovepi-protocol-adding-custom-sensors/ .

Do let us know if you need any help.

-Karan


#3

tnx,
i used the 2-coil relay with external power source and it worked fine. i needed 2 coils to run the motor CW and CCW but it works.
On the 2-coil relay i have 6 connectors. 2 common, 2 NO and 2 NC.
why there are 2 of each? are they the same or does it have 2 independent relays?


#4

Hey Deadbit, can you send a link to the sensor you’re trying to use? I think it might clear up what’s connected to what. I assume that each coil has it’s own option (of being NC or NO), but we should take a look at the schematic first. Neither Karan or I have worked with this one before.


#5

Is this the relay you’re using?


#6

Hey,
If you look closely at the wiki for the latching relay here: http://www.seeedstudio.com/wiki/Grove_-_2-Coil_Latching_Relay , it’s mentioned: The relay hold in “set” status(Comm and NO connected) in default, when there is a rising edge on the SIG pin. It turns the “reset” state(Comm and NC connected). Also the relay is a DPDT relay so you can indeed control two different devices with one relay.

-Karan