NightUSB: a Hackable USB for Testing and Developing USB Solutions.

by MakingDevices in Circuits > Gadgets

1780 Views, 12 Favorites, 0 Comments

NightUSB: a Hackable USB for Testing and Developing USB Solutions.

into_pic.jpg

The PIC18F14k50 is USB-2.0 fully compatible, so this small dev board aims to explore the USB communication: Simulating mouse, keyboard, make small scripts for BADUSB behaviour... And so much else can be done with this microcontroller! However, it does not count on isolation between the PIC and the USB, so it should be handled quite carefully.

On the other hand, most of the IO pins of the PIC18F are available in the board, so even if you dont have any project with an USB, you can use the board as a normal dev board.

This project is finished, and the provided .hex file and software code is tested. The code simulates a small movement of the mouse every 15s, with a small blink of the LED. This will keep your PC alive for longer sesions of automated tests or anything else. (NOT FOR Remote work abuse!!)

Supplies

components.jpg
pcb_close.jpg

GitHub Repository

There are very few components on the board:

  • 1x PIC18F14k50
  • 1x 100nF 0805 Capacitor
  • 1x 470nF 0805 Capacitor
  • 2x 22pF 0805 Capacitor
  • 1x 12Mhz Crystal.
  • 1x 10k 0805 resistor.
  • 3x 220 0805 resistor.
  • 1x RGB LED.

All the components, schematics and gerber files are available on the GitHub repository!

Schematic / PCB Design

schematic.PNG
pcb_1.PNG
pcb_2.PNG

The circuit is quite simple: The PIC18F14k50 is USB 2.0 compliant, so there is only need to a 470nF cap on the Vusb pin. All the I/O pins are attached to a header so you can also use this board as a development board for small projects involving USB capabilities.

For the USB connector, a clever PCB design was used, so no need for an extra connector! Remember to order a thicker PCB to PCBWAY or any other manufacturer so the PCB stays fit in your computer.

Soldering the Board

bottom.jpg
top.jpg

Having that few amount of components, you can solder the components by hand using a heatgun or even a soldering iron. It should not be a bigger problem.

Software and Burn the Chip

You will need a Tag-Connect 6-pins cable for the ICSP on the board. You will find the code here:

https://github.com/makingdevices/NightUSB/tree/main/Firmware_HEX

Or from the attached file. You should use MPLAB and C18++

The code is available at:

https://github.com/makingdevices/NightUSB/tree/main/Firmware_SRC

Links and Conclusions

pcb_close.jpg
certification-mark-ES000041-wide.png
20230927_191406.jpg
VID-20230927-WA0007_1.gif

First of all, if you like my projects, I strongly recommend you to follow us on our Instagram profile, Where you will be updated on a daily basis.

In addition, you have my tree-link website to check all my social media and website!

https://makingdevices.com/links/

Finally, I would like to thank PCBWAY, the sponsor of this project. I really recommend you pay them a visit if you are thinking of ordering some Gerbers at any time in the future. I am truly impressed with how good they work and the high quality of their PCBs.

Finally, if you want to support Making Devices, there is also a YT channel that we are hoping to start very soon.