
Ch570sao9v
cnlohr/cnhardware
My dumping grounds for all my kicad projects and random hardware bringup.

(Early drafts, not ready yet)
Ch570sao9v is an open-source printed circuit board by cnlohr, from the cnlohr/beanboy repository on GitHub, published under the MIT licence. It is a 2-layer board of 34.8 × 59.7 mm with 53 parts on 49 nets, routed with 607 tracks and 168 vias.
It is built around the CH572Q, QMC6309 and LSM6DS3, with the TPS54302 and TS-1187A-B-A-B among its other parts. Its parts include 19 capacitors, 9 resistors, 6 ICs, 4 switches and 2 diodes.
The beanboy is a handheld game system with 3 buttons, and an oled display. It has the following specs:
(Early drafts, not ready yet)
Follow these instructions: https://github.com/cnlohr/ch32fun/wiki
The bean boy uses a monochrome 128x128 display.
You get "pressures" for button 1, button 2, button 3, and the battery level. (For now, just print the values to the screen, we will be changing the levels)
uint32_t pressures[4];
BeanBoyReadPressures( pressures );Have .png files in sprites/ folder, then on compile, they will turn into the object name itself, when you say make clean firmware.elf
void RenderBSprite( const bsprite * spr, int outx, int outy );For instance if you have sprites/bubble.png, you can call:
RenderBSprite( &bubble, x, y );You can use purple or actual transparency to indicate transparent, then use white or black.
Graphics APIs are from the ch32v003 ssd1306 driver
#define SSD1306_W 128
#define SSD1306_H 128
void ssd1306_drawPixel(uint32_t x, uint32_t y, int color);
void ssd1306_xorPixel(uint32_t x, uint32_t y);
void ssd1306_drawImage(uint32_t x, uint32_t y, const unsigned char* input, uint32_t width, uint32_t height, uint32_t color_mode);
void ssd1306_drawFastVLine(int32_t x, int32_t y, int32_t h, uint32_t color);
void ssd1306_drawFastHLine(uint32_t x, uint32_t y, uint32_t w, uint32_t color);
void ssd1306_drawLine(int x0, int y0, int x1, int y1, uint32_t color);
void ssd1306_drawCircle(int x, int y, int radius, int color);
void ssd1306_fillCircle(int x, int y, int radius, int color);
void ssd1306_drawRect(int32_t x, int32_t y, uint32_t w, uint32_t h, uint32_t color);
void ssd1306_fillRect(uint32_t x, uint32_t y, uint8_t w, uint32_t h, uint32_t color);
void ssd1306_xorrect(uint8_t x, uint8_t y, uint8_t w, uint8_t h);
void ssd1306_drawchar(uint8_t x, uint8_t y, uint8_t chr, uint8_t color);
void ssd1306_drawstr(uint8_t x, uint8_t y, char *str, uint8_t color);
void ssd1306_drawchar_sz(uint8_t x, uint8_t y, uint8_t chr, uint8_t color, font_size_t font_size);
void ssd1306_drawstr_sz(uint8_t x, uint8_t y, char *str, uint8_t color, font_size_t font_size);// call these
void ISLERSetup( int channel );
void ISLERSend( uint8_t message, int messageLength );
struct MyGameStruct
{
uint32_t id;
uint8_t something;
} __attribute__((packed));
void ISLERCallback( uint8_t * txmac, uint8_t * message, int messageLength, int rssi )
{
struct MyGameStruct * st = (struct MyGameStruct*)message;
if( messageLength < sizeof( struct MyGameStruct ) )
return;
printf( "%d\n", st->something );
}
void main()
{
ISLERSetup( 9 );
TODO:
| Qty | Value | Footprint | References |
|---|---|---|---|
| 10 | 4.7u | Capacitor_SMD:C_1206_3216Metric | C2, C5, C6, C7, C8, C9, C10, C11, C12, C19 |
| 5 | 100n | Resistor_SMD:R_0402_1005Metric | C1, C3, C13, C17, C18 |
| 4 | 33k | cnhardware:R_0402_1005Metric_COMPACT | R1, R6, R7, R9 |
| 3 | 1u | Resistor_SMD:R_0402_1005Metric | C4, C15, C16 |
| 3 | TS-1187A-B-A-B | cnhardware:BTC007_Button_Silicone | SW1, SW2, SW3 |
| 2 | 10uH | Inductor_SMD:L_1008_2520Metric | L1, L2 |
| 2 | 1M | cnhardware:R_0402_1005Metric_COMPACT | R3, R8 |
| 2 | 1N4148 | Diode_SMD:D_SOD-323 | D1, D2 |
| 2 | GND | TestPoint:TestPoint_Pad_D1.0mm | TP8, TP9 |
| 1 | 10 | cnhardware:R_0402_1005Metric_COMPACT | R4 |
| 1 | 100k | cnhardware:R_0402_1005Metric_COMPACT | R5 |
| 1 | 10n | Resistor_SMD:R_0402_1005Metric | C14 |
| 1 | 32MHz | Crystal:Crystal_SMD_2016-4Pin_2.0x1.6mm | Y1 |
| 1 | 51k | cnhardware:R_0402_1005Metric_COMPACT | R2 |
| 1 | CH572Q | Package_DFN_QFN:QFN-20-1EP_3x3mm_P0.4mm_EP1.65x1.65mm | U3 |
| 1 | DC | TestPoint:TestPoint_Pad_D1.0mm | TP4 |
| 1 | HX3608_BOOST | Package_TO_SOT_SMD:SOT-23-6 | U4 |
| 1 | LSM6DS3 | cnhardware:LGA-14_3x2.5mm_P0.5mm_LayoutBorder3x4y_EVEN_PADS | U5 |
| 1 | MOSI | TestPoint:TestPoint_Pad_D1.0mm | TP1 |
| 1 | QMC6309 | Package_BGA:WLP-4_0.83x0.83mm_P0.4mm | U6 |
| 1 | RES | TestPoint:TestPoint_Pad_D1.0mm | TP6 |
| 1 | SAO | Connector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical_SMD | J1 |
| 1 | SCK | TestPoint:TestPoint_Pad_D1.0mm | TP3 |
| 1 | SCS | TestPoint:TestPoint_Pad_D1.0mm | TP5 |
| 1 | SW_SPDT | swadgeparts:SW_SPDT_PCM12 | SW4 |
| 1 | TPS54302 | Package_TO_SOT_SMD:SOT-23-6 | U2 |
| 1 | V5TP | TestPoint:TestPoint_Pad_D1.0mm | TP2 |
| 1 | VBAT | TestPoint:TestPoint_Pad_D1.0mm | TP7 |
| 1 | ~ | cnhardware:RB150-2828KSWKG01 | U1 |

cnlohr/cnhardware
My dumping grounds for all my kicad projects and random hardware bringup.

lukmatuska/Underglow
Cheap wireless lighting system for small local applications (cars, bikes, etc...)


Astrid-Delestine/Remote-Access-Desktop-Terminal
All project requirements are listed in ./projreq.md

Marcus10110/DelSolClock
This is a project to replace the clock in my car with an ESP32 and a small display.



infopcgood/slimevr-nugget
SlimeVR nRF52840 PCB (QFN48 package version)
It measures 34.8 × 59.7 mm and has 2 copper layers, 1.6 mm thick.
53 parts, built around the CH572Q, QMC6309, LSM6DS3 and TPS54302. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the cnlohr/beanboy repository on GitHub, at the commit this page was made from: the board is hardware/ch570sao9v.kicad_pcb and its schematic hardware/ch570sao9v.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).