How To Program A Really Cheap Microcontroller

There are rumors of a cheap chip that does USB natively, has an Open Source toolchain, and costs a quarter. These aren’t rumors: you can buy the CH552 microcontroller right now. Surprisingly, there aren’t many people picking up this cheap chip for their next project. If there’s no original projects using this chip, no one is going to use this chip. Catch 22, and all that.

Like a generous god, [Aaron Christophel] has got your back with a working example of programming this cheap chip, and doing something useful with it. It blinks LEDs, it writes to an I2C display, and it does everything you would want from a microcontroller that costs a few dimes.

The CH552, and its friends the small CH551 all the way up to the CH559, contain an 8051 core, somewhere around 16 kB of flash, the high-end chips have a USB controller, there’s SPI, PWM, I2C, and it costs pennies. Unlike so many other chips out there, you can find SDKs and toolchains. You can program the chip over USB. Clearly, we’re looking at something really cool if someone writes an Arduino wrapper for it. We’re not there yet, but we’re close.

To program these chips, [Aaron] first had to wire up the microcontroller into a circuit. This was just a bit of perf board, a resistor, a few caps, and a USB A plug. That’s it, that’s all that’s needed. This is a fairly standard 8051 core, so writing the code is relatively easy. Uploading is done with the WCHISPTool software, with options available for your favorite flavor of *nix.

But it gets better. One of the big features of the CH552 is USB. That means no expensive or weird programmers, yes, but it also means the CH552 can emulate a USB HID device. The CH552 can become a USB keyboard. To demo this, [Aaron] programmed a CH552 board (DE, here’s the Google translatrix) loaded up with touch pads and LEDs to become a USB keyboard.

If you don’t feel like soldering up one of these yourself, there are some suppliers of CH554 dev boards, and the files for [Aaron]’s projects are available here. Check out the videos below, because this is the best tutorial yet on programming and using some very interesting chips that just appeared on the market.

Continue reading “How To Program A Really Cheap Microcontroller”

A Lightweight AVR IDE

It’s entirely possible to do your coding in vim or emacs, hammering out hotkeys to drive the interface and bring your code to life. While working in such a way has its charms, it can be confronting to new coders, and that’s before even considering trying to understand command line compiler settings. The greenhorn coder may find themselves more at home in the warm embrace of an IDE, and [morrows_end] has now built one for those working with AVR assembly code.

The IDE goes by the name of Simple AVR IDE, or savr_ide for short. Programmed in C++ with the FLTK widget library, [morrows_end] has tested it on Windows XP, but notes that it should successfully compile for Linux, Unix, and even MacOS too.

All the basic features are there – there’s syntax highlighting, as well as integration with the AVRA assembler and AVRDUDE for programming chips. It’s a tool that could make taking the leap into assembly code just that little bit easier.  For another taste of bare metal coding, check out [Ben Jojo]’s discussion of x86 bootloaders.

Infinity Icosahedron Is Difficult To Contemplate Even Looking Right At It

Cubes and pyramids are wonderful primitive three-dimensional objects, but everyone knows that the real mystical power is in icosahedrons. Yes, the twenty-sided polyhedron does more than just ruin your saving throws in tabletop RPGs – it can also glow and look shiny in your loungeroom at home.

[janth]’s build relies on semitransparent acrylic mirrors for the infinity effect, lasercut into triangles to form the faces of the icosahedron. The frame is built out of 3D printed rails which slot on to the acrylic mirrors, and also hold the LED strips. [janth] chose high-density strips with 144 LEDs per meter for a more consistent effect, and added frosted acrylic diffusers to all the strips for a clean look with less hotspots from the individual LEDs.

An ESP32 runs the show, and the whole assembly is epoxied together for strength. The final effect is very future disco, and it’s probably against medical advice to stare at it for more than 5 minutes at a time.

The infinity effect is a popular one, and we’ve seen a beautiful cube build by [Heliox] in recent times. Of course, if you do manage to build an actual portal through time and space, and not just a lamp that looks like one, be sure to send us a tip. Video after the break.

Continue reading “Infinity Icosahedron Is Difficult To Contemplate Even Looking Right At It”

Command Line Utilities… In The Cloud?

Although many people think of Linux-based operating systems as graphical, really that GUI is just another application running over the bare operating system. Power users, remote administrators, and people running underpowered computers like a Raspberry Pi have a tendency to do more with command line tools. [Igor] did a FOSDEM19 presentation you can see below about how he’s providing web-like services to the command line using web servers and curl as a client.

This is subtly different from just accessing an ordinary web server via curl. The output is meant for display in the terminal. Of course, you could also hit them with a web browser, if you wanted — at least, for some of them. [Igor’s] tools include a weather reporter, a QR code encoder, information and graphs for currency and cybercurrency rates, and an online help system for programmers.

Continue reading “Command Line Utilities… In The Cloud?”

Identifying A 3D Printer From A 3D Print

A TV crime show I saw recently centered on the ability of forensic scientists to identify a plastic bag as coming from a particular roll: it’s all down to the striations, apparently. This development isn’t fiction, though: researchers at the University of Buffalo have figured out how to identify the individual 3D printer that produced a particular print. The development, called PrinTracker, uses unique differences in the way a printer lays down print material to identify a printer with a claimed 94 percent accuracy.

Continue reading “Identifying A 3D Printer From A 3D Print”

Calling World Cup Goals Before They Happen, By Polling A Betting Site

[Ben] made an interesting discovery during the FIFA World Cup in 2018, and used it to grant himself the power to call goals before they happened. Well, before they happened on live TV or live streaming, anyway. It was possible because of the broadcast delay on “live” broadcasts, combined with the sports betting industry’s need for timely and detailed game state tracking.

He discovered that a company named Running Ball provides fairly detailed game statistics in digital form, which are generated from inside the stadium as events occur. An obvious consumer of this data are sports betting services, and [Ben] found a UK betting site that exposed that information in full inside their web app. By polling this data, he measured a minimum of 4 seconds between an event (such as a goal) being reported in the data and the event occurring on live TV. The delay was much higher — up to minutes — for live streaming. [Ben] found it quite interesting to measure how the broadcast delay on otherwise “live” events could sometimes be quite significant.

Knowing broadcast delays exist is one thing, but it’s a neat trick to use it to predict goals before they occur on “live” television. This isn’t the first time we’ve seen evidence of [Ben]’s special interest in data and using it in unusual ways; he once set up a program to play Battleship over the Border Gateway Protocol (BGP), making it very probably the first board game played over BGP.

The Magnetic Rubik’s Cube

Ernő Rubik has much to answer for when it comes to the legacy of his namesake cube. It has both enthralled and tormented generations, allowing some to grandstand in the playground while others are forced to admit defeat in the face of a seemingly intractable puzzle. It just so happens that [Tom Parker] has been working on a Rubik’s cube with a novel magnetic design.

Yes, that’s right – [Tom]’s cube eschews the traditional rotating and sliding mechanism of the original cube, instead replacing it all with magnets. Each segment of the cube, along with the hidden center piece, is 3D printed. Through using a fused deposition printer, and pausing the print at certain layers, it’s possible to embed the magnets inside the part during the printing process.

[Tom] provides several different versions of the parts, to suit printers of different capabilities. The final cube allows both regular Rubik’s cube movements, but also allows for the player to cheat and reassemble it without having to throw it forcefully against the wall first like the original toy.

It’s an interesting build, and a great one to get to grips with the techniques involved in embedding parts in 3D prints. It may not be capable of solving itself, but we’ve seen another build that can pull off that impressive feat. Video after the break.

Continue reading “The Magnetic Rubik’s Cube”