Testing the addressable LEDs on the Explorer Backpack v1
What is this? A design challenge? I'm fairly new to electronics and creating PCBs. While working on a project using EasyEDA/LCSC/JLCPCB I saw a banner for a contest. I've been wanting to create a development board with a variety of sensors on it. So I decided I'd challenge myself to finally make it. I knew if I had a deadline it would motivate me to get it done. I have to say this is the most complex project I've worked on to date and am really proud of myself for getting it to work.
The contest provided a development board from WCH. The CH32V307V. I nicknamed it the "Centipede" because the microcontroller (CH32V307VCT6) has 100 pins. It has an impressive processor based on RISC-V. With extensions for multiplication, atomic, float and compressed instructions built in. It has a plethora of peripherals and communication protocols. Such as an Analog to Digital Converter (ADC), CAN, Digital to Analog Converter (DAC), Ethernet, I2C, I2S, SPI, UART and USB. These connections come together to create a resourceful tool for newcomers and veteran designers alike.
The WCH CH32V307V-R1 Development Board
This board has a convenient set of "Arduino Uno" style connectors at the heart of the Centipede. These are ideal to create an add-on board to attach to the top. My idea was born: The Explorer Backpack. The intent of this project is to help people learn about interfacing a variety of peripherals. It could be transformed into a decorative light, data logger, TV remote, alarm or a home automation and monitoring system. With a little imagination the Explorer Backpack's possibilities are limitless.Design
After deciding what features I would bring together, came the challenge of picking out specific parts. I browsed electronics companies like Adafruit, Seeed Studio and SparkFun to determine which sensors are most commonly used. Like most designers I wanted to keep costs low, so I selected components that were mildly priced, but still capable. I was able to locate most of them on LCSC, Digi-Key and Mouser. It's relieving to have multiple suppliers during the "parts shortage" era.
- Addressable LEDs
- Flash Memory
- Humidity Sensor
- IR LED Emitter
- IR Signal Decoder
- Light Sensor
- Slide Switch
- Speaker and Amplifier
- Tactile Switch
- Temperature Sensor
Once I narrowed down all the components, I downloaded all of their respective data sheets. Most companies provide example circuit diagrams and If one was not provided, I looked for an available breakout board.
I meticulously incorporated the selected sensors into my EasyEDA design and created all necessary connections; formatting a clean schematic by grouping components according to their function.
I referred to the data sheets for the microcontroller to ensure proper assignment of the pins to their corresponding peripherals. For example the second set of I2C pins are PB10 (SCL) and PB11 (SDA). Both of these can be found on the middle set of headers.
Please see the attachments section for the full schematic. I've also included the EasyEDA source files on my GitHub.Layout
To start, I looked at the CH32V307V design files to determine the location of the mounting holes and headers. I wanted to make the board roughly match the size of an Arduino shield (53 x 68mm).
As an homage to the RISC-V processor I placed the addressable LEDs in the shape of a capital V. The sensors and components were put adjacent to their corresponding communication pins for easy routing of the connections.
The Explorer Backpack (Front and Back)
I sent off my Gerber files to JLCPCB to have the PCBs manufactured. I selected a black solder mask to match the look of the development board. I also ordered a solder paste stencil to make it easier to assemble all those tiny surface mount components. For board nerds there's nothing greater than getting a shipment of PCBs in the mail.Assembly
Using the bill of materials I created a spreadsheet to help me assemble the board. I then looked at the data sheets for the infrared LED, light sensor and the addressable LEDs. I created a cheat sheet to help me place them in the correct orientation. I used the stencil to apply the solder paste, hand placed all of the components, and then put the board on a small hot plate. Watching solder paste melt is so cool. Am I right?Testing
I wanted to make sure all of the components were connected correctly and functioning as intended. I used other development boards such the Arduino Uno and the Raspberry Pi Pico. I'm familiar with their IDEs and toolchains which made it easier for me to to validate my design. The examples are in the Code section of this article.Programming Environment
I could not get RT-Thread Studio to flash the software to the board. I wonder if other contestants had the same issue.
The WCH website lists the MounRiver Studio under the technical resources. So I gave that a try.
Success! I was able to load up the GPIO Toggle example and get it to work. The LED on the Explorer Backpack was blinking on and off. Hello World!RT-Thread OS
Part of the contest is to use the RT-Thread embedded real-time operating system. MounRiver Studio can create a project based on RT-Thread. Examples of the Explorer Backpack LED blinking and the buttons working using RT-Thread are provided in the GitHub repository.