Go to Post Just put it in the dryer for a few extra cycles. That should shrink it down nice and small. - notmattlythgoe [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-04-2013, 21:18
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 274
Bpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant future
Raspberry pi with talon

Has anyone used a raspberry pi to run a motor controller. If so how have you done the pwm.
  #2   Spotlight this post!  
Unread 15-04-2013, 21:34
fb39ca4 fb39ca4 is offline
Registered User
FRC #1899
 
Join Date: Jan 2012
Location: Bellevue, WA
Posts: 195
fb39ca4 is a name known to allfb39ca4 is a name known to allfb39ca4 is a name known to allfb39ca4 is a name known to allfb39ca4 is a name known to allfb39ca4 is a name known to all
Re: Raspberry pi with talon

If you wanted to do this for an FRC robot, well, you can't because only the digital sidecar may connect directly to the PWM motor controllers. I don't believe the RasPi has PWM support built in, but you could use the CPU to manually generate the PWM signal. Alternatively, you could get something like this which uses the i2c bus to control multiple PWM outputs: http://adafruit.com/products/815

EDIT: There is one PWM output, but that may or may not be enough for your needs.

Last edited by fb39ca4 : 15-04-2013 at 23:26.
  #3   Spotlight this post!  
Unread 15-04-2013, 21:50
gixxy's Avatar
gixxy gixxy is offline
Programming and Arduino Mentor
AKA: Gustave Michel III
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 207
gixxy is on a distinguished road
Re: Raspberry pi with talon

I have not done so personally, but basically what you want to search for is how to control a servo with the raspberry pi. Servos and FRC MotorControllers are controlled the same way in code, they just each use different length Pulse Positions.
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 3468 - Programming Mentor
2015 - Present - Lurker
  #4   Spotlight this post!  
Unread 15-04-2013, 22:13
GeorgeM's Avatar
GeorgeM GeorgeM is offline
FRC #610 Alumni
FRC #1310
 
Join Date: Mar 2013
Rookie Year: 2008
Location: Toronto
Posts: 28
GeorgeM is a splendid one to beholdGeorgeM is a splendid one to beholdGeorgeM is a splendid one to beholdGeorgeM is a splendid one to beholdGeorgeM is a splendid one to beholdGeorgeM is a splendid one to behold
Re: Raspberry pi with talon

A quick Google search presented this.

It seems like a good tutorial. Although I'm sure you already did a Google search before posting on Chief.

An interesting tutorial on a software based PWM tutorial.

I have not had experience with it myself, however I do own a Pi and after my exams finish tomorrow I may play around with it a little bit!
  #5   Spotlight this post!  
Unread 15-04-2013, 23:24
asteb27 asteb27 is offline
Registered User
FRC #0293
 
Join Date: Feb 2013
Location: New Jersey
Posts: 37
asteb27 is an unknown quantity at this point
Re: Raspberry pi with talon

I would suggest an arduino for this sort of thing. The raspberry pi really shouldn't be used for this. It has a full stack for a reason, it is meant as a higher level device than an arduino or other micro controller. That being said, there is no reason why you can't control a PWM with a pi, it just is a waste of the potential.
  #6   Spotlight this post!  
Unread 16-04-2013, 10:02
engunneer's Avatar
engunneer engunneer is offline
Alumni turned Mentor
AKA: Branden Gunn
FRC #4761
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1996
Location: Reading, MA
Posts: 864
engunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond repute
Re: Raspberry pi with talon

Quote:
Originally Posted by asteb27 View Post
I would suggest an arduino for this sort of thing. The raspberry pi really shouldn't be used for this. It has a full stack for a reason, it is meant as a higher level device than an arduino or other micro controller. That being said, there is no reason why you can't control a PWM with a pi, it just is a waste of the potential.
If the pi is also doing vision processing....

Using a pi for just a single Servo/PWM output may be overkill, but I doubt it is the entire application.

The pi can be a full cRIO replacement for a practice or smaller robot for teaching, etc.

Also, a pi and an Arduino are nearly the same price.
__________________
Student FRC23 (1996-1999), Mentor FRC246 (2000), Mentor FRC1318 (2007-2009), Mentor FRC93 (2011), Mentor FRC2151 (2012), Mentor FRC23 (2013), Mentor FRC4761 (2014-2017)
1998 - National Chairman's Award and Woodie Flowers Award (FRC23, Mike Bastoni ) | 2007 - PNW SF (488, 1595) | 2008 - Oregon RCA - Seattle #2 Seed, SF (488, 1696) | 2009 - Oregon #1 Seed, Winners (1983, 2635) - Seattle SF (945, 2865) - Galileo #2 Seed, SF (973, 25) | 2012 Midwest F (111, 71) | 2014 RIDE Winners (78, 125), Inspector - NEU #24, QF (3479, 3958) - NECMP #35 | 2015 Reading #11, SF (1058, 190), Inspector - RIDE #17, QF(4055, 5494), Inspector - NECMP #57 | 2016 Reading #4, SF (133, 4474), DCA, Inspector - Ride #22, SF (1735, 2067), Creativity, Inspector - NECMP #48, RCA - Archimedes
  #7   Spotlight this post!  
Unread 16-04-2013, 10:16
MrForbes's Avatar
MrForbes MrForbes is offline
Registered User
AKA: Jim
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Sierra Vista AZ
Posts: 6,017
MrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond repute
Re: Raspberry pi with talon

Quote:
Originally Posted by engunneer View Post
Also, a pi and an Arduino are nearly the same price.
That's what I was gonna say..... if the computer only costs $35, who cares that you're not using it's full potential?
  #8   Spotlight this post!  
Unread 16-04-2013, 11:51
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 274
Bpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant future
Re: Raspberry pi with talon

This robot will be used for a teaching tool and is a off season project. We will need to run 2 motor controllers along with multiple other features. We are just wondering how much processing power will 2 PWM take up.
  #9   Spotlight this post!  
Unread 16-04-2013, 17:57
William Kunkel William Kunkel is offline
Programming Lead
AKA: Kunkel
FRC #0422 (Mech Tech Dragons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Richmond, VA
Posts: 94
William Kunkel is an unknown quantity at this point
Re: Raspberry pi with talon

You really shouldn't be running a robot on a system with a non-real-time operating system. There is no guarantee that your motors would be prioritized over less important tasks, like image processing. Not having consistent control of motors isn't just hard to control, it's downright dangerous.
  #10   Spotlight this post!  
Unread 17-04-2013, 08:22
ToddF's Avatar
ToddF ToddF is offline
mechanical engineer
AKA: Todd Ferrante
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Apr 2011
Rookie Year: 2011
Location: Newport News, VA
Posts: 600
ToddF has a reputation beyond reputeToddF has a reputation beyond reputeToddF has a reputation beyond reputeToddF has a reputation beyond reputeToddF has a reputation beyond reputeToddF has a reputation beyond reputeToddF has a reputation beyond reputeToddF has a reputation beyond reputeToddF has a reputation beyond reputeToddF has a reputation beyond reputeToddF has a reputation beyond repute
Re: Raspberry pi with talon

Yes, I have successfully driven motor controllers using the Raspberry Pi, but they were Jaguars, not Talons. The method works for anything controlled with a RC style PWM signal. I used the servoblaster drivers. These allow you to control up to 8 PWM channels simultaneously using the DIO pins. I started by creating a simple text based user interface using BASH scripting language. Then I moved to python, first controlling the motors with a joystick attached to the Pi, then using two Pi's, one which would be on the robot and the other that acts as a control station. When I paused for build season, the control station could send commands to the robot over a wi-fi link.

I posted all of my code on the Raspberry Pi forums. Once you are registered, you can find it by reviewing my posts using this link.

Also, if you go to my youtube channel, linked in my signature, you will find videos demonstrating the various stages of the development of the system.

The goal is to develop a robot control system as cheaply as possible. I would ultimately like to be able to sit in my study and drive a teleoperated robot, with live video, around my backyard using my home wi-fi network. Right before build season, I could run 8 PWM channels and stream video from the robot controller Pi, but could not get the driver's station Pi to display the streamed video, (though I could display it on my desktop, laptop, Nexus 7, and smart phone).
__________________
Todd F.
mentor, FIRST team 2363, Triple Helix
Photo gallery
video channel
Triple Helix mobile

Last edited by ToddF : 17-04-2013 at 08:31.
  #11   Spotlight this post!  
Unread 18-04-2013, 21:08
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 274
Bpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant future
Re: Raspberry pi with talon

toddf. thanks for your help. we are working on a very similar project as you are. This will be very help to start out.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 23:16.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi