Go to Post "GP" isn't a gauge, it's a target. - Rich Kressly [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 04-02-2011, 21:28
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

Well, I've been busy tonight. See, I purchased some nice LED strips from SuperBrightLEDs.com (If you're an LED nerd, you probably should go look at it if you haven't already. I've had 3 or 4 orders from them and have been overly pleased by their service.)

Anyway, enough promoting them.

I purchased two of the RLBN-RGB30SMD RGB Narrow Rigid Light Bar that can be found on this page along with some other LED goodies. (Hmm... what else could we be doing with LEDs?).

Well, over the past two days at robotics, I've been making a PWM based control box to control each individual color channel, 6 in all (3/strip x 2 strips = 6). I finished building the control box just a few minutes before that session was over, so I never really got to go in deep with any programming with our programmer. We did verify that my box was working well with some simple on and off switches in LabVIEW.

Here are the VIs that just came in hot off of my mouse.

Underglow_Begin.vi (placed in the Begin.vi)
Click image for larger version

Name:	Underglow Begin.PNG
Views:	68
Size:	29.3 KB
ID:	9966

Underglow_Control.vi (placed in the 100ms loop in Periodic Tasks.vi)
Click image for larger version

Name:	Underglow Control.PNG
Views:	39
Size:	41.2 KB
ID:	9967

Underglow_Close.vi (placed in Finish.vi)
Click image for larger version

Name:	Underglow Close.PNG
Views:	23
Size:	20.4 KB
ID:	9968

If anyone wants the source code, here it is.
Underglow LED VIs.zip

Anyway, so what's the point of this thread? Well I have a question regarding the WPI_DigitalOutputGeneratePWM.vi
Click image for larger version

Name:	WPI_DigitalOutputGeneratePWM.PNG
Views:	22
Size:	15.8 KB
ID:	9970

It says that this VI will allocate 1 of 4 PWM generators. I'm guessing that means I can only have 4 of these in my Underglow_Control.vi? Maybe someone here who has used this control before can spread a little light on it?

Now I would use that handy WPI_PWMSetValue.vi, except that we only have 4 PWM channels free, plus the spacing and such between the PWM headers would make it more of a wiring hassle rather than just using the signal pins that I already have and using 1 PWM cable for each LED strip. Plus... we're using up 6 of the 10 PWM outputs, and we would rather not add an additional sidecar.

My only other idea is to combine both LED strips into 1 using a Y-cable and using 3 of the WPI_PWMSetValue.vi's unless I can truly use 6 of them (which I hope).

Let me know your thoughts, or if you have any questions about my project, just ask.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364

Last edited by RyanN : 04-02-2011 at 21:54.
  #2   Spotlight this post!  
Unread 04-02-2011, 22:20
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

Not knowing everything about the strip you bought, I have a few questions.

What color LEDs are you intending to use? If you only want blue strips, do you need more than two PWMs?

Another thing to consider is how much light you need. It is actually pretty easy to overdo it. The fabric is 600x brighter than white paint. Getting the LEDs near the camera lens is far more important than the brightness.

Greg McKaskle
  #3   Spotlight this post!  
Unread 04-02-2011, 22:38
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

Quote:
Originally Posted by Greg McKaskle View Post
Not knowing everything about the strip you bought, I have a few questions.

What color LEDs are you intending to use? If you only want blue strips, do you need more than two PWMs?

Another thing to consider is how much light you need. It is actually pretty easy to overdo it. The fabric is 600x brighter than white paint. Getting the LEDs near the camera lens is far more important than the brightness.

Greg McKaskle
This isn't for the lines on the floor. This is purely for decoration / looks. It's an RGB strip.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
  #4   Spotlight this post!  
Unread 04-02-2011, 22:52
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,588
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

Quote:
Originally Posted by RyanN View Post
Anyway, so what's the point of this thread? Well I have a question regarding the WPI_DigitalOutputGeneratePWM.vi
Attachment 9970

It says that this VI will allocate 1 of 4 PWM generators. I'm guessing that means I can only have 4 of these in my Underglow_Control.vi? Maybe someone here who has used this control before can spread a little light on it?

