Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Using the TI LaunchPad from your KoP (http://www.chiefdelphi.com/forums/showthread.php?t=132061)

ayeckley 16-01-2015 14:53

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by jhersh (Post 1429266)
If you only decode in 1X mode (rising edge on A only) then you have 1/4 the interrupts to process.

That was the plan. The detents are located at each 1/100th of rotation (same as the tick resolution), so we would never be able to capitalize on the added resolution that 2X or 4X would bring. I suppose if we cared about angular rates then 2X or 4X might be helpful, but for our current application we don't care about that.

ILAMtitan 17-01-2015 20:31

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by ayeckley (Post 1429302)
That was the plan. The detents are located at each 1/100th of rotation (same as the tick resolution), so we would never be able to capitalize on the added resolution that 2X or 4X would bring. I suppose if we cared about angular rates then 2X or 4X might be helpful, but for our current application we don't care about that.

What implementation did you use to read the encoder? The ones I've seen use a very short interrupt, and should have any issues with missed ISRs.

Any chance you can share your code or modifications? I should be able to run some timing analysis to see why you're missing counts, and run it by our USB expert when I'm back in the office on Monday.

ayeckley 18-01-2015 08:31

Re: Using the TI LaunchPad from your KoP
 
To clarify, we haven't switched to the interrupt approach yet. That's just the eventual plan once we work through some higher-priority problems not related to the driver station. For now we've got our encoder working well enough to compete with if we really had to. We can share the source code but I have to travel for work so it might be a couple of days before I can post it. The students are generally reluctant to post on C-D.

Also, I see now that I was mistaken about the 10ms polling rate. The ADC conversions are done every 10ms, but there doesn't appear to be anything super-obvious that is throttling the polling loop (other than the time required to execute the ADC ISR). Shutting down that interrupt didn't improve the polled performance, which was a little counter-intuitive.

ILAMtitan 19-01-2015 21:45

Re: Using the TI LaunchPad from your KoP
 
I was able to finally spend some time tinkering with the LaunchPad co-processor for the GamePad (had business travel late last week), and I have it to a point where it's ready to go for those interested.

The first thing you need to do if you want to stack the LaunchPads like I did (and only if you stack them), is to update the hex files for the GamePad tool. The co-processor uses only pins 2 and 3 on J1 (full pinout available here: http://energia.nu/img/LaunchPadMSP430F5529.jpg), and these needed to be changed to high impedance in the GamePad so they don't interfere with the co-processor. I've uploaded new hex files to my personal git hub account to replace the existing ones: https://github.com/ILAMtitan/FRCGamePad_CoProcHex

Just replace these in the FRC GamePad Tool firmware folder as denoted in the readme, and then reflash your GamePad LaunchPad.

To program the second LaunchPad as the LED animation generator, you'll need to pick up Energia: http://energia.nu/

Run it once to generate the library folder in your Documents directory, akin to how the Arduino IDE works. Once the library folder is there, you can install the WS2811 Driver I wrote for Energia: https://github.com/ILAMtitan/WS2811Driver
The included readme should get you running correctly. I've made a handful of updates recently that will make it much more robust and easy to use, so feel free to use it for other LED projects as well if you feel so inclined.

The last bit of code is the actual co-processor code: https://github.com/ILAMtitan/GamePadCoProcessor
It's a simple sketch for Energia that will generate frames based on the input from the Option1 GamePad indicators. If you use a different option, you'll just have to change the relevant IO settings in the application.

The Energia sketch will generate frames one at a time, and only display them when a timer tells it to. This is a little bit different from many of the Arduino usages I've seen, but it doesn't use a wait statement which essentially holds the processor hostage. The code is reasonably well documented, so it shouldn't be too hard to figure out, just tricky. This method does let you cancel and change an animation between frames though.

Once both boards are programed, just plug em together, attach the LEDs (5V, GND, and Pin3 for the data), and then attach the USB cable to the LaunchPad that is the GamePad. Go ahead and attach any other buttons of indicators that you want to use in your OI as well. I've tested with with 60 LEDs on the USB port without extra power, but if you run into issues with power, you can use one of these: http://www.ti.com/tool/boostxl-battpack

The fuel tank will also let you run the LED strip without the DS being on, which is a nice bonus.

Let me know if you guys manage to try it out and how it works for you, and if you find any bugs.

billbo911 27-01-2015 23:28

Re: Using the TI LaunchPad from your KoP
 
Is there a chance there is a CAD file for this board. I know it's a minor part, but having accurate measurements would be nice.
I started to create one, but found hole spacing to not be ANSI Standard, so I decided to see if I ac find an official drawing before I spend the few minutes it will take to create it myself.

ILAMtitan 28-01-2015 09:43

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by billbo911 (Post 1435044)
Is there a chance there is a CAD file for this board. I know it's a minor part, but having accurate measurements would be nice.
I started to create one, but found hole spacing to not be ANSI Standard, so I decided to see if I ac find an official drawing before I spend the few minutes it will take to create it myself.

I created a dimensioned drawing from the PCB layout for you guys to use. You can get it here for now: https://txn.box.com/s/iid65s2kh6e1qrde1hoea7o2ify1g0u1

I don't do much formal CAD work, but all the relevant information should be there. I'll run it by some of the people on our team who are better at making these kinds of drawings and get a more formal one up on the wiki later.

If you're familiar with EagleCAD, you can grab the full hardware design package from here as well: http://www.ti.com/tool/MSP-EXP430F5529LP

billbo911 28-01-2015 09:55

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by ILAMtitan (Post 1435128)
I created a dimensioned drawing from the PCB layout for you guys to use. You can get it here for now: https://txn.box.com/s/iid65s2kh6e1qrde1hoea7o2ify1g0u1

I don't do much formal CAD work, but all the relevant information should be there. I'll run it by some of the people on our team who are better at making these kinds of drawings and get a more formal one up on the wiki later.

If you're familiar with EagleCAD, you can grab the full hardware design package from here as well: http://www.ti.com/tool/MSP-EXP430F5529LP

Thanks Bart!
I can do a little math based on that PDF and get the details I need.
I'm still learning SolidWorks 2014, but I'm certain I can create what I need now. I'm looking forward to what your team creates so I can do a little self critique based on other's work.

mplanchard 30-01-2015 20:39

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by ILAMtitan (Post 1435128)
I created a dimensioned drawing from the PCB layout for you guys to use. You can get it here for now: https://txn.box.com/s/iid65s2kh6e1qrde1hoea7o2ify1g0u1

I don't do much formal CAD work, but all the relevant information should be there. I'll run it by some of the people on our team who are better at making these kinds of drawings and get a more formal one up on the wiki later.

If you're familiar with EagleCAD, you can grab the full hardware design package from here as well: http://www.ti.com/tool/MSP-EXP430F5529LP

Do you have and IDF or PADS file? I can bring it into CircuitWorks and get the 3D board. Marie

ILAMtitan 30-01-2015 21:13

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by mplanchard (Post 1436369)
Do you have and IDF or PADS file? I can bring it into CircuitWorks and get the 3D board. Marie

I had to import it into Altium, and then export the IDF file, but you can find it here: https://txn.box.com/s/syur2lhypaihegkm2rfupxi2h0f11ufr

I was also able to export the STEP file from Altium, but I know those aren't always preferred due to file size and other restrictions. I've uploaded here for any interested parties though: https://txn.box.com/s/c0b11817xbyn6nxorrejz9728f1bublo

Since both of these are both via Altium, I can't guarantee the accuracy. If anyone can validate them, please let me know.

billbo911 01-02-2015 09:58

Re: Using the TI LaunchPad from your KoP
 
Please forgive me if this has been covered, but using my phone to search CD is rather difficult and I couldn't find it.
We have a driver's station setup with the Launchpad, that uses 18 buttons. Therefore, we have the Launchpad in mode 3. The problem is, we cannot see all of the buttons indicated on the driver's station. Is there a way to extend the driver station to display all 20 buttons as they are activated?

Alan Anderson 01-02-2015 10:46

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by billbo911 (Post 1436896)
Is there a way to extend the driver station to display all 20 buttons as they are activated?

The Driver Station program can not be modified by teams. However, you can change the Dashboard in any way you like.

ayeckley 01-02-2015 10:58

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by billbo911 (Post 1436896)
Is there a way to extend the driver station to display all 20 buttons as they are activated?

I've not found a way to manually change the number of buttons displayed but I did find that the Driver Station seemed to automatically expand to the active number of inputs based on the size of the data stream received from the LaunchPad. Perhaps there is some upper limit to the number of inputs it can expand to? Perhaps its behavior is dependent upon the screen size and resolution? Alas, none of this seems to be documented anywhere.

As Alan alluded to, your team may need to create a custom Dashboard to achieve what you are looking for.

billbo911 01-02-2015 11:17

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by ayeckley (Post 1436918)
I've not found a way to manually change the number of buttons displayed but I did find that the Driver Station seemed to automatically expand to the active number of inputs based on the size of the data stream received from the LaunchPad. Perhaps there is some upper limit to the number of inputs it can expand to? Perhaps its behavior is dependent upon the screen size and resolution? Alas, none of this seems to be documented anywhere.

As Alan alluded to, your team may need to create a custom Dashboard to achieve what you are looking for.

Quote:

Originally Posted by Alan Anderson (Post 1436912)
The Driver Station program can not be modified by teams. However, you can change the Dashboard in any way you like.

Thanks guys!
We have no intent on modifying the drivers station code. In fact, even seeing the buttons active on the driver station is not necessary. The biggest concern is that the RoboRio can read those inputs and respond accordingly.
We will work with our programmers to verify that their code can detect the button presses, and respond accordingly.

Joe Ross 01-02-2015 13:11

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by billbo911 (Post 1436920)
Thanks guys!
We have no intent on modifying the drivers station code. In fact, even seeing the buttons active on the driver station is not necessary. The biggest concern is that the RoboRio can read those inputs and respond accordingly.
We will work with our programmers to verify that their code can detect the button presses, and respond accordingly.

We noticed this yesterday also. Our java code responded to all 20 buttons, however. We filed a low priority bug against the driver station: https://usfirst.collab.net/sf/go/artf4002

billbo911 01-02-2015 13:20

Re: Using the TI LaunchPad from your KoP
 
Quote:

Originally Posted by Joe Ross (Post 1436965)
We noticed this yesterday also. Our java code responded to all 20 buttons, however. We filed a low priority bug against the driver station: https://usfirst.collab.net/sf/go/artf4002

This is exactly what I was hoping to find as well! Thanks Joe for confirming what I had suspected.


All times are GMT -5. The time now is 03:57.

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