View Full Version : custom button panel
hi!
my team is trying to build a custom button panel to control our robot, and we have some questions:
- i have read somewhere that the button panel is made of some kind of I/O microcontroller with buttons connected to it. is there a specific one we must use? because we have a microcontroller in our lab (i can't remember his name) which can be used as HID.
- how do we make our program to "read" this kind of input? (we use java)
thanks in advance!
Bkeeneykid
14-09-2016, 14:23
Assuming you don't use FRC rule breaking space magic, you'll most likely just be building a joystick with no axes. You can use the TI Launchpad you received in your 2015 KOP, instructions here: http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_Operator_Interface_for_FIRST_Robo tics_Competition. You can then read it from code just like any other joystick button. You don't have to use this one, any HID compliant joystick will work. This one just has FRC support.
Side note: You can read from autonomous, it just reads the last joystick value right before autonomous begins.
Assuming you don't use FRC rule breaking space magic, you'll most likely just be building a joystick with no axes. You can use the TI Launchpad you received in your 2015 KOP, instructions here: http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_Operator_Interface_for_FIRST_Robo tics_Competition. You can then read it from code just like any other joystick button. You don't have to use this one, any HID compliant joystick will work. This one just has FRC support.
Side note: You can read from autonomous, it just reads the last joystick value right before autonomous begins.
no axes indeed XD
but we won't use this one, i think we don't have it anymore.
we have some kind of prototyping kit.
if the comuputer can read the signal from the device, the robot code will just "find" it?
or we need another software for it?
Assuming you don't use FRC rule breaking space magic, you'll most likely just be building a joystick with no axes. You can use the TI Launchpad you received in your 2015 KOP, instructions here: http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_Operator_Interface_for_FIRST_Robo tics_Competition. You can then read it from code just like any other joystick button. You don't have to use this one, any HID compliant joystick will work. This one just has FRC support.
Side note: You can read from autonomous, it just reads the last joystick value right before autonomous begins.
UPDATE: the microcontroller we have is CY8CKIT-003 PSoC® 3 FirstTouch™ Starter Kit
http://www.cypress.com/documentation/development-kitsboards/cy8ckit-003-psoc-3-firsttouch-starter-kit
Bkeeneykid
14-09-2016, 15:26
UPDATE: the microcontroller we have is CY8CKIT-003 PSoC® 3 FirstTouch™ Starter Kit
http://www.cypress.com/documentation/development-kitsboards/cy8ckit-003-psoc-3-firsttouch-starter-kit
This one is much harder to work with. The basics is the board that you connect your buttons to acts just like a joystick. You then load special software/firmware onto the board itself, but the computer you plug it into basically sees it as just another joystick. I have this specific board, but I don't know if it can act like a HID joystick. A relatively cheap option is the Teensy boards, which are easily programmed using Arduino and can show up as a joystick without much effort.
This one is much harder to work with. The basics is the board that you connect your buttons to acts just like a joystick. You then load special software/firmware onto the board itself, but the computer you plug it into basically sees it as just another joystick. I have this specific board, but I don't know if it can act like a HID joystick. A relatively cheap option is the Teensy boards, which are easily programmed using Arduino and can show up as a joystick without much effort.
you have to write a special software, or the comupter just sees the inputs?
and i am pretty sure it can act like an HID, we have it because it was used for a simmilar purpose.
and thanks for the help!
Bkeeneykid
14-09-2016, 15:34
you have to write a special software, or the comupter just sees the inputs?
and i am pretty sure it can act like an HID, we have it because it was used for a simmilar purpose.
and thanks for the help!
The computer has no special software. All the custom software that makes it reads the buttons is on the micro processor. Again, I don't have any experience with PSoC boards at all, so I can't help with programming that.
The computer has no special software. All the custom software that makes it reads the buttons is on the micro processor. Again, I don't have any experience with PSoC boards at all, so I can't help with programming that.
ok.
thank you very much for your guidance!
Peyton Yeung
14-09-2016, 15:48
If you have an arduino there is a software called unojoy that uses an arduino board and acts as a joystick.
eStop Robotics
14-09-2016, 21:18
hi!
my team is trying to build a custom button panel to control our robot, and we have some questions:
- i have read somewhere that the button panel is made of some kind of I/O microcontroller with buttons connected to it. is there a specific one we must use? because we have a microcontroller in our lab (i can't remember his name) which can be used as HID.
- how do we make our program to "read" this kind of input? (we use java)
thanks in advance!
You may find the Custom Control Interface (CCI) from eStop Robotics LLC to be a good simple solution to your "custom button panel" project.
The CCI requires no additional software and integrates easily with the FRC supported programming environments.
You can find more information on the following page at eStop Robotics:
https://www.estoprobotics.com/estore/index.php?_a=viewProd&productId=33
Bkeeneykid
14-09-2016, 22:44
You may find the Custom Control Interface (CCI) from eStop Robotics LLC to be a good simple solution to your "custom button panel" project.
The CCI requires no additional software and integrates easily with the FRC supported programming environments.
You can find more information on the following page at eStop Robotics:
https://www.estoprobotics.com/estore/index.php?_a=viewProd&productId=33
Interesting product, from a company I've not heard of yet. One concern, there doesn't seem to be many button inputs. If you do a autonomous switcher, that can be 5 inputs all by itself. Is there any way of increasing this? Also, do you have any way of doing the outputs in WPIlib like the MSP430 can?
Interesting product, from a company I've not heard of yet. One concern, there doesn't seem to be many button inputs. If you do a autonomous switcher, that can be 5 inputs all by itself. Is there any way of increasing this? Also, do you have any way of doing the outputs in WPIlib like the MSP430 can?
Can't speak to this product, but eStop makes some pretty neat stuff. We used one of their battery hold-downs this season and loved it.
You may find the Custom Control Interface (CCI) from eStop Robotics LLC to be a good simple solution to your "custom button panel" project.
The CCI requires no additional software and integrates easily with the FRC supported programming environments.
You can find more information on the following page at eStop Robotics:
https://www.estoprobotics.com/estore/index.php?_a=viewProd&productId=33
thanks for the recommendation!
but i think that if we will buy a new controller it will be an arudino or an msp430 because they are cheaper (the msp430 is in first choice for 20 credits, arduino is about 25$) and they have more I/O us to use.
anyone here is familiar with this kind of project and i can contact to him if i need any further help?
thank you very much guys!
jSchnitz
15-09-2016, 07:16
I'll second the eStop CCI board, we've used it for the past 4 or so years on all our button boxes. It's incredibly easy, no need to do anything with the board besides plug it into a computer.
Interesting product, from a company I've not heard of yet. One concern, there doesn't seem to be many button inputs. If you do a autonomous switcher, that can be 5 inputs all by itself. Is there any way of increasing this? Also, do you have any way of doing the outputs in WPIlib like the MSP430 can?
I would recommend the Dashboard be used for autonomous switching - it saves physical space on the custom button box as well as button inputs. Also if you decide to add an autonomous mode (or 24), it's easier to add an option virtually than physically.
Bkeeneykid
15-09-2016, 08:19
I'll second the eStop CCI board, we've used it for the past 4 or so years on all our button boxes. It's incredibly easy, no need to do anything with the board besides plug it into a computer.
I would recommend the Dashboard be used for autonomous switching - it saves physical space on the custom button box as well as button inputs. Also if you decide to add an autonomous mode (or 24), it's easier to add an option virtually than physically.
Yeah sure, you have a crap ton of autonomous modes. In the past, we've found issues with the dashboard not loading in time for us to select autonomous modes. I'll check this option out, but I really prefer a physical switch, which has less points of error (for us).
I've used this Adafruit Bluefruit EZ-Key - 12 Input Bluetooth HID Keyboard Controller (https://www.adafruit.com/product/1535) at about $20.
You wire up switches to the board. It connects to the laptop via Bluetooth. You can program the board to be a sudo keyboard with any key chord combination you want. (ie a,A, ctl-A, Alt-A, ctl-shift-alt-A, etc. )
You can use any kind of switch. There are places you can get joysticks with switches on the axis.
Not sure what the FRC rules are around bluetooth keyboards.
I've used these to make a wall button setup that talks to a home control computer, fun box for the grandmuchin, and working on a Kerbal Space Command console.
I've been working on a project for this. Team Fusion has been using this for several years and I made a new revision that fixed a few issues for Garnet Squadron.
Currently I'm working on taking LabVIEW out of the equation and relying on Python and the wxPython extension.
Essentially, the board is an Arduino Mega 2560. The only special chip is the LED driver, which is a constant current driver made for driving LEDs. I have the output set at 20mA, which is very common with LEDs. It's easy enough to change though.
https://raw.githubusercontent.com/GarnetSquardon4901/Operator-Interface-Control-Board/master/Documentation/images/frc_control_board_top.png
Here's the control board Garnet Squadron made for this year's robot:
https://raw.githubusercontent.com/GarnetSquardon4901/Operator-Interface-Control-Board/master/Documentation/images/IMG_0693.JPG
Finally, below is the Python code in action. I'm currently working on a simulator because lets face it... I don't want to carry around the driver station everywhere I go. :)
http://i.imgur.com/18PgX5D.png
The good news with the simulator is it works exactly the same as the real board. You can unplug/plug it in and toggle every input as well as see every output. Furthermore, since it works exactly the same as the real board, you can use the simulator to control the robot, or your simulated robot. The simulated robot with simulated button panel is where this can really shine.
This code isn't finished yet, but when it is, the GUI will not be shown by default. Instead, there is a taskbar icon that indicates the status of the control board. Green means good; red means bad.
http://i.imgur.com/zzUr717.png
Is this in mass production? No... I need to tweak a few more hardware things. For basic inputs such as switches and potentiometers and with LED outputs, it's great. There are some problems with running servos. They're interfering with the analog inputs. All the design files and software are in our repository here (https://github.com/GarnetSquardon4901/Operator-Interface-Control-Board).
Bkeeneykid
15-09-2016, 10:17
I've used this Adafruit Bluefruit EZ-Key - 12 Input Bluetooth HID Keyboard Controller (https://www.adafruit.com/product/1535) at about $20.
You wire up switches to the board. It connects to the laptop via Bluetooth. You can program the board to be a sudo keyboard with any key chord combination you want. (ie a,A, ctl-A, Alt-A, ctl-shift-alt-A, etc. )
You can use any kind of switch. There are places you can get joysticks with switches on the axis.
Not sure what the FRC rules are around bluetooth keyboards.
I've used these to make a wall button setup that talks to a home control computer, fun box for the grandmuchin, and working on a Kerbal Space Command console.
Bluetooth is illegal within the arena. See this rule:
Other than the system provided by the ARENA, no other form of wireless communications shall be used to communicate to, from, or within the OPERATOR CONSOLE.
Examples of prohibited wireless systems include, but are not limited to, active wireless network cards and Bluetooth devices. For the case of FIRST Robotics Competition, a motion sensing input device (e.g. Microsoft Kinect) is not considered wireless communication and is allowed.
Bluetooth is illegal within the arena. See this rule:
Thanks! So many rules, it's hard to remember what's in and whats out, thanks for taking the time to do the research and posting the rule.
Interesting product, from a company I've not heard of yet. One concern, there doesn't seem to be many button inputs. If you do a autonomous switcher, that can be 5 inputs all by itself. Is there any way of increasing this? Also, do you have any way of doing the outputs in WPIlib like the MSP430 can?
Option A: Use an encoder (http://www.electronics-tutorials.ws/combination/comb_4.html) to convert a given value to binary and read the buttons as a binary input.
Option B: Use analog input on "joystick" and just break it up into ranges.
Option C: Put the control in software on the Driver Station Dashboard and the robot doesn't start auto until it receives its directions.
We typically use Option C, particularly as we had at least three different settings to configure each match (goal, position, defense).
Option A: Use an encoder (http://www.electronics-tutorials.ws/combination/comb_4.html) to convert a given value to binary and read the buttons as a binary input.
Option B: Use analog input on "joystick" and just break it up into ranges.
Option C: Put the control in software on the Driver Station Dashboard and the robot doesn't start auto until it receives its directions.
We typically use Option C, particularly as we had at least three different settings to configure each match (goal, position, defense).
Option B works really well. Wire GND to the left most position and 5V to the right most position. Put resistors in series between each post of the other positions. It'll make it like a potentiometer, but with low resolution.
Say you have a 6 position switch, you would wire it like:
GND-> Position 0 - 2kOhm - Position 1 - 2kOhm - Position 3 - 2kOhm - Position 4 - 2kOhm - Position 5 <- +5V
Then connect it to the joystick input. I guess it goes from -1 to 1, like shown below:
Pos 0 -> ~-1
Pos 1 -> ~-0.6
Pos 2 -> ~-0.2
Pos 3 -> ~0.2
Pos 4 -> ~0.6
Pos 5 -> ~1
You'll want to factor in some tolerance. It won't be exactly -1, -0.6, etc. In this case, you have 0.4 units between each measurement. You can test between the cases.
if ana < -0.8
pos = 0;
else if ana >= -0.8 and ana < -0.4
pos = 1;
else ifana >= -0.4 and ana < 0
pos = 2;
else ifana >= 0 and ana < 0.4
pos = 3;
else if ana >= 0.4 and ana < 0.8
pos = 4;
else // in this case, this has to be true: ana >= 0.8
pos = 5;
You can also calibrate the software to the actual values measured. Since this isn't going in the bag this shouldn't be an issue.
I've been working on a project for this. Team Fusion has been using this for several years and I made a new revision that fixed a few issues for Garnet Squadron.
immpressive!
ye olde kaboom XD
but i am not looking for something so complicated, i just want to simpify the controls for the operator, because the joystick is sometimes making a lot of headache.
i will porbably use an arduino with unojoy, and if it won't work i will use the msp430.
i want to use the arduino IDE because i am not a programmer myself (and i do not wish to be XP) and this is the easiest way i can make this work.
can i contact you if i will have difficulties with wiring/programing?
thanks!
immpressive!
ye olde kaboom XD
but i am not looking for something so complicated, i just want to simpify the controls for the operator, because the joystick is sometimes making a lot of headache.
i will porbably use an arduino with unojoy, and if it won't work i will use the msp430.
i want to use the arduino IDE because i am not a programmer myself (and i do not wish to be XP) and this is the easiest way i can make this work.
can i contact you if i will have difficulties with wiring/programing?
thanks!
You absolutely can. You could probably reuse most of my Arduino code as well. The computer software isn't completed yet, but you're more than welcome to try it. It's fully functional and can be used right now, but it lacks configuration for the robot address or test functionality to drive outputs without the robot.
We use a keyboard emulator called PoKeys. https://www.poscope.com/products/pokeys-devices/
It's been really easy to work with as you assign values to keyboard keys you wouldn't normally use. Also, if the control panel happens to fail, the operator can make use of the keyboard in an emergency.
We use a keyboard emulator called PoKeys. https://www.poscope.com/products/pokeys-devices/
It's been really easy to work with as you assign values to keyboard keys you wouldn't normally use. Also, if the control panel happens to fail, the operator can make use of the keyboard in an emergency.
Here are some pictures of our panel:
http://i1043.photobucket.com/albums/b439/team3572/GOPR0075_zps63lfnk2k.jpg
http://i1043.photobucket.com/albums/b439/team3572/GOPR0076_zpswu6owcle.jpg
It seems like a good time to post our minimalist custom control solution (https://www.youtube.com/watch?v=oNOLHpGnTbc).
https://github.com/frc4646/lightswitch
It seems like a good time to post our minimalist custom control solution (https://www.youtube.com/watch?v=oNOLHpGnTbc).
https://github.com/frc4646/lightswitch
is the arduino connected to your computer? how? any special software?
the power to the light is from an external battery, or the robot battery?
can i use this method to control the movement of the robot?
is the arduino connected to your computer? how? any special software?
the power to the light is from an external battery, or the robot battery?
can i use this method to control the movement of the robot?
The Arduino is connected to the driver station off camera. No special software except for the gamepad library. The light is a 12v bike light (here at Andymark (http://www.andymark.com/Targeting-Light-p/am-3418.htm) but you can get a cheaper generic version) attached to a VEX Spike relay on the robot. You could, in theory, control the robot with this, but I doubt a light switch will be better than a joystick.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.