Character Generation In 144 Bytes

[Jaromir Sukuba]  has an awesome BrainF*ck interpreter project going. He’s handling the entire language in less than 1 kB of code. Sounds like a great entry in the 1 kB Challenge. The only problem is the user interface. The original design used a 4 line character based LCD. The HD44780 controller in these LCDs have their own character table ROM, which takes up more than 1 kB of space alone.

[Jaromir] could have submitted the BrainF*ck interpreter without the LCD, and probably would have done well in the contest. That wasn’t quite enough for him though. He knew he could get character based output going within the rules of the contest. The solution was a bit of creative compression.

bf-cs-3Rather than a pixel-by-pixel representation of the characters, [Jaromir] created a palette of 16 single byte vectors of commonly used patterns. Characters are created by combining these vectors. Each character is 4 x 8 pixels, so 4 vectors are used per character. The hard part was picking commonly used bit patterns for the vectors.

The first iteration was quite promising – the text was generally readable, but a few characters were pretty bad. [Jaromir] kept at it, reducing and optimizing his vector pallet twice more. The final design is pretty darn good. Each character uses 16 bits of storage (four 4-bit vector lookup values). The vector pallet itself uses 16 bytes. That means 64 characters only eat up 144 Bytes of flash.
This is exactly the kind of hack we were hoping to see in the 1 kB challenge. A bit of creative thinking finds a way around a seemingly impossible barrier. The best part of all is that [Jaromir] has documented his work, so now anyone can use it in the 1 kB challenge and beyond.

1kb-thumb

 

If you have a cool project in mind, there is still plenty of time to enter the 1 kB Challenge! Deadline is January 5, so check it out and fire up your assemblers!

 

Bitbanging VGA Fits In Under 1 KB

Don’t throw those old VGA monitors away, turn them into works of art with [danjovic] and VGA Blinking Lights. This circuit uses a PIC16F688 to generate VGA video. Not just a random spray of monochrome dots either. VGA Blinking Lights puts up an ever-changing display of 48 colored squares.

blink-thumbOriginally created for the square inch contest, VGA Blinking Lights could hide behind a quarter. [Danjovic] dusted his project off and entered it in The 1 kB Challenge. The code is written in PIC assembly. The final hex used to generate the squares clocks in at 471 words. Since the PIC uses a 14 bit word, that’s just over 824 bytes. Plenty of space for feature creep!

Video is generated with a twist on the R2R DAC. [Danjovic] tweaked the resistor values a bit to obtain the correct voltage levels for the VGA standard. The color of the squares themselves are random, generated using a Galois Linear Feedback Shift Register (LFSR).

With only a handful of components, and a BOM cost under $5, this would be a fun evening project for any hardware hacker.

1kb-thumb

If you have a cool project in mind, there is still plenty of time to enter the 1 kB Challenge! Deadline is January 5, so check it out and fire up your assemblers!

Half A Chevy Becomes A Boat Launch

A tired 1990 Chevy Lumina isn’t the platform one would normally pick for a custom build. When you’re drag boat racing team on a budget though, you use what you can get cheap. Normally small boats are launched and landed using a trailer and tow vehicle. [Ashley Ruf’s] team at Little John’s racing is launching her boat “Kwitchabitchin” with a bit more style.

The team started by cutting the Lumina in half. Since the Chevy is a front wheel drive platform, everything behind the driver is more or less along for the ride. The gas tank was relocated, and notched to receive the front of the boat. The team then added a quad tire trailer frame. The frame is connected to the car with a long hydraulic cylinder. When the boat is being launched or landed, the cylinder can extend far enough to get the boat floating.

You might be thinking that there is no way this is street legal, and you’d be right. The Lumina only gets the boat into and out of the water. The boat is then pulled all the way forward using the hydraulics. The boat/car pair is a then perfect fit inside the team’s racing travel trailer.

You can check out a video of the car at work after the break

Continue reading “Half A Chevy Becomes A Boat Launch”

Decimal Time Clocks In Under 1 KB

Humans historically have worked well with decimal numbering systems. This is probably due to the fact most of us have ten fingers, which make counting in base ten easy. Yet humanity seems to doggedly stick to the odd duodecimal/sexagesimal time system. [Danjovic] is bringing a bit of sanity into the mix with a decimal clock he calls DC-10. He’s entered his clock into our 1 kB Challenge.

DC-10 builds upon C10, the decimal time display system created by [KnivD] on Hackaday.io.

Here’s how it works:

  • 1 year = 365.25 days (we can’t change this anyway)
  • 1 day = 100 intervals (the equivalent of ‘hours’)
  • 1 interval = 100 centivals (equivalent of ‘minutes’)
  • 1 centival = 100 ticks (equivalent of ‘seconds’)
  • 1 tick = 0.0864 current seconds.

