I am a member of team 7034 and our team is looking to make a specific robot for outreach events. We are looking to control this robot without a laptop, as during outreach events it may be easier if we don’t have to drag a laptop around. Is there any way to control a typical FRC robot (Spark maxes, Pneumatic Solenoids, etc.) without a laptop? Can you just use a Raspberry Pi or Arduino with a wireless connection?
I personally dont like the laptop either but think of it as an E stop button (the spacebar) in case something goes horribly wrong.
If you really want to get the laptop out of everything, bring a backpack, set the laptop to remain on even with the lid closed, run the controller wires outside and you should be good to go.
Since you mentioned that you’re doing this as outreach, remember that safety should be your main priority as anything can happen. I dont know if it is possible to program a button that functions like an E stop on the controller but that would be very helpful if you dont have split second access to the laptop.
Decent enough laptops are so cheap these days, I’m not sure why you’d want to switch. But if you do, there are a couple options.
If it’s all Spark Maxes, you can control those over PWM, so you can use any standard hobby RC transmitter and receiver. I’ve had decent luck with the Flysky FS-i6. I recommend it over the AndyMark “Cheap & Dirty” control system, which I had some uncorrectable issues with in conjunction with Spark Maxes which expect a 1.0ms-2.0ms PWM signal. Doing solenoids with an RC receiver gets a little more involved, and you’ll need some other device to change the PWM signal from the receiver into a switched relay output to drive the solenoids.
Another option that retains some programmability could be something like a Vex Cortex Controller, with the Vexnet handheld controller. Again, PWM only. No CAN. For solenoids, it looks like Vex sells p/n 275-1417 solenoid driver cable.
There’s also the CTRE Hero board which I believe can use a wireless Xbox controller directly. It’s a powerful little board, but I haven’t seen it heavily used by too many on here. I also doubt you’d be able to use its CAN with Spark Maxes, but you may be able to with Falcons or Talons, or use PWM with Spark Maxes. It looks like AndyMark sells the Hero as well.
Again though I ask, why? Just get a cheap lightweight laptop with good battery life. It doesn’t take much just to run the FRC driver station.
There isn’t an easy way as far as I know. Sanddrag beat me to the suggestion of the Cheap and Dirty Radio Control. Before I was on my team, we made a T-Shirt shooting robot that used a DJI controller with an antenna connected to an Arduino. The Arduino controls PWM signals to the speed controllers and activates relays that go to the solenoid valves for the pneumatic.
Thank you for the replies, I will look into the Hero board, and will use your advise about using a laptop to decide if we will continue in this direction.
Just be mindful that it is not C++ or Java, nor does it use the standard WPILIB libraries. It uses C# .Net Micro Framework, which sounds like it would be similar to C++, but it is actually closer to Java. Make sure your programmers are able to actually program the Hero board.
It also can only handle one USB Controller at a time. I have used it previously for a project and we couldn’t figure out how to use more than one controller, and CTRE confirmed it cannot do so. It is however still a good little board for outreach purposes in my opinion.
There is an Iphone/Ipad app: “iDS” that will act as a driver station - and control your RoboRio,
Not sure if still available - but I have used it and have it on my phone - but not used it very much - found it to be a little awkward / unsafe for demo purposes
We’ve used the Hero board for outreach robots. This supports CAN based controllers (particularly the CTRE ecosystem that we tend to use since CTRE provides a library that is similar to the library available for the RoboRio). AndyMark sells a package that includes a logitech controller which we’ve used. You program in C# which is similar to both C++ and Java, so we were able to pick it up pretty quickly. We have at least 2 robots using the Hero board: our T-Shirt Shooter and a Connect 4 Robot. We have another robot we were converting over to a Hero on the side that is in process. Range from the controller to the robot is about 30 feet when the batteries are strong.
We also have another Connect 4 Robot that uses the old VEX Cortex which also doesn’t require a laptop. You can program this with RobotC or EasyC (either text-based or block based) programming.
Cost wise, the Hero system is cheaper and you can easily retrofit an existing FRC robot.
For my college robotics team we used a Raspberry Pi in place of the roboRio, which connected to an xBee that took processed controller inputs from another xBee on a laptop. While this isn’t exactly what you’re looking for, I don’t think it would be a stretch to use a Bluetooth controller or a controller/wireless dongle pair connected directly to the Pi and do input processing there. Just make sure that controller connection is very stable AND you have robust failsafes in case you do lose input for a bit.
We used an Adafruit PCM9865 breakout board for motor control (16 PWM outputs controlled over I2C) that controlled TalonSRs - power distribution was identical to FRC.
Be ready to explore some hardware and software outside of what you’re used to to get this working, as you won’t have the usual safety net of FRC software (and support) with this approach. Good luck with the project!
I’ve had okay luck with mapping a switch to 100% PWM output and using a random extra motor controller to drive a solenoid. No issues, but only did it on 2-3 different test beds with Talon SRs.
We have a microswitch connected to the solenoid, and a servo that is RC controlled to trigger them, for our t-shirt cannon. The servo actually sets between two switches to give a 3-way (on, off, on) control.
edit: This picture isn’t from our robot but basically the mechanism used to run solenoids from the RC controller:
I built a test board to drive a bunch of drivetrains without having to rewrite code or wire entire bots. I used a raspberry pi and 6 jaguars driven with pwm signals. It uses 40 amp breakers and the 120 main breaker as the master switch. The pi automatically runs a python script on startup and detects which wireless controller is plugged in. It then decides whether to run mecanum or tank drive based on the controller. The problem with doing this is that after a while when the battery runs low enough the pi will shutoff and stop sending pwm signals to the jaguars which the jaguars then think is full reverse and it full powers out of control.
It works fine for what I use it for but if you are planning on using it for demos and in public places I recommend against using a diy solution with a pi or Arduino. It is definitely possible but the risk of a diy solution failing unpredictably is too much for an outreach event.
That’s definitely not how that’s supposed to work… there’s a big difference between no signal and a full-reverse signal. Are you sure you’re not running a weird non-standard firmware on the Jags or something?
I have two other thoughts.
- you could look into buying an ftc control module (you may need to deal with power converaion) and using it with a phone. This brings me to…
- This is almost certainly more trouble than it is worth, and may not actually be feasable, but you could try to put linux on a phone or tablet and install the frc driver station on it. If I remember correctly, the shields used to support linux natively. Usb host would be nice, but not 100% necessary.
There was a thread on here a few months ago where someone explained how to “hack” the roboRIO so it would provide its own enable packets as if they were coming from the driver station (so the roboRIO would enable as soon as it booted without needing a laptop). I don’t necessarily condone the idea, but if you want to use FRC hardware that’s pretty much the only way to not need a laptop. Please be very careful if you decide to do this though; there are important reasons why the standard FRC software requires a laptop to enable it, most of which revolve around operator safety.
I wonder if someone were to go that far if it would be easier and safer to do that with an esp32 or something. That way you could still have some level of safety (at least two buttons, enable and estop. Actually three would be better. Enable disable and estop).
However, it would still be dangerous as the buttons would not be implemented the same way. So, in a runaway situation, one may not react as quickly.
I think this is it. Please make sure to test before public demos. Also not sure if it works with the latest robo Rio updates. I have used this in the past with an Android device on our driving robot recliner. It was a little iffy but I didn’t spend any time trying to tune it.
This is very similar to how we set up a robot to drive when I was in college in '98. “Cheap” controllers for our robot voltage and current requirements didn’t exist, so we used a servo that actuated a 3 position switch for forward, stop, and reverse.
Had to write my own code to create pwm signals to drive the jags so there very well could be something wrong with it. But it works for what I needed and I had already spent too much time troubleshooting so I called it good enough. I was more warning against the use of a super diy solution due to safety issues.