loading
1Instructables6,064Views15CommentsJoined August 22nd, 2015

Tell us about yourself!

Complete Your Profile
  • DrTrigon followed angryfeet2 weeks ago
      • Hacking a USBasp Dongle Into a PPM2USB RC SIM Dongle
      • SPI Interface to the FlySky/Turnigy 9x
      • Fixing a Cheapo Chinese MP3 Player
  • RC Transmitter to USB Gamepad Using Arduino

    Thanks a lot for your answers!2) All you said is true! The PC USB port is safe! My question was more in the other direction, here I am more concerned about the arduino, since currently there are 3.6V zener diodes connected directly to the atmega chip pins, which output up to 5V.A schematic for this instructable would be perfect! :)In your link the zener diodes are missing, so I found this: https://www.insidegadgets.com/wp-content/uploads/... (the zener diodes are in between USB and 68 ohm resistors and not in between 68 ohm resistors and atmega)

    Ok figured this out. Basically everything was there but needed a bit bug fixing. I had to enable to send bigger data packages for gamepad_report_t struct (9 bytes) and thus use "write" instead of "usbSetInterrupt". See the gist mentioned before to get an 8 axes and 8 buttons gamepad.I have 2 hardware related questions:1. According to the instructions VIN has to be connected to USB 5V. This means that +5V on the board will only be about 4V. While this might be fine for usual operation, what happens when connecting the USB on the board too, e.g. for serial debugging? This USBs 5V is connected to the boards +5V. Wouldn't it make more sense to connect our USBs 5V to +5V instead of VIN?2. I miss resistors between the arduino digital pins and USB D+, D- lines as they would...see more »Ok figured this out. Basically everything was there but needed a bit bug fixing. I had to enable to send bigger data packages for gamepad_report_t struct (9 bytes) and thus use "write" instead of "usbSetInterrupt". See the gist mentioned before to get an 8 axes and 8 buttons gamepad.I have 2 hardware related questions:1. According to the instructions VIN has to be connected to USB 5V. This means that +5V on the board will only be about 4V. While this might be fine for usual operation, what happens when connecting the USB on the board too, e.g. for serial debugging? This USBs 5V is connected to the boards +5V. Wouldn't it make more sense to connect our USBs 5V to +5V instead of VIN?2. I miss resistors between the arduino digital pins and USB D+, D- lines as they would be needed for the voltage drop down to 3.6V given by the zener diodes. As this should not be a big issue with USB 5V connected to VIN, it might become one when connecting to +5V (and increasing +5V from about 4V to 5V). Is there a deep reason for your design? Is this a 68 ohms USB termination or impedance thing? Or is it possible that you accidentally swapped USB D+,D- pins with the arduino digital pins when writing down these instructions?

    Ok figured this out. Basically everything was there but needed a bit bug fixing. I had to enable to send bigger data packages for gamepad_report_t struct (9 bytes) and thus use "write" instead of "usbSetInterrupt". See the gist mentioned before to get an 8 axes and 8 buttons gamepad.I have 2 hardware related questions:1. According to the instructions VIN has to be connected to USB 5V. This means that +5V on the board will only be about 4V. While this might be fine for usual operation, what happens when connecting the USB on the board too, e.g. for serial debugging? This USBs 5V is connected to the boards +5V. Wouldn't it make more sense to connect our USBs 5V to +5V instead of VIN?2. I miss resistors between the arduino digital pins and USB D+, D- lines as they would...see more »Ok figured this out. Basically everything was there but needed a bit bug fixing. I had to enable to send bigger data packages for gamepad_report_t struct (9 bytes) and thus use "write" instead of "usbSetInterrupt". See the gist mentioned before to get an 8 axes and 8 buttons gamepad.I have 2 hardware related questions:1. According to the instructions VIN has to be connected to USB 5V. This means that +5V on the board will only be about 4V. While this might be fine for usual operation, what happens when connecting the USB on the board too, e.g. for serial debugging? This USBs 5V is connected to the boards +5V. Wouldn't it make more sense to connect our USBs 5V to +5V instead of VIN?2. I miss resistors between the arduino digital pins and USB D+, D- lines as they would be needed for the voltage drop down to 3.6V given by the zener diodes. As this should not be a big issue with USB 5V connected to VIN, it might become one when connecting to +5V (and increasing +5V from about 4V to 5V). Is there a deep reason for your design? Is this a 68 ohms USB termination or impedance thing? Or is it possible that you accidentally swapped USB D+,D- pins with the arduino digital pins when writing down these instructions?

    Thanks a lot for your answers!2) All you said is true! The PC USB port is safe! My question was more in the other direction, here I am more concerned about the arduino, since currently there are 3.6V zener diodes connected directly to the atmega chip pins, which output up to 5V.A schematic for this instructable would be perfect! :)In your link the zener diodes are missing, so I found this: https://www.insidegadgets.com/wp-content/uploads/... (the zener diodes are in between USB and 68 ohm resistors and not in between 68 ohm resistors and atmega)

    View Instructable »
  • DrTrigon followed frank260801151 month ago
      • LED Pocket Watch
      • Easy Cord Wrapping Around Power Bricks
      • Using SMD Components on Breadboards
  • RC Transmitter to USB Gamepad Using Arduino

    Thanks for your hints. I had to modify libraries/HIDJoy/HIDJoy.cpp, libraries/HIDJoy/HIDJoy.h and libraries/HIDJoy/usbconfig.h according to e.g. http://eleccelerator.com/tutorial-about-usb-hid-r... . It works very nicely with 1 button (and is trivially expandable up to 8) and also with 6 axes. What I was not able to get running yet is 8 axes. Even though the gamepad does get recognized by the OS, the values don't change. What is the size limit on the gameReport struct? I would guess 64 byte, but it seams that 9 does not work either... Or I used the wrong axes ("Slider")?For convenience I put it on gist: https://gist.github.com/drtrigon/0458d5d3bb55c841...

    View Instructable »
  • DrTrigon made the instructable RC Transmitter to USB Gamepad Using Arduino1 month ago
    RC Transmitter to USB Gamepad Using Arduino

    Here the picture of my box. It is an Arduino UNO with a shield on top; lower-left corner is the USB interface, upper-right is the PPM port. Enjoy!

    View Instructable »
  • RC Transmitter to USB Gamepad Using Arduino

    Sure I'll do that.Meanwhile I also tested it with my old Futaba FC-28 and that works too! Very nice! ;)I do have the issue that it does not work with https://fpv-freerider.itch.io/fpv-freerider (source engine based I guess). I assume it is related to how libudev handles the device. I found I need a joystick with at least 1 button in order for the software/game to assign and use it. Can you give me a hint how to emulate a button?Another thing I noticed by using ("udevadm info -q all -n /dev/input/js0") was that it reports "ID_INPUT_ACCELEROMETER=1" but "ID_INPUT_JOYSTICK" is missing. However I guess this is not relevant.

    Sure I'll do that.Meanwhile I also tested it with my old Futaba FC-28 and that works too! Very nice! ;)I do have the issue that it does not work with https://fpv-freerider.itch.io/fpv-freerider (source engine based I guess). I assume it is related to how libudev handles the device. I found I need a joystick with at least 1 button in order for the software/game to assign and use it. Can you give me a hint how to emulate a button?Another thing I noticed by using ("udevadm info -q all -n /dev/input/js0") was that it reports "ID_INPUT_ACCELEROMETER=1" but "ID_INPUT_JOYSTICK" is missing. However I guess this is not relevant.

    View Instructable »
  • RC Transmitter to USB Gamepad Using Arduino

    Thanks a lot for this nice tutorial. It was very useful to me! I Made it! :)If you want to add a schematic, I did it in fritzing and can share it.

    View Instructable »
  • DrTrigon followed DiamondDrake1 month ago
      • RC Transmitter to USB Gamepad Using Arduino