1kb-thumb[Danjovic’s] implantation displays intervals and centivals, exactly what you would need to know the current time of day. He used a Microchip PIC16F628 running from a 4 MHz clock. time is displayed on seven segment LEDs. The PIC is programmed in C, using the classic version of Microchip’s own IDE: MPLAB 8.92. The code uses 297 program words. Since the ‘628 uses 14-bit instructions, that equates to just under 520 bytes. Perfect for the 1 kB challenge!

If you have a cool project in mind, there is still plenty of time to enter the 1 kB Challenge! Deadline is January 5, so check it out and fire up your assemblers!

Dawn Of The Tripteron 3D Printer

Cartesian 3D printers were the original. Then delta printers came along, and they were pretty cool too. Now, you can add tripteron printers to the mix.  The tripteron is an odd mix of cartesian and delta. The system was invented at the robotics laboratory at Université Laval in Quebec, Canada. The team who created it say that it is “isotropic and fully decoupled, i.e. each of the actuators is controlling one Cartesian degree of freedom, independently from the others.” This means that driving the bot will be almost as simple as driving a standard X/Y/Z Cartesian printer. The corollary to that are of course delta robots, which follow a whole different set of kinematic rules.

trioptera-renderA few people have experimented with tripteron printers over the years, but as far as we can see, no one has ever demonstrated a working model. Enter [Apsu], who showed up about a month ago. He started a post on the RepRap forums discussing his particular design. [Apsu] works fast, as he has now demonstrated a working prototype making prints. Sure they’re just calibration cubes, but this is a huge step forward.

[Apsu] admits that he still has a way to go in his research – especially improving the arm and joint implementation. However, he’s quite pleased that his creation has gone from a collection of parts to a new type 3D printer.  We are too — and we can’t wait to see the next iteration!

Continue reading “Dawn Of The Tripteron 3D Printer”

3D Printed R/C Lifeboat

Radio control boats usually bring up thoughts of racing catamarans, or scale sailing yachts. This build takes things in a slightly different direction. A radio controlled lifeboat with a built-in First Person View (FPV) transmitter. [Peter Sripol] used to be one of the awesome folks over at Flite Test. Now he’s gone solo, and has been cranking out some great builds on his YouTube channel. His latest build is a lifeboat loosely based on the totally enclosed lifeboats used on oil tankers and other seafaring vessels.

[Peter] designed the boat in 3D modeling software and printed it on his Lulzbot Taz 6. The files are available on Thingiverse if you want to print your own. The lower hull was printed in two pieces then epoxied together. Peter’s musical build montage goes by fast, proving that he’s just as good editing video as he is scratch-building R/C craft. Along the way he shows us everything from wiring up speed controls to cutting and soldering up a rudder. The final touch on this boat is a micro FPV camera and radio transmitter. As long as the boat is in range, it can be piloted through video goggles.

[Peter’s] boat is destined to be tested on an upcoming trip to Hawaii, so keep an eye on his channel to see how it fares in the monster waves!

Step Up To The 1 KB Challenge

1 kilobyte. Today it sounds like an infinitesimally small number. Computers come with tens of gigabytes of ram, and multiple terabytes of storage space. You can buy a Linux computer with 1 gig of RAM and secondary storage as big as the SD card you throw at it. Even microcontrollers have stepped up their game, with megabytes of flash often available for program storage.

Rapidly growing memory and storage are a great testament to technology marching forward to the beat of Moore’s law. But, we should be careful not to forget the techniques of past hackers who didn’t have so much breathing room. Those were the days when code was written in assembly. Debugging was accomplished with an expensive ICE (an In Circuit Emulator… if you were working for a big company), or a few LEDs if you were hacking away in your basement.

To keep these skills and techniques in play, we’ve created The 1 kB Challenge, a contest where the only limit is what you can do with 1 kB of program memory. Many Hackaday contests are rather loose with constraints — anyone can enter and at least make the judging rounds. This time 1 kB is a hard limit. If your program doesn’t fit, you’re disqualified, and that is a challenge worth stepping up to.

That said, this is Hackaday, we want people to be creative and work around the rules. The important thing to remember is the spirit of the design constraints: this is about doing all you can with 1 kB of program space. Search out the old and wise tricks, like compressing your code and including a decompression program in your 1 kB. Crafty hacks to squeeze more into less is fine. Using the 1 kB as a bootloader to load more code from an SD card is not fine.

Prizes

Any Hackaday contest needs some awesome prizes, and this one is no different.

Continue reading “Step Up To The 1 KB Challenge”