-
The New Board Works
08/06/2024 at 15:28 • 0 commentsMy new board has working USB, Ethernet, power, and audio! I did a board revision previously which I did not log, where I made two silly mistakes which prevented that version from working. Here is the largely working board:
I say "largely working" because there is an issue with one USB port, but this isn't due to the PCB design, it is due to my assembling an SMD board by hand XD
So, I can now connect whatever devices I need/want to my Teensy very easily for building another Arduino Desktop. One USB port is just not enough. Now the last thing I'll need is a video card of some kind, either my #uPD7220 Retro Graphics Card (and VGA hack) project or the #RA8875 VGA card will do.
The only thing I really want to improve at this point is the audio circuit - specifically how it pulls power from the main 5v rail, because it causes some noise (although it does sound pretty cool...). Here is the audio circuit on this board:
This circuit is basically just a DAC and an op-amp, with some power circuitry, which is *designed* to clean the noise from the signal. For the most part, it does do that, but if VDC is 5v or lower then it fails miserably, and the user can hear the noise. This power circuit basically switches between an LDO and the main 5v rail for providing the 5va rail to the amplifier. If there is no power available other than USB or a low VIN voltage, then it switches to the main 5v line, which introduces a lot of noise from the rest of the system, and typically also from the device at the other end of the USB cable too. I also suspect that there is something else at play making this worse, perhaps the LDO being backfed or some instability in the 5VA line when coming through the LM66100. Likely noise is also coming through the two resistor dividers before the amp, since it is connected to the 5VA line directly.
The only other thing, is that this circuit is VERY loud. The design, is that the volume can be controlled digitally by scaling the PCM data going to the DAC. Well, perhaps controlling volume a different way could improve sound quality, both because it could reduce noise, and because it would avoid compromising the PCM data precision.
In the next board revision, which I'm not rushing towards as this works well enough, I plan to add more filtering to the system 5v line before feeding into the audio circuit, and to consider adding some feature for analog control of the volume of the audio circuit. Everything else is working great though!
-
Misadventures in PCB Design
05/28/2024 at 17:15 • 0 commentsLast log I designed a board and ordered it; a few days ago I received that board and assembled it. Here's what it currently looks like, after some alterations:
The board came out nice if you ignore the modifications. Unfortunately, after I baked the board for SMD soldering, the board fell while the solder was still liquid and components got thrown off the board. When I put them back on, I mixed up two of the ICs, and I think this is why the voltage regulator flooded the 5v line with 11v. Needless to say, numerous components were destroyed, so I don't know if certain components work. Nonetheless, I was able to find several issues with my design, and so I'll be doing one more board run with a few modifications:
List of changes:- Added ideal diodes to control flow of power, to prevent regulator backfeeding and to control power going to the audio amp
- Added missing pullup resistors to the USB hub for overcurrent detection and USB connection detect
- Changed the IC used for 5v level shifting to the 74LVC245
- Removed the buck regulator I designed and replaced it with a "linear regulator replacement". The ones like this I've used before worked great. This one is rated for 2A.
While I wait for the new board to arrive, I've been working on connecting this to my #uPD7220 Retro Graphics Card (and VGA hack), and at this point I can communicate with that card. Due to hardware bugs and fried components, I can only do this by means of more modifications:
The card also has some design bugs, so I had to make some hacks there too. I'll post a log to that project once I get a valid signal from the card - I think I'm getting close.
Well, that is all for now. -
Arduino/Teensy based SBC
05/16/2024 at 15:08 • 0 commentsIn the previous log I planned to build a new Arduino-Desktop type system, with a more powerful microcontroller like the Teensy 4.1 or ESP32. I decided to go with the Teensy 4.1, because it has a lot of useful features out of the box for me to work with, and although it doesn't have WiFi, WiFi can be easily added with an ESP8266 or ESP32 attachment. The Teensy 4.1 on its own provides Ethernet, a blazing fast processor, SDIO, I2S audio, a USB host, and 8 UARTs.
The board I'm working on makes use of all of it - it provides Ethernet, 4 USB ports, audio, and will provide several headers for connecting more stuff. I wish the KiCad rendering of my half-baked board had 3D models for the connectors, but it doesn't, so please just imagine that you see them:
-
The need for refined hardware
05/08/2024 at 00:27 • 0 commentsI decided to break the new OS into a new project: #NTIOS (Arduino OS). I think this project here should be more for the hardware and the shell program, and also any programs (or games??) made on the platform.
I'm going to try to build an interesting machine using a Teensy or ESP32, and I'm thinking of combining it with the #uPD7220 Retro Graphics Card (and VGA hack) project to provide VGA output. This would be interesting, because then we could have a device using early 1980s graphics technology to output VGA (not invented yet), while simultaneously running software at 800Mhz, and loading linux ELFs into an Arduino environment. This would be a bizarre but fun combination of hacks. And, greatest of all, it could run games, probably including DOOM. It just seems like an absurd yet wonderful conglomeration of technology.
As far as loading ELF files goes, I think I'm actually pretty close. I think the main error I made previously was in the compiler options. Many of the necessary syscalls are already implemented in NTIOS, and would just need the dynamic linking. Importantly, the Teensy 4.1 only uses the thumb ISA, so one must compile with all the right options. The code for ELF loading and executing on Teensy can be found on my gitlab server.
The hardware I had made previously was cool and worked well, but was very limited with system resources, and I feel that it didn't leave much room for expanding on. Now I have a highly modular OS I can plug into pretty much anything and various more powerful microcontrollers have become widely available. I've also just become way better at programming and building electronics in the past several years. I think there's an opportunity to make an actually cool and fun computer running on Arduino, where there wasn't before.
-
Should I return? Updates from past few years
04/10/2023 at 04:09 • 1 commentI haven't been on HaD for a few years now. But this Arduino computer project has, in some way, continued to advance. I'm going to write a series of logs outlining the changes and developments that have happened over the past few years, not necessarily in chronological order.
At some point I took some code I wrote, copied and restructured it into a git submodule, and started building an OS around it. A bigger, more flushed out OS and fragments of a kernel and HAL.
The repo is on my personal GitLab instance here if you want to take a peek at the modern source code: https://git.nuclaer-servers.com/Nuclaer/ntios-2020
In all honesty, I never planned on releasing it, so there's some pieces that were copied from around the internet but probably have attributions in the comments.
I've created many devices with this software over the past 2-3 years:Various devices I built over the last few years Writing assembly in a text editor on a hacked-together laptop-like computer Closer image of some of the associated electronics Terminal output (device pictured lower right in top image) All of the devices above run ~95% the same software. The only differences are in the exact mapping/configuration of the hardware and some drivers to plug it in to the rest of the HAL.
I kindof just wanted to sneak peek what the project kindof is now, and see what people think. This is not very much, and doesn't describe what's going on or how any of this works, this is just kindof a preview. If you want to see/learn more, comment so I know people are interested.
What does this run on?
If you pay attention, you'll see I'm quite a fan of the Teensy 4.1 now. I've used other chips like the ESP32 and Artemis, but T4.1 has been my go-to for a while now. I haven't used AVR in many of my projects for a long time now, but I think I could run this on an ATmega2560. The software stack is getting rather large though, and probably ever more memory intensive, so I don't think I could run this well on an ATMega328p or similar chip.
Relation to the original software
When I first created this new OS in May 2020, I probably only copied over the existing system() function I had written for this project, but it seems like everything else was written from scratch to be more modular and use more OOP. It's not clear if I copied some stuff from the NTIOS_2.0 codebase, or if I started from scratch. In either case, the way the HAL is set up for the new OS project has some strange resemblance to the HAl in NTIOS_2.0. But in all honesty, at some point I had pretty much completely forgotten about the NTIOS_2.0 code and what I had been working on. This happens more frequently than I would like to admit...Should this even be considered the same project?
I think this is the logical continuation of this project. I don't even know where the hardware is for this project anymore, but I want to make it nicer and more modern anyway. Is it the same? Well we have a new codebase, new hardware... But yet it has the same objectives and interestingly, seemingly, some of the same architecture. I don't know, but this project will die if it stays what it was, because that is in the past. Grow, or die, is the way of life.
Where is this project going now?
My hopes for the new system are a bit more lofty. My newer code is far more mature and advanced. I think I can load and execute ELF files from an SD card on ARM if I put some more work into it. In the meantime we can assemble programs for a built-in emulator and execute them. Currently this still is compiled and uploaded from Arduino.
If I come back to HaD, this project is going to change a lot. The code will be newer and more capable. The hardware will become more powerful and more portable (like tablets and laptops instead of a static device). -
GPIO Support
10/12/2019 at 23:28 • 0 commentsI added GPIO drivers, and a gpio program to test the drivers.
Essentially I just set pin 13 to output, then set it HIGH. And yes, it worked! Yay!
What's nice about the way this is programmed is that it is independent of hardware and the Arduino IDE. the GPIO command I used uses whichever driver(s) for GPIO that it finds, regardless of what hardware this is running on. I even can run this OS on my linux machine as a cli command. Great for testing!
-
AVR Support
10/11/2019 at 06:08 • 0 commentsWait - didn't this used to run on Arduino?
Yea, in the Arduino IDE. I am no longer using the Arduino IDE, and uploading to AVR via a makefile works great!
After overhauling the OS I lost AVR support. I have regained it! Here's what the result is:
I am still using the Arduino IDE for a serial monitor, but everything seems to work. I still need to add support for lots of stuff now, but I'm running on a microcontroller again, which is nice.
Anyway, I'm super excited, next I plan to add a GPIO API, so that later I can add software serial (then graphics support via an NGT30 :D)
-
Overhaul of the OS
10/05/2019 at 04:53 • 0 commentsIt's been a while since I worked on this, and I see things differently now.
First, I designed this dumb. It's not scalable. It was too hard to add drivers and programs and nothing was organized.
Now I have separate directories for programs/commands and drivers. Also, I have python scripts to configure the programs and drivers before compilation. They are configured with JSON files that the python scripts read, and each component can be enabled/disabled.
So I now have organization and scalability!!! Yay!
This is wonderful because I want to make this OS cross-platform. I want support for more hardware, more processor types, and I want it to be usable in more ways. For instance, to use it on microcontrollers as a usable OS in projects that need less processing power than a raspberry pi, like small robots, in home automation, and simple portables (like my #OpenPDA project).
I definitely have a ways to go, but this is a major step. See PR on Github here: https://github.com/NuclearManD/NTIOS_2.0/pull/1
Note:
- Not as much hardware support - yet. Only UART, NGT30, and PS2 Keyboard support
- No GUI anymore (can be fixed later)
- Added a man command
- Filesystem is not working, even though it is there.
- No multitasking at this time
Like I said, lots of work to do!
-
basic BASIC and filesystem commands work!
04/24/2018 at 00:58 • 2 commentsNow the SD card is actually useful! Project is now getting even more fun :D
-
SD Card working (finally!)
12/02/2017 at 23:38 • 0 commentsMy arduino desktop now has a filesystem. I can't do much with it yet, but it works. I also made some other improvements:
- better task manager
- CLI improvements
- new GUI color scheme
Here is a video:
Also, like I said in the video, I am making a board with:
- Arduino mega
- NGT20
- PS/2 Keyboard port
- SD card slot
All in one arduino-mega sized board.