Go to Post If you plan the work and work the plan, you will very likely make it to the district championship. - IKE [more]
Home
Go Back   Chief Delphi > Technical > Motors
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 13-02-2013, 22:06
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Question Motor Drivers

Would it be possible to create a SLAVE circuit to the cRIO to control the small servos or even the motors, to prevent lag. I have an eight core processor that I could use to do all the dirty work...Just note, this would be for next year. not this year...no time
  #2   Spotlight this post!  
Unread 13-02-2013, 22:08
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Motor Drivers

The processor is a P8X32A, in the form of a DIP-40 chip. I will try to migrate this into a QFP or a QFN
  #3   Spotlight this post!  
Unread 13-02-2013, 22:40
Nirvash's Avatar
Nirvash Nirvash is offline
Registered User
AKA: Bryan
FRC #4676
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Orland Park, IL
Posts: 221
Nirvash has a spectacular aura aboutNirvash has a spectacular aura about
Re: Motor Drivers

Quote:
Originally Posted by team1165wins View Post
Would it be possible to create a SLAVE circuit to the cRIO to control the small servos or even the motors, to prevent lag. I have an eight core processor that I could use to do all the dirty work...Just note, this would be for next year. not this year...no time
Don't think it would be legal, see quoted rule below, though it would make for a neat project.

Quote:
R67
Every relay module, servo, and PWM motor controller shall be connected via PWM cable to the Digital Sidecar and be controlled by signals provided from the cRIO via the Digital Sidecar. They shall not be controlled by signals from any other source.
__________________
Team 3488 - Electrical Lead/Programming Lead 2011-2013
Team 4676 - Electrical/Programming Mentor 2013-Present
  #4   Spotlight this post!  
Unread 13-02-2013, 23:26
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,072
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: Motor Drivers

I don't understand why you want to do this. The cRIO has more than enough power to handle whatever you can throw, except maybe intensive vision processing, and the FPGA can go down to the microsecond.
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

  #5   Spotlight this post!  
Unread 13-02-2013, 23:46
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Motor Drivers

This sounds like a terrible idea, even if it were legal (which it is not).

The Propeller is one of the last processors I would want to use as a robot controller. There are far better micros which have far more useful peripherals.

The cRio IO is really quite slow since it's read through the FPGA which itself reads it from the modules over some high-speed bus (unsure exactly what it is), and the layering and OS overhead isn't insignificant, but it's still a 400mhz 32-bit PowerPC with hardware floating point and many megabytes of RAM. The Propeller runs at max 80mhz with an external clock, has 32 IO lines with no analog, no peripherals to speak of other than the 8 cores (Each of which has 512 words of RAM) plus 32K of system memory (RAM and ROM).

For some comparison, some of the MPC5500/5600 processors I deal with could be configured to run the RT control loops of a robot through peripherals and DMA entirely (without any actual processor action or interrupts). That is the processor I would like to use in FRC.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #6   Spotlight this post!  
Unread 13-02-2013, 23:50
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Question Re: Motor Drivers

I was wanting to make it possible for a microcontroller with parallel processing capabilities be getting input, talking to the cRIO, and then send motor output. If possible, I would like the microcontroller to take over while the cRIO is processing an image. This microcontroller costs $8 from manufacturer and $12 from stores and can operate twice as fast as the cRIO. with a clock running at 5MHz and a PLL of 16, 8 cores can give 160 MIPS (160,000,000 instructions per second). That is pretty nice for this. Also, the cRIO needs to continuously interrupt, reducing performance. Sending a Pulse through a PWM means that the cRIO will need to wait for the signal to send before it can do the next thing. This processor can have a core doing it in realtime. The microcontroller has i2c so it can be easily interfaced through the WPILib C++.
  #7   Spotlight this post!  
Unread 13-02-2013, 23:59
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Cool Re: Motor Drivers

I am working on a schematic for a control board with two MCP3204 chips for ADC 12b. 3v3 and 5v regs, and 256kb EEPROM. I also have programmed this chip in ASM before. Hard, but the performance was just great.
  #8   Spotlight this post!  
Unread 14-02-2013, 09:32
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Motor Drivers

Quote:
Originally Posted by team1165wins View Post
That is pretty nice for this. Also, the cRIO needs to continuously interrupt, reducing performance. Sending a Pulse through a PWM means that the cRIO will need to wait for the signal to send before it can do the next thing. This processor can have a core doing it in realtime. The microcontroller has i2c so it can be easily interfaced through the WPILib C++.
Interrupts don't exactly work that way.

There are many ways to do something. The MPC5500/5600 I mentioned earlier has dedicated hardware to time outputs (eMIOS and eTPU) so the processor only has to set them up at init and write a memory mapped register to set the value. The eTPU can even run timing-critical code on it's internal processor, without interaction with the PowerPC. The cRio uses an FPGA to do something similar, neither method requires an interrupt at all.

On a normal processor supporting interrupts, it would be common to generate PWM using a timer interrupt. You could setup the timer to interrupt when you next need to service some IO thing, go on and do other things, and interrupt back when it's time to do something again. All of this assumes the micro dosen't have PWM generation in hardware, most can do it using timers, the propeller has nothing resembling hardware PWM generation.

The purpose of an interrupt on micro programming without a pre-emptive OS is to provide a method to pre-empt the running task to deal with an important event (usually IO or clock related) allowing the running task to go on with it's buisness on a single faster core. There's not very much inherintly inefficient about the interrupt if the code is written well. When you can prioritize interrupts, it's common to run fast code in a low-priority ISR as a basic pre-emptive system.

