This is my first post to the forum, so please be gentle!
I was looking for advice on how easy it would be to connect the v2 motor shield (i.e. just the standalone shield without an Arduino) to a rasperry pi.
From the specs of the shield it would seem that only SDA and SCL are required (in addition to power), and these are available on the pi.
I don't think the 5v hobby servo connections would work as the signal seems to come from the Arduino, but this is not a big issue for me.
Obviously I would need to develop some software to run the motors from the pi, but Adafruit already provides some example python code for the PWM driver chip.
Just wondering if there is anything I've missed that would put a major spanner in the works, or if anyone has done this already and has any hints or tips?
Thanks!
Motor Shield v2 connection to Rasperry Pi
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Motor Shield v2 connection to Rasperry Pi
According to the product page, the V2 shield no longer relies on external PWM for motors:
I'll have to check on whether or not the shield has pullups to 5V on SCL and SDA - if so, you would need a level shifter to use it with a Pi.
EDIT: Yes - I just looked at the schematic. There are pullups on SDA and SCL. You will need an I2C compatible level shifter:
http://www.adafruit.com/products/757
Code: Select all
Instead of using a latch and the Arduino's PWM pins, we have a fully-dedicated PWM driver chip onboard. This chip handles all the motor and speed controls over I2C. Only two pins (SDA & SCL) are required to drive the multiple motors
EDIT: Yes - I just looked at the schematic. There are pullups on SDA and SCL. You will need an I2C compatible level shifter:
http://www.adafruit.com/products/757
- lonetone
- Posts: 10
- Joined: Fri Apr 12, 2013 11:20 am
Re: Motor Shield v2 connection to Rasperry Pi
Thanks very much for the useful information, and the quick response - I've decided to give it a try!
Re. the 5v level shifter - I notice on the motor shield PCB there are some solder pads with the words "logic 3v 5v" printed by the side, these seem to be set at 5v by default.
However, if the pads are changed to 3v would it change the shield logic levels to 3v, and if so would it remove the need for the I2C level shifter? (There's no information on what these pads do on the website that I could see).
Thanks again!
Re. the 5v level shifter - I notice on the motor shield PCB there are some solder pads with the words "logic 3v 5v" printed by the side, these seem to be set at 5v by default.
However, if the pads are changed to 3v would it change the shield logic levels to 3v, and if so would it remove the need for the I2C level shifter? (There's no information on what these pads do on the website that I could see).
Thanks again!
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Motor Shield v2 connection to Rasperry Pi
Now that you mention it, there is a solder jumper on the schematic to select either 5V or 3.3V.
So, yeah - if you change it to select 3.3V, then you would not need the level shifter.
So, yeah - if you change it to select 3.3V, then you would not need the level shifter.
- lonetone
- Posts: 10
- Joined: Fri Apr 12, 2013 11:20 am
Re: Motor Shield v2 connection to Rasperry Pi
Thanks for checking - I've placed an order and will update this thread with my findings.
Cheers!
Cheers!
Please be positive and constructive with your questions and comments.