RF Joystick using PIC MCU

USB PICs and the UBW

Moderator: phalanx

Post Reply
Weasel
Posts: 3
Joined: Sat Feb 28, 2015 9:56 pm
Location: University of Arizona

RF Joystick using PIC MCU

Post by Weasel » Sat Feb 28, 2015 10:42 pm

Hello all,

I am just getting started on a project to, ultimately, use a USB joystick to control a remote control airplane using radio frequency. This is a PIC MCU project, to help us learn how to program these bad boys. We broke the project down to sub-goals as follows:

1) Configure MCU to read USB inputs
2) Control servos and motor through physical hookup to MCU/joystick (mainly to make sure the joystick is being read correctly)
3) Hook up the servos to an RxTx to the MCU
4) Test flights

The first step (before step 1) is to decide on an MCU. I have done a lot of research on what I need, but I am mostly stuck on one thing... I'm still confused on the difference between USB peripheral and USB host. Which exactly do I need for the MCU to read the joystick? This determines whether I will use a PIC24F or a PIC16F/18F.

Also, as I was reading through the forums I noticed for the first time this UBW thing. We are trying to make this as cheap as possible (money is always an issue). Would it simplify our lives if we looked into UBW more and built one of those? If so, with the little amount of time I have spent looking into it thus far, it's a bit hard to find info about what it is and how they work, does anyone know of good places to read up on it?


I do apologize if this is too many questions for one post, but thank you so much for your time and help/direction! :D

qwertymodo
Posts: 118
Joined: Tue Jul 17, 2012 6:18 pm

Re: RF Joystick using PIC MCU

Post by qwertymodo » Wed Mar 04, 2015 12:12 pm

You are acting as the host. The controller is the device/peripheral. Think of it from the standpoint of the typical PC setup. The PC is the host, it controls the bus and reads from the gamepad, not the other way around. This limits your options in terms of chip selection. If you're wanting a full dev board, you'll probably have to go with a PIC32. If you're wanting to develop your own hardware, probably the simplest chip in terms of external components needed is the PIC24FJ(32/64)GB00(2/4). That being said, USB is pretty complex to get into, especially host-side. If you're not 100% set on using this particular gamepad, I'd highly suggest using something like a Wii Classic Controller Pro (not the WiiU Pro controller) as you'll have a much easier time with I2C master than with USB host.

Weasel
Posts: 3
Joined: Sat Feb 28, 2015 9:56 pm
Location: University of Arizona

Re: RF Joystick using PIC MCU

Post by Weasel » Fri Mar 20, 2015 8:06 pm

Thanks for the reply! Makes a lot of sense!

Post Reply