Now I would use that handy WPI_PWMSetValue.vi, except that we only have 4 PWM channels free, plus the spacing and such between the PWM headers would make it more of a wiring hassle rather than just using the signal pins that I already have and using 1 PWM cable for each LED strip. Plus... we're using up 6 of the 10 PWM outputs, and we would rather not add an additional sidecar.

My only other idea is to combine both LED strips into 1 using a Y-cable and using 3 of the WPI_PWMSetValue.vi's unless I can truly use 6 of them (which I hope).

Let me know your thoughts, or if you have any questions about my project, just ask.
PWMSetValue will output a servo style PWM signal, which is not what you want for your LEDs. WPI_DigitalOutputGeneratePWM.vi is new this year, and you might not find anyone who's used it before. Don't be afraid to experiment.
  #5   Spotlight this post!  
Unread 04-02-2011, 22:53
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

Quote:
Originally Posted by Joe Ross View Post
PWMSetValue will output a servo style PWM signal, which is not what you want for your LEDs. WPI_DigitalOutputGeneratePWM.vi is new this year, and you might not find anyone who's used it before. Don't be afraid to experiment.
Sounds good. I'll take a look at it tomorrow and report back. I do know for a fact that the DOs are not disabled when the robot is disabled.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
  #6   Spotlight this post!  
Unread 04-02-2011, 22:56
Dfontana Dfontana is offline
Registered User
AKA: David Fontana
FRC #3039 (Wildcat Robotics, Team Predator)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Destrehan, LA
Posts: 9
Dfontana is an unknown quantity at this point
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

Based on the name of the thread, I'm thinking that you're probably trying to create some ambient lighting underneath the robot's frame and not using this as a part of this year's vision system.

You have already pointed out your best option. You can drive them using the PWM generators for the DIO modules,but you will likely have to tie both strips together.

This may seem like a hassle, but in the end, it is probably the easiest to accomplish.

Alternatively, you may design and create a custom circuit to drive these. As our team is actually made up of a lot of students from the school's electronics class, this is probably the way we would go. You could use either a PIC or BASIC STAMP micro controller (Or any micro controller, really, though these are the ones I have experience with).

However, with this approach you could not change colors on-the-fly like you could if using labview with some virtual controls on the dashboard.
__________________
FIRST Team 3039 - Wildcat Robotics, Team Predator - Destrehan, LA.
  #7   Spotlight this post!  
Unread 04-02-2011, 23:03
Dfontana Dfontana is offline
Registered User
AKA: David Fontana
FRC #3039 (Wildcat Robotics, Team Predator)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Destrehan, LA
Posts: 9
Dfontana is an unknown quantity at this point
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

Quote:
Originally Posted by Joe Ross View Post
PWMSetValue will output a servo style PWM signal, which is not what you want for your LEDs. WPI_DigitalOutputGeneratePWM.vi is new this year, and you might not find anyone who's used it before. Don't be afraid to experiment.
Is there a significant difference between the two?
__________________
FIRST Team 3039 - Wildcat Robotics, Team Predator - Destrehan, LA.
  #8   Spotlight this post!  
Unread 04-02-2011, 23:10
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

Quote:
Originally Posted by Dfontana View Post
Based on the name of the thread, I'm thinking that you're probably trying to create some ambient lighting underneath the robot's frame and not using this as a part of this year's vision system.

You have already pointed out your best option. You can drive them using the PWM generators for the DIO modules,but you will likely have to tie both strips together.

This may seem like a hassle, but in the end, it is probably the easiest to accomplish.

Alternatively, you may design and create a custom circuit to drive these. As our team is actually made up of a lot of students from the school's electronics class, this is probably the way we would go. You could use either a PIC or BASIC STAMP micro controller (Or any micro controller, really, though these are the ones I have experience with).

However, with this approach you could not change colors on-the-fly like you could if using labview with some virtual controls on the dashboard.
My original idea was to use a PIC24, then use the PIC24 as an I2C Slave device and set it up that way... but with a full time job, then mentoring robotics for 20 hours a week, I simply do not have enough time to develop such a solution. We'll probably tie both together.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
  #9   Spotlight this post!  
