The bigger ones have PHYs for USB HS, USB-C (5Gbps) and 10/100M Ethernet integrated (!). And their development environment (Mounriver Studio) isn't too bad - I didn't had the immediate urge to port everything to CMake/VSCode.
But they need some kind of pin planning tool. It's awful to use the datasheet and find the correct pin functionalities and their mutual exclusions... STM32 mastered this with their STM32CubeIDE tool: select a feature (like USART1) and the right pins light up - alternate pins are easy to locate.
They also should clean up their license mess on OpenWCH (their GitHub page). Lots (all?) of their HALs are Opensource - but the right version with right SPDX tags are often a bit hidden.
Though STM32Cube has a very different approach, handles lots of mutually exclusive features and peripherals and a bunch of extra stuff for controlling code gen IIRC.
What an amazing tool: it loads and displays the kicad native files in a simple web browser, but moreover - you don't have to be the intermediary, cloning some repo and then uploading the individual files to a website.
I wish that existed for more weird binary formats. Altium have 365 but you have to have signins to use it, and they cost named-user seats.
It seems that a person can also click to select an object on the board, and then use the "zoom to selection" button near the bottom-right of the viewport, to bring things up to a more-visible size and place [some of] them on-screen.
Vertical panning is then accomplished by rolling the scrollwheel. Horizontal scrolling can be accomplished by tilting the scrollwheel on a mouse that is so-equipped.
(Perhaps bizarrely, I was unable to discover any other way to pan.)
FWIW - On my laptop (track pad), I expected to click-drag or ctrl-drag to move it, but on a track pad it's two-finger swipe to move it left/right. then pinch zoom.
Sorry, but I am not installing KiCAD or cloning a repo just to look at a schematic. Since the beginning of time electronics hobbyists have been posting schematics in bitmap or pdf format. It should be in the readme.
I already had KiCad installed, so I uninstalled it to see how long it would take. It took me 51 seconds to clone the repo and reinstall KiCad. I thought this wasn't too bad.
But the joke was on me — when I tried to open the PCB file, KiCad said: "KiCad was unable to open this file because it was created with a more recent version than the one you are running. To open it you will need to upgrade KiCad to a version dated 12/29/2024 or later."
So I now think your position is reasonable. Also I think I need to upgrade Debian.
KiCad sounds to me like a great target for a project based Nix Shell install.
Always have the right version for it "locked". It works well with most tools except those that save stuff in the .config folder as it messes up isolation.
If you find the nix language daunting, for basic stuff like nix shell setup its easy but also LLMs are good for it.
I'd agree with you in the past, when KiCAD didn't work as nicely with git. And for a professional project, I'd still at least keep snapshots of every milestone with "compiled" output.
But for a hobby project I really don't see the need. It takes a few extra minutes to install KiCAD, clone the repo, and view the schematic at any point in time.
Sorry my friend - but embedding static PDFs in Git is my opinion an anti-pattern. The KiCad (or EDA) sources should be the single source of truth, with visuals generated/exported locally when needed.
If you don't like it.. well it's a free world and every engineer has it own preferences :-)
Neglecting a schematic is an anti-pattern. And I never said it had to be PDF. Besides, of all the crap people shove in Git repos, a simple bitmap that compresses well and conveys extremely useful information has to be the least offensive.
The pin mapping barrier was quite off-putting to me. However I've been tracking progress in the Zephyr RTOS project and the whole line is getting better support by the day
Both VS Code and Eclipse are open-source, so that's fine. Android Studio was also Eclipse with the serial numbers filed off, for example, before they switched to IDEA.
It's probably worth mentioning the 2400bps (300 bytes per second) LPC10 codec built into SoX. If you have SoX installed, try
rec -t lpc10 speech.lpc
and then speaking into your microphone for ten or fifteen seconds before you ^C it. Then play it back with
play speech.lpc
It will sound very robotic but pretty comprehensible, at least with an adult male voice in English, and it preserves a lot of the prosody and enunciation that is so hard to get out of speech-synthesis packages.
12KiB of data at 300 bytes per second would be 41 seconds of recorded speech.
Decoding the LPC10 data on the CH32V003 might be tricky. On amd64, running `make CFLAGS=-Os` followed by `ld -r -o tmp.o *.o` inside sox-14.4.2+git20190427/lpc10 yields a tmp.o with 25243 bytes of text (including .rodata, etc.) and 356 bytes of data. I'm not optimistic that RISC-V would compress that to fit inside the CH32's flash. And I find the code in that directory inscrutable; it's Fortran that's been compiled to C.
Still, it seems plausible that you could massage the LPC10 data into a format that something like Talkie would understand.
This is great. Missed opportunity for a low-pass RC filter on the speaker circuit - if you know you're driving an 8kHz sample rate, you can design your filter with that cutoff, and it'll sound way better (it'll get rid of the buzzy quality).
This may be essential if you're connecting it to an audio amplifier. I learned this the hard way by burning out someone else's very expensive tweeters with 31.25kHz PWM.
Nice work. Especially referencing the TI prior art of the Speak and Spell. This kind of synthesis was quite prevalent in the early 80s - school BBC Micros had a ROM which let you "*SAY" a phrase. Classic Macs had MacinTalk.
It would need to be ported, but the Talkie library for the AVR / STM / SAMD / ESP, with its roots dating back to the TI speak and spell toy, gets a phenome engine with a good vocabulary into less than 8k. It’s not musical though lol.
The pwm on the CH32v003 is pretty similar to the STM32 implementation, so porting might not take much.
It would be really cool to have phenome/text based vocabulary like talkie on that little chip! Since it uses text/phenomes it can have a large vocabulary for such a tiny chip. It would be possible to have about 1500 words in an 8k dictionary, 2k for code, and 4K for the phenome engine and still fit in the 16k of flash it comes with.
Incidentally, there is another riscV from WCH that also features BLE, 200K+ of flash, and 18K of RAM in an ESSOP-10 package (same size as the SOP8 but only 4 GPIO). It’s around $0.41 in Q1. The vocabulary with that would be 20k plus words with 100k left for code lol.
It’s just nuts what a dollar will get you these days in that space.
The sound in the video seems more sophisticated than TTS. It seems more like the result of analyzing a clip of digital audio, and turning it into a series of TTS phonemes.
Assuming SAM is a faithful port of the original, it converts text into phonemes according to a bunch of pronunciation rules.
Even easier is the 1-bit DPCM codec used on the NES. Go up or down one step each sample depending on the next bit. You can't get a square wave out of it, only a triangle, but it has a nostalgic quality.
The NES DPCM runs at up to 33kHz, so it actually has double the bitrate of the 2-bit 8kHz encoding used in the article. If you run it at 16kHz to match the bitrate, it will sound much worse.
I saw another audio project on the same microcontroller (family) posted a few days ago: ModPlayRISCV It plays a tracker MOD. using PWM with a low-pass filter.
It resamples/scales all samples at varying rate/volume into a ring buffer which gets fed to the PWM comparator by DMA.
Can you export the schematic and Gerber files to a PDF file? A lot of open source projects do this, and it makes it much easier to tell what's going on, with software pretty much everyone already has on their computer.
The bigger ones have PHYs for USB HS, USB-C (5Gbps) and 10/100M Ethernet integrated (!). And their development environment (Mounriver Studio) isn't too bad - I didn't had the immediate urge to port everything to CMake/VSCode.
But they need some kind of pin planning tool. It's awful to use the datasheet and find the correct pin functionalities and their mutual exclusions... STM32 mastered this with their STM32CubeIDE tool: select a feature (like USART1) and the right pins light up - alternate pins are easy to locate.
They also should clean up their license mess on OpenWCH (their GitHub page). Lots (all?) of their HALs are Opensource - but the right version with right SPDX tags are often a bit hidden.
I made a basic one for the RP2350- https://rp2350b.pinout.xyz/
Though STM32Cube has a very different approach, handles lots of mutually exclusive features and peripherals and a bunch of extra stuff for controlling code gen IIRC.
I wish that existed for more weird binary formats. Altium have 365 but you have to have signins to use it, and they cost named-user seats.
(Unfortunately, it does not zoom on the cursor but on the center of the screen).
Vertical panning is then accomplished by rolling the scrollwheel. Horizontal scrolling can be accomplished by tilting the scrollwheel on a mouse that is so-equipped.
(Perhaps bizarrely, I was unable to discover any other way to pan.)
But the joke was on me — when I tried to open the PCB file, KiCad said: "KiCad was unable to open this file because it was created with a more recent version than the one you are running. To open it you will need to upgrade KiCad to a version dated 12/29/2024 or later."
So I now think your position is reasonable. Also I think I need to upgrade Debian.
Always have the right version for it "locked". It works well with most tools except those that save stuff in the .config folder as it messes up isolation.
If you find the nix language daunting, for basic stuff like nix shell setup its easy but also LLMs are good for it.
But for a hobby project I really don't see the need. It takes a few extra minutes to install KiCAD, clone the repo, and view the schematic at any point in time.
If you don't like it.. well it's a free world and every engineer has it own preferences :-)
Older ones were Eclipse with the serial numbers filed off.
12KiB of data at 300 bytes per second would be 41 seconds of recorded speech.
Decoding the LPC10 data on the CH32V003 might be tricky. On amd64, running `make CFLAGS=-Os` followed by `ld -r -o tmp.o *.o` inside sox-14.4.2+git20190427/lpc10 yields a tmp.o with 25243 bytes of text (including .rodata, etc.) and 356 bytes of data. I'm not optimistic that RISC-V would compress that to fit inside the CH32's flash. And I find the code in that directory inscrutable; it's Fortran that's been compiled to C.
Still, it seems plausible that you could massage the LPC10 data into a format that something like Talkie would understand.
Another codec which might be interesting to try but is considerably more complicated is AMR, from GSM: https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_code...
The pwm on the CH32v003 is pretty similar to the STM32 implementation, so porting might not take much.
It would be really cool to have phenome/text based vocabulary like talkie on that little chip! Since it uses text/phenomes it can have a large vocabulary for such a tiny chip. It would be possible to have about 1500 words in an 8k dictionary, 2k for code, and 4K for the phenome engine and still fit in the 16k of flash it comes with.
Incidentally, there is another riscV from WCH that also features BLE, 200K+ of flash, and 18K of RAM in an ESSOP-10 package (same size as the SOP8 but only 4 GPIO). It’s around $0.41 in Q1. The vocabulary with that would be 20k plus words with 100k left for code lol.
It’s just nuts what a dollar will get you these days in that space.
https://github.com/ctoth/SAM/tree/master/src
Assuming SAM is a faithful port of the original, it converts text into phonemes according to a bunch of pronunciation rules.
https://github.com/cpldcpu/ModPlayRISCV
The presentation of this part seems extremely padded out to me, ironically enough.
Then I thought you made a lecture on MCUs where the device was available for purchase generally for $0.10.
Then I thought with an MCU valued at $0.10 you generated speech
English... sigh
Although I guess that can also be confused with micro Couloumbs
From distant memory you got quite a bit more compaction.