Cheap Risc-V Supercluster for $2 (DIY, CH32V003)
HTML-код
- Опубликовано: 17 авг 2024
- Sponsor: JLCPCB 1-20 layer PCB from $2, PCBA from $0, Sign up to Get $54 Coupons here: jlcpcb.com/?fr...
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.bit...
Edge Connectors: aliexpress.bit...
Preheating Station (only $50 shipped): aliexpress.bit...
My camera and lens (4k 60fps): amazon.bitluni...
Zoom H6 Audio Recorder: amazon.bitluni...
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/spo...
Patreon: / bitluni
Channel membership: / @bitluni
Twitter: @bitluni
reddit: u/bitluni
Discord: / discord
#electronics #riscv Наука
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
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?
@@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
@@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.
@@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.
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
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.
If the CPUs could talk between each other, a neural network would be pretty fun.
they can, they will, it fun
I could help with adapting tensorflow for this thing, did this at a previous job!
@@vsabadazh Tinygrad might be a better fit...
SwitchNet or SwitchNet4.
I wonder how it will perform.
Bro wake up bitluni uploaded a new video
I'm just a software engineer, but this hardware stuff always fascinates me. Awesome video! Thank you!
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...
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.
Spreading some on a piece of paper may do the trick too
@@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.
Bitluni, you’re obviously unaware but almost all of the RUclips movies that have inspired me, intrigued me and given me experiment ideas have been yours. You are awesome. Thank you 😊👍
I've never heard anyone refer to a RUclips video as a "RUclips movie" 😆 but cool imma start saying that
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.
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.
Holy sheet. I have never seen your channel before, and I'm in awe! Thank you so much for this video!
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.
"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!
"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! ✌❤
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.
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).
I wish they binned JFETs for zero gate voltage current
@@big0bad0brad They sort-of do. See Art of Electronics to explain.
@@cheponis Yeah the bins are just too large tho, I'm thinking parts you could order in resistor precisions
@@big0bad0brad Wrap the FET around an op amp, that will get you what you want.
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 :)
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.
finally, some good use of the Pink LED fundings. Nice.
This is sick! Can‘t wait for the super super cluster! :D
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.
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!
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.
DEC's PDP series used a buss master so wouldn't have data collisions. Love the cluster!
Really cool! Gonna wait for an update for the bus upgrade.
But can it run Doom 😁?
Could you please link that stream where you developed the communication protocol?
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.
That's sick man 💯 Hadn't watched your videos in a while.
Bitluini = GOD of Led screens
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.
This mcu is very surprising, like the 1 wire interface not colliding and mitxela able to send data to it using leds
OH MY GOD.... :) Just discovered your channel... where have you been until now??!!! :D:D:D Love this content.
Imagine a Beowulf cluster of these!
Definitely smarter and a cut above the usual electronics channels. I’d love to know what you do in your day job
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.
Oh, perfect, right when I got my package of CH32 chips and programmers.
6:14 I fully yelled out loud YES! Even got goosebumps.
You could program the cluster into a small neural network and train them to recognize simple patterns. That would be real fun.
amazing man, use the supercluster to build a RISC-V computer!!!!
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.
For anyone wondering what that unreasonably split-second subtitle is at 8:00:
"*they aren't. there was just an "accidental" clock divider active."
Make a RSIC-V GPU out of it!
This would be bonkers! I love it!
this is the real life mad scientist
Hey, it's a baby Connection Machine! 🤗
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?
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.
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.
Your projects are always amazing. I hope the cluster can be useful to make many parallel Task
Very interesting project. The only issue is the I/O for code running on a core. Nevertheless, its so cool
Since you have all those ADCs now, why not try it with your ultrasonic phase array.
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.
The heart of any cluster is its switching fabric. Amdahls Law; show me where the data is and I will show you where the computing needs to be.
Can't believe you recoded a BUS. You are a SuperHuman.
do hdmi out of Supercluster and give it esp for wifi & ble 😍
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.
hi it would be interesting to see if that could be programed to be a neural net to get complicated outputs from simple inputs
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.
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.
"Supercluster!" followed by 0:20 seconds into "take on me" song by "a-ha"
My big issue with PI and all the likes is that whenever i >actually< try to do something useful they performance or connectivity just does not cut it and i am forced into x86 again. Sure, i am a complete enthusiast and normal people just dont need a homeserver or an ESP everywhere but i would just wish there was a mini computer like Pi and the likes with just better connectivity and features. I am happy to pay NUC prices when it has a real benefit in terms of power draw. Especially here in germany energy cost is a REAL concern because ppl just cant pay it anymore when the provider increases your plan by 800-1200%.
As diodegonewild says about solder bridges: «And EVEN MORE ROSIIIIIN!…»
I was wondering if one could take say...8 RISC V MCUs?....and configure them in a way similar to the way the Parallax Propeller is.
This was exactly my thought.
Keep the solder paste in the freezer to make it more viscous
Great project. Why didn't you use i2c as your bus again? At 0.6mbps, I'd certainly go with i2c.
Man invented 8-bit bus Ethernet
It's it really possible? Another German guy doing on RUclips fine electric? Great Scott!
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...)
Wow! Over 3000 Likes on a video on such a small video - you're (seriously) going viral. This video must perform very good.
Ok if those LED's were monitored, you could program their mcu's remotely using the LED's as data in
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.
it can be good "peripheral" if used as parallel computation for simple Neural Network with Low Power consumption
Multithreading here we go!
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.
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
is the $2 just for the PCB? or the entire BOM?
Can it run C̶r̶y̶s̶i̶s Doom?
mendelbrot but each mcu has it's own portion of work to render
Well, I don't know that those MCU are fast enough, but maybe you can convince a drone platform of that many propellers and/or ion propulsion jets to hover, flip, etc. if not stay stable in winds or transition into propulsion for winged situations or just act as speakers or noise control. Maybe a 4-head green-temperatures (ca. 30-400 degrees C) glass (yeah, so not silicate so much) printer? Bird trainer? Tomato protection robot? Terrain table controller? Sisyphus derby table with doublekick sonication and volcanism (pumped sand?) Solar conc. dog poop carbonizer with gas separation for pulling off water, nitrogen, methane, benzenes.
Which part number has the pink LEDs, please?
Incredible work! I’m sad that I’ve not been able to catch many streams lately.
I keep a silence. If you multiply 16 by 48 you'll find out that that's about a very cheap ARM SoC that can process everything sequentially (in case of a "trash" one core SoC) and still will have enough time to play a tetris.
If you like RISC-V and soldering: Get a Pine64 Pinecil soldering iron.
Excellent ! Very original. Can you invert a matrix on that cluster ?
Imagine a Beowulf cluster of those!
you are a hardware production genius!
can you try making it run a simple neural network?
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.
This would be perfect for running a custom Forth on.
This is mindblowing
actually if you had a good/simple and relyable enough programming method then this device could easily take over the maker market, since $2 for a makerboard with such specs could kind of become something like a new arduino mega, the programming of the many cores should however be doable more easily/relyable, so a good communication protocol and perhaps even a library(perhaps using cores just like pins or even a parametric auto scheduler).
I know $2 is the diy make cost. but even if those get sold for more than double the price people would still buy it if it has decent enough support to work with them relyable, for around the $2 price some hobbyists might acctually already use it even if there is no propper support yet.
and if now it can be made for $2 then imagine what happens when it is mass produced automatically in a bigger quantity, then it might become cheaper. ofcource a custom/dedicated risc-v design would probably work even better(perhaps for simplicity some kind of matrix array where each chip can connect to the chips around it(4 or 8) where all chips know their number(code)(or learn it) and then they can just decide easily and rapidly what way to move the packages that way communication can easily be done like predetermined so automatic and hardwarebased to reduce latency and prevent cpu blocking and such. better methods would be possible, but this method is insanely simple to implement compared to more complex methods, and also it allows or insane scalability without needing to many pins. it also would work with if there are multiple cores on a single chip, in this case however it is best if all chips have the same core count to keep the logic and pcb design simpler that way there is less or no need to think about interfearance and such.
Nothing is tastier than some good hot flux.
Interesting. Sitting tight for the next instalment.
Oh my god who is this wonderful dude
oh man ... def knife a knife tip for your iron, you can "drag solder" those throughhole pins at 10x the speed
I'm going to show you my Risc-V Super Cluster! Let me show you it's features!
I have no idea of this but I would suggest running Homeassistent on it for ultra low power consumption
I would love to see this done with RP2040 chips instead. So much power and less than $.80 per chip.
BTW this is a very old idea. Transputers were doing this properly in 1971.
Use the CAN protocol. It’ll save you time.
Did you check out the "PY32F002" too? Looks like in the similar price range.
hi, Mr. Bitluni, i remember u did a 6 hr long video on the PCB design of the Risk-v Cluster, was that video delete it?
bought that hot plate a few weeks ago as well haha. Works fine
"The AI is going to write code differently from humans"
Depends on where you're looking from. In 8bit BASIC there was no features for passing arguments or calling functions, so you had gosub and spaghetti code. I have the feeling it will go back to that, and it will be a tangled mess (albeit when it works, an efficient one).
Greate, but how you can program all at once ? You connect all Rx and connect all Tx from childBoard to the motherBoard ? Then push the code at once ?