Unread 04-02-2011, 23:22
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,588
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

Quote:
Originally Posted by Dfontana View Post
Is there a significant difference between the two?
servo style PWM gives you a pulse width between 0.67 and 2.33 ms, repeated every 5, 10, or 20ms. You have a very limited range of duty cycles and frequencies. It's suitable for driving a servo or a speed controller, but not much else.

The digital output PWM lets you set a duty cycle between 0-100% and a frequency from 0.6hz to 19khz.

Last edited by Joe Ross : 05-02-2011 at 09:57.
  #10   Spotlight this post!  
Unread 05-02-2011, 00:03
porterma64's Avatar
porterma64 porterma64 is offline
Registered User
FRC #0815 (Advanced Power)
Team Role: Electrical
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Allen Park
Posts: 14
porterma64 is an unknown quantity at this point
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

One thought for use of robot underglow is driver/alliance feed back. The driver will more than likely use this to tell if a lifter is in position. Maybe different colors desginate different lifter levels or signaling to the feeder stations what tube(s) to dispense. There are a lot of good ideas with this. Our team has been entertaining these ideas, but has not been high on the priority list. I hope to see if we can get it to work and let you know.

Mike Porter
FRC 815 Advance Power
  #11   Spotlight this post!  
Unread 05-02-2011, 00:21
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

Quote:
Originally Posted by Joe Ross View Post
servo style PWM gives you a pulse width between 1.67 and 2.33 ms, repeated every 5-20ms. You have a very limited range of duty cycles and frequencies. It's suitable for driving a servo or a speed controller, but not much else.

The digital output PWM lets you set a duty cycle between 0-100% and a frequency from 0.6hz to 19khz.
Wouldn't that be 0.67 ms and 2.33 ms? Or am I just getting sleepy?
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #12   Spotlight this post!  
Unread 05-02-2011, 01:36
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

Quote:
Originally Posted by Matt Krass View Post
Wouldn't that be 0.67 ms and 2.33 ms? Or am I just getting sleepy?
Wikipedia says standard servos go from about 1.25 to 1.75ms, so it makes sense the digital sidecar can do more than that (duh )

To the OP, what are you using to control the LEDs? FETs? Spikes? Victors?
  #13   Spotlight this post!  
Unread 05-02-2011, 07:29
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

Quote:
Originally Posted by WizenedEE View Post
Wikipedia says standard servos go from about 1.25 to 1.75ms, so it makes sense the digital sidecar can do more than that (duh )

To the OP, what are you using to control the LEDs? FETs? Spikes? Victors?
Two 2N2222 in the T092 package per channel. Ours are rated for 800mA each, so we have 1.6A of capability. I put in two to handle heat dissipation a little better. The weakest link in our box is the 12V regulator, rated for only 1A.

I'm not 100% sure of the current of each bar for each channel. We may have to bump it up to 2 or 3 voltage regulators, or we could drop the voltage regulator completely because of the fact that the RGB bar is pretty rugged.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
  #14   Spotlight this post!  
Unread 05-02-2011, 08:18
arizonafoxx's Avatar
arizonafoxx arizonafoxx is offline
Registered User
FRC #4395 (T-Rex)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Fort Mill, SC
Posts: 96
arizonafoxx is an unknown quantity at this point
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

I am wondering why you want to use PWM. Are you trying to get a color in between RGB YCM W? If you are just looking for the 7 basic colors couldn't you just use digital IO Out to drive the base of your transistors and then have power and ground come from the PD board? If I am thinking correctly this would be legal and fused at 20A.

P.S. Our team bought one of these flex strips as well. I like the fact that you can cut the bars in sections and just add wires to increase number of strips you have.
  #15   Spotlight this post!  
Unread 05-02-2011, 09:12
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Underglow LED Control using WPI_DigitalOutputGeneratePWM.vi

Silly me. I thought these were for illuminating the retroreflective strips on the columns and grids.

Greg McKaskle
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:47.

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