Cheap Risc-V Supercluster for $2 (DIY, CH32V003)
Ғылым және технология
Sponsor: JLCPCB 1-20 layer PCB from $2, PCBA from $0, Sign up to Get $54 Coupons here: jlcpcb.com/?from=bitluni
Available for Flex, Rogers,PTFE Teflon, Copper Core, Aluminum and FR-4
I couldn't resist to make a RISC-V Supercluster. The CH32V003 MCUs are only 10 cents each so I couldn't resist to put 16 of those on one PCB. That comes with all sorts of challenges. But it's only a little practice for what's going to come...
Parts & tools(affiliate links):
CH32V003: aliexpress.bitluni.net/ch32v003
Edge Connectors: aliexpress.bitluni.net/edgeConn
Preheating Station (only $50 shipped): aliexpress.bitluni.net/heatin...
My camera and lens (4k 60fps): amazon.bitluni.net/gh5
Zoom H6 Audio Recorder: amazon.bitluni.net/h6
0:00 Intro cheap Risc-V
0:50 Cluster design
2:20 PCB Ordering and part management
3:26 My first 4-Layer PCBs
3:50 Assembly
4:55 Blind design gone wrong
5:44 Sometime we are lucky
6:44 Open drain bus protocol
7:27 First blink program
8:22 to be continued...
plz share :-)
Paypal: paypal.me/bitluni
Github Sponsors: github.com/sponsors/bitluni
Patreon: / bitluni
Channel membership: / @bitluni
Twitter: @bitluni
reddit: u/bitluni
Discord: / discord
#electronics #riscv
Пікірлер: 336
Amazing that you can remain that cheerful and positive on SUCH DIFFICULT projects! Well done and keep right on going! I also enjoyed your earlier ESP32 breakthroughs.
I'm just a software engineer, but this hardware stuff always fascinates me. Awesome video! Thank you!
@vaisakhkm783
Жыл бұрын
ikr... i get into software from making hardware stuff... but it stuck with me, now i am also just software engineer..... all these hardware projects making me go back to old days...
Normally, when you make a 4+ layer board, you use the internal layers as power planes. On the one hand it is very convenient to just put a via next to each VCC and GND pad and be done with routing power, on the other hand, it provides proper return paths for the signal traces, as they are electromagnetically coupled to the nearest reference plane. Robert Feranec has some really interesting videos about proper PCB design practices
@johnmoore5319
Жыл бұрын
But making the internal layers power planes and the external ones GND doesn't just introduce a parasitic capacitor? and should you make copper pours in the internal layers or just leave the routes?
@hansdietrich83
Жыл бұрын
@@johnmoore5319 1. you definitely want to use at least one of the internal planes as ground to get an uninterrupted gnd plane. 2. Yes, you introduce capacitance, but the capacitance is between the power and gnd planes, so it is actually desirable. Also, this capacitance is so small, it is basically negligible. 3. The internal planes should only be used as a continuous planes. The signals are routed on the outer layers or on internal signal layers, not the layers that are used as power planes. This way, you always have a signal layer and a power plane layer next to each other, which is great for signal integrity. 4. The question if you should pour GND on the outer layers is a while different discussion (too long for this comment) 5. Bonus tip: always place a GND via next to a signal via, so the return current can switch reference plane as well All these topics are discussed in Roberts videos at length
@BlackDreaded
Жыл бұрын
@@johnmoore5319 As hansdietrich said watch the videos of Robert Feranec - I binged those and I am not even that deep in PCB design. They are awesome.
@nonchip
Жыл бұрын
@@johnmoore5319 sprinkling caps all over the general vicinity of ICs also introduces capacitances, that's the whole idea of why we do that: to turn the power supply of everything in our circuit into a capacitor, which filters out any spikes. also note "power planes" means power planes, not "VCC". GND *is* a "power". so if you have 4 layers you'd stack like this: signal, gnd, vcc, signal. and yes, planes mean planes, not routes.
@avinadadmendez4019
Жыл бұрын
It also has to be mentioned that properly sizing your power delivery requirements is important, not all circuit boards require dedicated power planes, in fact, you can get by just routing power tracks in most simple MCU boards with low current transient requirements. Current transients are what determine how careful must your power routing be. I have used power planes for complex microprocessor boards. But for simple low power MCU boards? I just route power tracks, works perfectly fine and gives me some extra board area to work with, it also allows to cut 6 layer boards to just 4 layers. Overengineering can be as harmful as bad engineering, when you spend $800 building prototypes that may as well have costed $200
There is a trick for the runny solder paste let it partially dry out In The open and don't use it right away. On the other scenario where the paste is to hard you can add liquid flux to get the consistency right just mix the dry out old paste with the new one until consistency is perfect.
@freakinccdevilleiv380
Жыл бұрын
Spreading some on a piece of paper may do the trick too
@icebluscorpion
11 ай бұрын
@@freakinccdevilleiv380 sure for very small badges and quick bodge jobs Is this method suitable but for quality production/repair is this method (solder paste on paper) very wasteful, expensive and unnecessarily Laborioso.
Make a fast phased ADC. You have 64 ADC's. Apparently the ADC clock is 24 MHz, 10 bit sigma delta conversion. That means you should be able to get 2MHz conversions. If you get the timing right, starting each conversion at exactly the correct clock phase, you may be able to build up to a 128 MHz, 10 bit ADC. That is damn fast for a $2 component. Of course, you'll have very limited memory so you won't get a very long sample window. Even if you only store 8 of the 10bits, that is a maximum of 512 samples per channel at 2MHz, or 256uSec of data. You'll need to make sure all the chips are synchronized to an external clock. It would be interesting to see what you can actually achieve given the real limitations of the hardware. After you know, you can turn it into a very cheap, albeit slow oscilloscope.
Your enthusiasm is infectious :-) I would love to see a cluster like this solve large parallel synthesiser calculations or other audio conversion modules like digital reverb. Pure Data is a great starting point which has been around for decades as an IDE (as a simplified GUI) for modular synthesis on x86 and ARM based SBC's. I know I am probably dreaming now, but since Risc-V is open source thing, I can imagine using this flexibility to developing an instruction set tailored to digital signal processing.
Holy sheet. I have never seen your channel before, and I'm in awe! Thank you so much for this video!
If the CPUs could talk between each other, a neural network would be pretty fun.
@bitluni
Жыл бұрын
they can, they will, it fun
@vsabadazh
Жыл бұрын
I could help with adapting tensorflow for this thing, did this at a previous job!
@coenraadloubser5768
11 ай бұрын
@@vsabadazh Tinygrad might be a better fit...
@congchuatocmay4837
10 ай бұрын
SwitchNet or SwitchNet4.
@Aziqfajar
8 ай бұрын
I wonder how it will perform.
This is sick! Can‘t wait for the super super cluster! :D
Bitluni, you’re obviously unaware but almost all of the KZread movies that have inspired me, intrigued me and given me experiment ideas have been yours. You are awesome. Thank you 😊👍
@outbakjak
Жыл бұрын
I've never heard anyone refer to a KZread video as a "KZread movie" 😆 but cool imma start saying that
finally, some good use of the Pink LED fundings. Nice.
Really cool! Gonna wait for an update for the bus upgrade.
I remember working on a Sun Sparc with two 50 mhz processors and it was considered a high end workstation at the time! Here are 16, 48mhz RISC processors on a pcb the size of the sparc cpu.
When he showed the super large tiled panel at the end of the video, it reminded me of startrek computers with all the blinking lights.
"you know, I like it cheap" - totally my attitude too! To get the most out of the cheapest parts is soo much fun,isn't it! A really great video; you have one more subscriber! ✌❤
Bro wake up bitluni uploaded a new video
"How many cores are too many?" - you're the Ivan Miranda of electronics :) I can't wait to see what can you do with this cluster!
Perhaps consider using a PNP constant current pull-up on the open drain bus to help speed things up. This could be as simple as a current mirror with 2N3906. This will probably at least double the speed of the bus.
@therealjammit
Жыл бұрын
Be careful with using PNP. They're normally "slower" than NPN and the fast ones are more expensive. I was thinking of doing what we did in the old SCSI days. Use two resistors (normally around 240 ohms) in series. For a 5v signal that would give you a 2.5v source with an impedance of 120 ohms (a voltage regulator with a series resistance will do the same thing). Depending on the drive capability the equivalent series resistance might require different resistors (for example if a 500 ohm impedance is needed use two 1k ohm resistors).
@big0bad0brad
Жыл бұрын
I wish they binned JFETs for zero gate voltage current
@cheponis
Жыл бұрын
@@big0bad0brad They sort-of do. See Art of Electronics to explain.
@big0bad0brad
Жыл бұрын
@@cheponis Yeah the bins are just too large tho, I'm thinking parts you could order in resistor precisions
@cheponis
Жыл бұрын
@@big0bad0brad Wrap the FET around an op amp, that will get you what you want.
Uber cool little project! Reminds of early 2000's custom dsp boards that did the same to make realtime multi algorithm sound processing boards. I wonder with cool application you imagine for this!
That's sick man 💯 Hadn't watched your videos in a while. Bitluini = GOD of Led screens
Your projects are always amazing. I hope the cluster can be useful to make many parallel Task
DEC's PDP series used a buss master so wouldn't have data collisions. Love the cluster!
you are a hardware production genius!
Holy hell. That's incredible!
OH MY GOD.... :) Just discovered your channel... where have you been until now??!!! :D:D:D Love this content.
Following the idea of maximizing mcu count you could for cost efficiency look for adressable led strips with use a mcu as controller chip for the insividual led groups. It would then just be a matter of bridging over the diodes which block the upstream comunication.
Interesting. Sitting tight for the next instalment.
I lost count on how many times my man... my teacher.. my idol... my role model said cheap. I feel SINCERE SHAME for not being subscribed. I need more of this mans in my life no homo.
Nice job! Very inspiring!
Definitely smarter and a cut above the usual electronics channels. I’d love to know what you do in your day job
Slick work Bro! dope.
This is mindblowing
Incredible work! I’m sad that I’ve not been able to catch many streams lately.
Rendering the Mandelbrot set would be a good way to show the scaling properties of the supercluster since its algorithm is small and parallelizes well. It would be fun to see each ch32v003 with a neo-pixel and then create a display for the mandelbrot set with a matrix of superclusters (ping-pong balls would be a nice extra :)
@erascarecrow2541
Жыл бұрын
That could work... Though i'd like to see it efficiently let me run ffmpeg to do video encoding on the newer codecs like AV1. I'd be VERY happy with it, if i got say 256 cores encoding video at profile 1 or 2 at an acceptable speed. I consider acceptable speed about 2-4x longer encoding than the video playback is). The space savings in most cases are anywhere from 1/4th to 1/2 the size (at least compared to h264) Depends on how scalable this would be. Hundreds or thousands of cores, so long as you can avoid major bottlenecks in ram you'd be able to make a really cheap useful processing center.
You could program the cluster into a small neural network and train them to recognize simple patterns. That would be real fun.
awesome work!!!!
this is already insane
Very cool engineering big fellow.
I had this idea years ago when I was building a project with uc's, but I had'have no way to implement it. I'm very glad to see this working, even if I didn't do it! :) I don't suppose there's a kit of this available?
bought that hot plate a few weeks ago as well haha. Works fine
Imagine a Beowulf cluster of these!
You are a genius guy.
CSMA/CD is basically what you’re implementing. It’s great if all of your cores are responding to the exact same code and handing out tasks to each core because each core can be listening for the same code and then you can feed each core the variables individually and they will get to work independently. The draw back comes when you are trying to handle each core independently on different tasks and different programs and they are completing at different times. Each device pining for attention around the same time exponentially reduces through put because they are all on the same collision domain. If you can’t avoid this, then maybe you can multiplex 4 cores in 4 rows together so you have 4 more collision domains. You would see a 4 fold increase in communications speed. Ideally, each core would have its own communication channel. Another alternative would be to use interrupts so there are no collision domains, also significantly increasing through put.
I wish I could understand this. Because it looks awesome!
Low Pin-count Debug Interfaces for Multi-device Systems is a good article about how to program multiple MCUs with a single programmer bus. In short: with JTAG it's easy, with SWD it's possible in some cases.
Seems like a good hobbyist gpu project to me!
6:14 I fully yelled out loud YES! Even got goosebumps.
Interesting that you can program those all together. That would really make it much easier when dealing with many microcontrollers on a bus. Thought about those options as well with the STM32 ARM SWD interface but assumed because there is a handshake that it won't work anyways. Might be different here.
Oh, perfect, right when I got my package of CH32 chips and programmers.
Cool project, informative as always
Love it!
Oh my god who is this wonderful dude
Nice video, thanks for sharing :)
I'm interested to see how many triangles they could output per second. something that might be cool would be to add a pair of ram chips and use double buffering then use the master to output the framebuffer to a screen. (you could use a clock and a counter to do the fast switching and just have to handle the blanking.) you could use a DDR chip (e.g. MT46V32M16P-5B) that can give you 16 bit RGB565 color you can directly feed to an adc per channel (probably a resistor ladder with a high speed op amp like 3 SN10501D or a single LMH6683 would work) if the processing is too slow you could just redraw the same frame till it's done, and then swap the buffers on the next vblank.
amazing man, use the supercluster to build a RISC-V computer!!!!
I want to thanks you a lot so much because you made me enjoy electronic and win a lot of time when i started 7 years ago when you made me discover the esp8266 than i switch to esp32 the best mcu ever. Has i don't have your level 😢 i made a 3 esp32 mcu motherboard working with simple interrupt to make an advance domotic box witch one still working in my house and some customer. My next project is to discover stm32h7 world with cube mx it seems to be a gaz factory 😅 we will see if i have any succes.
Great post! neat.
Voice recognition is quite CPU intensive although I don't know how well it would perform on this cluster. I know there is a open source project for droids that aims to be bi-directional communication with a human, but one of the things hindering it from being fully autonomous droid is that it is quite cumbersome to drag a laptop around including extra battery. Using smaller components could potentially solve this problem. It probably would be a daunting task to accomplish.
One Question: Which development enviromnent do you use for the WCH controllers? VS Code? I'd love to hear about your experiences! (Sorry if I have overlooked the info...)
This would be perfect for running a custom Forth on.
This is freakin awesome
But can it run Doom 😁?
I have programmed 10 atmega circuits at once in parallel (it was tough to program 500-1000 circuits, but in parallell there was 10 times faster!).The ISP protocol worked well and no issues. Sometimes one or two chips did not get programmed because of some malfunction, but the rest was OK. The code had internal integrity check, so I have had instant info that programming process went OK.
@big0bad0brad
Жыл бұрын
Beware in general that it's possible to program flash memory "just barely" or "all the way" and the difference doesn't manifest until some time later as the bits start to fade out. I'm not sure if this could have happened in your case but it's something to be aware of.
wow, this is cool!
Try to use I3C next time. I heard about that protocol, and it would be nice to see it alive. It would be nice to see you making some software for such a cluster.
Hey, it's a baby Connection Machine! 🤗
That's cool. I think any cluster is going to be memory and memory bandwidth limited, though. Data transfers are going to dominate there, so you'd maybe need memory banks accessible by the master and at least one of the slaves each and only use the common IO lines for synchronization and signalling (and programming). That is, if you want to take advantage of the processing power available rather than just the parallelism.
@satibel
Жыл бұрын
that would need a board revision, but a neat thing would be a 2-4 lane memory bus. though depending on what you do, you may be compute limited because those are only 48Mhz processors, so not extremely fast, and they have their own local ram so you might be able to do quite a lot in parallel only. also depending how they are linked, they actually can do DMA via I2C/SPI so that might not be a problem.
great vid :D
this is the real life mad scientist
Good watch ty.
great video ❤ may i ask what is the pcb editor app name?
holy heck!!! awesome!!!
great video
Wow! Over 3000 Likes on a video on such a small video - you're (seriously) going viral. This video must perform very good.
Good job
You have to put all the LEDs for the big board at the front of the board, and then you can stack them vertically in a small rack and have das blinkenlights
Very coooooool!
Excellent ! Very original. Can you invert a matrix on that cluster ?
Imagine a Beowulf cluster of those!
Multithreading here we go!
Great , thanks a lot , its was very funny watch
Could you please link that stream where you developed the communication protocol?
Thanks
it can be good "peripheral" if used as parallel computation for simple Neural Network with Low Power consumption
I love a mad scientist
By today's standards 48mhz is kind of slow, but those are so small that with proper programming I can see it easily being useful for all kinds of projects. Consider this, if each one operated a dozen or more neural nodes in a network you could just keep linking them together and achieve something really cool. Imagine having a room sized computer that appears to think.
You are a clever guy
hi it would be interesting to see if that could be programed to be a neural net to get complicated outputs from simple inputs
Got skillz, son!
Yes - cluster!!!
Clever asf.
you should obviously do some logical mux on that bus, or sacrifice the master as a bigger mux and logical coordinator, that would bring a base and operational understanding of computing.
Very interesting project. The only issue is the I/O for code running on a core. Nevertheless, its so cool
Impressive and interesting. Just wondering, if you programmed them all at once, they have the same program, how do the individual processors know it is their turn? You mentioned they have an ID. Was that baked in? If so how you know what their ID is? Pull it from the processor?? How, as they are all responding at the same time? Do i understand correct these chips have an inbuilt LED? Or did you solder one very close to each?
@whatelseison8970
Жыл бұрын
Those are surface mount LED's and they're external. You can see them in the schematic at 5:03 and on the board beside the chips if you look close at 5:38.
@freakinccdevilleiv380
Жыл бұрын
The programmer thinks it's only one chip because they all respond identically. After programming, each chip uses a unique id stored in its Rom from the factory. But I think he really needs to remake the board anyway because at this point he doesn't know who is who in which physical position 😂
@sumansaha295
Жыл бұрын
It could be that at runtime they co-operate and assign themselves the ID DHCP style(but adhoc), but otherwise the program is same
super intresting Thing😁
That new hot plate, was that normal solder paste and is it necessary to have a heating profile?
I'm new to cpu architectures in general but if you could program a terminal in there with custom commands (like "alias" for linux) that'd b pretty cool
SUPER CLUSTER!!!
do hdmi out of Supercluster and give it esp for wifi & ble 😍
I have no idea of this but I would suggest running Homeassistent on it for ultra low power consumption