An embedded microprocessor is frequently surrounded by peripherals which can do a LOT of things in hardware and only signal interrupts when they are needed or wanted. The propeller has none of these, and has to do everything in software. It will spend most of it's time doing these mundane IO tasks which are usually done in hardware, including waiting for events instead of using interrupts, which is exactly how it is designed to work. This means it will spend many clock cycles waiting for timing or spinning until it's ready, where an interrupt driven processor could use those clock cycle to do useful other things and interrupt back when it needs service again.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #9   Spotlight this post!  
Unread 14-02-2013, 14:27
philso philso is offline
Mentor
FRC #2587
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Houston, Tx
Posts: 938
philso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond repute
Re: Motor Drivers

Quote:
Originally Posted by team1165wins View Post
The processor is a P8X32A, in the form of a DIP-40 chip. I will try to migrate this into a QFP or a QFN
In addition to all the issues that Andrew has raised, I should point out that drawing the schematic is the "easy" part. Laying out a circuit board for a processor like this would require that you have experience designing (properly) multi-layer, high-speed circuit boards with multiple power and ground layers. There are no secrets or black art involved, just years of study. Learning to use the free Altium package only makes you a CAD operator, not a PCB designer. If you do not understand the difference, you are unlikely to design the circuit board properly, leading to "anomalous" operation that will make you tear your hair out. It is also likely that you will have a lot of trouble properly soldering the QFP and QFN packages.

It may be best if you do some research and find out what external processor boards other teams have been using to do their vision processing and buy one of them. It is likely that you will pay much more for just a bare PCB than you will for one of these fully functioning, mass produced processor boards.
  #10   Spotlight this post!  
Unread 14-02-2013, 16:50
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Motor Drivers

Excuse my bluntness, but the Propeller doesn't come within spitting distance of the cRIO. The PPC in the cRIO runs at 400MHz and can execute up to 3 instructions per clock - theoretical peak at 1.2 Billion instructions per second. The propellor has 8 cores at 80MHz, but takes at least 4 clock cycles to execute a single instruction - theoretical peak of 160 Million instructions per second. Note: Those are theoretical peaks, neither will sustain that throughput with actual code.

Then look at the quality of the instructions the two processors provide - The propeller doesn't even have hardware support for multiply, the PPC has a full fledged floating point unit and multiple integer units.

Once you add the cRIO's FPGA, it is a "brought a twisty straw and wadded up paper to a battleship fight" scenario.

Adding a propeller to your robot will provide no measurable benefit.
  #11   Spotlight this post!  
Unread 14-02-2013, 17:24
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Wink Re: Motor Drivers

Quote:
Originally Posted by philso View Post
In addition to all the issues that Andrew has raised, I should point out that drawing the schematic is the "easy" part. Laying out a circuit board for a processor like this would require that you have experience designing (properly) multi-layer, high-speed circuit boards with multiple power and ground layers. There are no secrets or black art involved, just years of study. Learning to use the free Altium package only makes you a CAD operator, not a PCB designer. If you do not understand the difference, you are unlikely to design the circuit board properly, leading to "anomalous" operation that will make you tear your hair out. It is also likely that you will have a lot of trouble properly soldering the QFP and QFN packages.

It may be best if you do some research and find out what external processor boards other teams have been using to do their vision processing and buy one of them. It is likely that you will pay much more for just a bare PCB than you will for one of these fully functioning, mass produced processor boards.
I am in a STEM program and I have teachers that help me with these problems.
  #12   Spotlight this post!  
Unread 14-02-2013, 17:31
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Exclamation Re: Motor Drivers

Quote:
Originally Posted by EricVanWyk View Post
Excuse my bluntness, but the Propeller doesn't come within spitting distance of the cRIO. The PPC in the cRIO runs at 400MHz and can execute up to 3 instructions per clock - theoretical peak at 1.2 Billion instructions per second. The propellor has 8 cores at 80MHz, but takes at least 4 clock cycles to execute a single instruction - theoretical peak of 160 Million instructions per second. Note: Those are theoretical peaks, neither will sustain that throughput with actual code.

Then look at the quality of the instructions the two processors provide - The propeller doesn't even have hardware support for multiply, the PPC has a full fledged floating point unit and multiple integer units.

Once you add the cRIO's FPGA, it is a "brought a twisty straw and wadded up paper to a battleship fight" scenario.

Adding a propeller to your robot will provide no measurable benefit.
I am pretty sure that vxWorks (on the cRIO) uses a lot of the processing power itself, just like how a slow netbook might have a 50% processor usage, running nothing but the operating system.
  #13   Spotlight this post!  
Unread 14-02-2013, 17:47
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,072
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: Motor Drivers

Quote:
Originally Posted by team1165wins View Post
I am pretty sure that vxWorks (on the cRIO) uses a lot of the processing power itself, just like how a slow netbook might have a 50% processor usage, running nothing but the operating system.
Even if you cripple the cRIO to only a quarter of the specs Eric provided*, it's still no contest. 1/4 of the cRIO's specs still beats the Propeller, and that's without the FPGA, which does a lot of the heavy lifting in FRC. I still don't understand what you expect to gain.

*I'm not an expert, but that sounds unrealistic under normal circumstances or even heavy FRC usage.
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

  #14   Spotlight this post!  
Unread 14-02-2013, 18:26
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Question Re: Motor Drivers

The system I am currently designing is supposed to be modular, kind of like the cRIO. an ADC breakout, PWMPAL Breakout are what I am wanting to create. The modules can easily be swapped, taken out, or be changed in order.
  #15   Spotlight this post!  
Unread 14-02-2013, 18:29
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Motor Drivers

By the way, What I was asking is if the propeller could do continuous processing, especially when the cRIO is busy. I was thinking about using a Raspberry Pi, but the problem I thought is that it draws lots of power, and you cannot just remove the power plug to shut it down.
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 22:55.

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