Editor Version ×
recommended

Pro Edition

free

Brand new interactions and interfaces

Smooth support for design sizes of over 3W

devices or 10W pads

More rigorous design constraints, more

standardized processes

For enterprises, more professional users

Std Edition

Easy to use and quick to get started

The process supports design scales of 300

devices or 1000 pads

Supports simple circuit simulation

For students, teachers, creators

Ongoing

STD CH552E TinyKnob

CH552E TinyKnob

Project tags

License

CC-BY-SA 3.0

License: CC-BY-SA 3.0

Mode:

Mode

Editors' pick

Editors' pick

  • 1.4k
  • 0
  • 3
Update time: 2023-02-10 15:17:56
Creation time: 2022-12-28 18:46:32
Description

Description

# Overview The USB Knob is a versatile device that combines the functionality of a rotary encoder with the convenience of a USB interface. It is based on either the CH552E or CH554E microcontroller and is equipped with addressable LEDs, commonly known as NeoPixels. The unique combination of these components makes the USB Knob an ideal choice for a wide range of applications, including volume control for PCs. One of the standout features of the USB Knob is that it requires no driver installation, making it incredibly easy to use. The device acts as a HID custom keyboard, meaning that it can be recognized and utilized by most computers without the need for additional software. The accompanying example firmware for the USB Knob further streamlines the process of using this device, providing users with a simple and effective means of controlling the volume on their computer. The code implements a volume control knob that can be used to adjust the volume levels of a PC, making it easy to regulate the audio output without having to navigate through menus or use complicated software. - Firmware (Github): https://github.com/wagiminator/CH552-USB-Knob ![USB_Knob_pic1.jpg](https://raw.githubusercontent.com/wagiminator/CH552-USB-Knob/main/documentation/USB_Knob_pic1.jpg) # Hardware ## Schematic ![USB_Knob_wiring.png](https://raw.githubusercontent.com/wagiminator/CH552-USB-Knob/main/documentation/USB_Knob_wiring.png) ## CH552E 8-bit USB Device Microcontroller The CH552E is a low-cost, enhanced E8051 core microcontroller compatible with the MCS51 instruction set. It has an integrated USB 2.0 controller with full-speed data transfer (12 Mbit/s) and supports up to 64 byte data packets with integrated FIFO and direct memory access (DMA). The CH552E has a factory built-in bootloader so firmware can be uploaded directly via USB without the need for an additional programming device. ![USB_Knob_pic2.jpg](https://raw.githubusercontent.com/wagiminator/CH552-USB-Knob/main/documentation/USB_Knob_pic2.jpg) # Compiling and Installing Firmware ## Installing Toolchain for CH55x Install the [CH55x Software Development Kit for the SDCC compiler](https://github.com/Blinkinlabs/ch554_sdcc). Follow the instructions on the website. In order for the programming tool to work, Python3 must be installed on your system. To do this, follow these [instructions](https://www.pythontutorial.net/getting-started/install-python/). In addition [PyUSB](https://github.com/pyusb/pyusb) must be installed. On Linux (Debian-based), all of this can be done with the following commands: ``` sudo apt install sdcc python3 python3-pip sudo pip install pyusb ``` ## Installing Drivers for the CH55x Bootloader On Linux you do not need to install a driver. However, by default Linux will not expose enough permission to upload your code with the USB bootloader. In order to fix this, open a terminal and run the following commands: ``` echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="4348", ATTR{idProduct}=="55e0", MODE="666"' | sudo tee /etc/udev/rules.d/99-ch55x.rules sudo service udev restart ``` On Windows you will need the [Zadig tool](https://zadig.akeo.ie/) to install the correct driver for the CH55x bootloader. Click "Options" and "List All Devices" to select the USB module, then install the libusb-win32 driver. ## Entering CH55x Bootloader Mode A brand new chip starts automatically in bootloader mode as soon as it is connected to the PC via USB. Once firmware has been uploaded, the bootloader must be started manually for new uploads. To do this, the board must first be disconnected from the USB port and all voltage sources. Now press the BOOT button and keep it pressed while reconnecting the board to the USB port of your PC. The chip now starts again in bootloader mode, the BOOT button can be released and new firmware can be uploaded within the next couple of seconds. ## Compiling and Uploading Firmware Open a terminal and navigate to the folder with the makefile. Run ```make flash``` to compile and upload the firmware. If you don't want to compile the firmware yourself, you can also upload the precompiled binary. To do this, just run ```python3 ./tools/chprog.py usb_knob.bin```. # References, Links and Notes 1. [EasyEDA Design Files](https://oshwlab.com/wagiminator) 2. [CH551/552 Datasheet](http://www.wch-ic.com/downloads/CH552DS1_PDF.html) 3. [SDCC Compiler](https://sdcc.sourceforge.net/) 4. [ATtiny85 TinyKnob](https://github.com/wagiminator/ATtiny85-TinyKnob) ![USB_Knob_pic3.jpg](https://raw.githubusercontent.com/wagiminator/CH552-USB-Knob/main/documentation/USB_Knob_pic3.jpg) ![USB_Knob_pic4.jpg](https://raw.githubusercontent.com/wagiminator/CH552-USB-Knob/main/documentation/USB_Knob_pic4.jpg) # License ![license.png](https://i.creativecommons.org/l/by-sa/3.0/88x31.png) This work is licensed under Creative Commons Attribution-ShareAlike 3.0 Unported License. (http://creativecommons.org/licenses/by-sa/3.0/)
Design Drawing

Design Drawing

schematic diagram
1 /
PCB
1 /
The preview image was not generated, please save it again in the editor.
ID Name Designator Footprint Quantity BOM_Supplier BOM_Manufacturer BOM_Manufacturer Part BOM_Supplier Part
1 10u C1 C_0603 1 LCSC SAMSUNG CL10A106KP8NNNC C19702
2 100n C2,C3,C4 C_0603 3 LCSC YAGEO CC0603KRX7R9BB104 C14663
3 WS2812 LED1,LED2 WS2812-2020 2 LCSC worldsemi WS2812C-2020-V1 C2976072
4 10k R2 0603 1 LCSC UniOhm 0603WAF1002T5E C25804
5 330R R4 0603 1 LCSC UniOhm 0603WAF3300T5E C23138
6 BOOT SW1 SW-SMD_L4.0-W2.9-LS5.0 1 LCSC XKB Enterprise TS-1185-C-A-B-B C465999
7 Rotary Encoder SW2 ROTARY_ENCODER 1 LCSC BOURNS PEC11R-4015F-S0024 C143789
8 CH552E U1 MSOP-10 1 LCSC WCH(Jiangsu Qin Heng) CH552E C967938
9 Micro Input USB1 MINI-USB-SMD_U254-051T-4BH23-S2B 1 LCSC XKB Enterprise U254-051T-4BH23-S2B C319164

Unfold

Project Attachments

Project Attachments

Empty
Project Members

Project Members

Target complaint
Related Projects
Change a batch
Loading...

Comment

Add to album ×

Loading...

reminder ×

Do you need to add this project to the album?

服务时间

周一至周五 9:00~18:00
  • 0755 - 2382 4495
  • 153 6159 2675

服务时间

周一至周五 9:00~18:00
  • 立创EDA微信号

    easyeda

  • QQ交流群

    664186054

  • 立创EDA公众号

    lceda-cn