Posts with «atmega328» label

An Apple ][ emulator on an Arduino Uno

April Fools’ Day may have passed, but we really had to check the calendar on this hack. [Damian Peckett] has implemented an Apple ][, its 6502 processor, and a cassette port, all on an Arduino Uno. If that wasn’t enough, he also uses a PS/2 keyboard for input and outputs analog VGA. [Damian] is doing all this with very few additional components. A couple of resistors, a capacitor and some very clever hacking were all [Damian] needed to convince an Arduino Uno that it was an Apple.

Making all this work boiled down to a case of resource management. The original Apple ][ had 4KB of RAM and 8KB of ROM. The ATmega328 has only 2KB of RAM, but 32KB of Flash. The only way to make this hack work would be to keep as much of the emulation and other routines in Flash, using as little RAM as possible.

The core of this hack starts with the MOS 6502, the processor used in the Apple. [Damian] wrote a simple assembler which translates the 6502 opcodes and address modes to instructions which can be executed by the Arduino’s ATmega328. To keep everything in ROM and make the emulator portable, [Damian] used two large switch statements. One for address modes, and a 352 line switch statement for the opcodes themselves.

A CPU alone is not an Apple though. [Damian] still needed input, output, and the ROM which made the Apple so special. Input was through a PS/2 keyboard. The PS/2 synchronous serial clock is easy to interface with an Arduino. Output was through a custom VGA implementation, which is a hack all its own. [Damian] used the lowly ATmega16u2 to generate the video timing. The 16u2 is normally used as the Arduino Uno’s USB interface. The only external hardware needed is a single 120 ohm resistor.

The original Apples had cassette and speaker interfaces. So does this emulated Apple. [Woz’s] original cassette and speaker interface accurate loops to generate and measure frequencies. One of the trade-offs [Damian] accepted in his 6502 was cycle accuracy, so he couldn’t use the original routines. Not a problem though, as he was able to write simple functions to replace these routines and drop them in place of the Apple’s own ROM calls.

The Apple ][ ROM itself is handled as one giant character array. This includes the system monitor, Mini-Assembler, Sweet-16, and [Woz’s] own Integer Basic. [Damian] caps off this incredible project by booting his new computer, loading a  Mandelbrot set program from cassette -or in this case an audio file stored on his cell phone, and running it. The well-known fractal is displayed in all its glory on a modern LCD monitor, driven by a microcontroller, emulating a computer from nearly 40 years ago.

Thanks for the tip [Bill]!

Apple II Image by RAMA, [CC BY-SA 2.0], via Wikimedia Commons


Filed under: Arduino Hacks

Automatic Garage Door Opener Works for Your Cat

Using an Arduino or Raspberry Pi to perform a task in the real world is certainly a project we’ve seen here before, and certainly most of these projects help to make up the nebulous “Internet of Things” that’s all the rage these days. Once in a while though, a project comes along that really catches our eye, as is the case with [Jamie’s] meticulously documented automatic garage door opener.

This garage door opener uses an ATMega328 to connect the internet to the garage door. A reed switch is installed which lets the device sense the position of the door, which is relayed back to the internet. [Jamie] wrote an Android app that can open and close the door and give the user the information on the door’s status. One really interesting feature is the ability to “crack” the garage door. This is done by triggering the garage door opener twice with a delay in between. From the video after the break we’d say this is how [Jamie’s] cat gets in and out.

We love seeing projects that are extremely well documented so that anyone who wants to make one can easily figure out how. Internet-connected garage door openers have been featured in other unique ways before too, but we’ve also seen ways to automatically open blinds or chicken coops!


Filed under: home hacks, internet hacks

Binary Clock Would Make Doc Brown Proud

[Brett] was looking for a way to improve on an old binary clock project from 1996. His original clock used green LEDs to denote between a one or a zero. If the LED was lit up, that indicated a one. The problem was that the LEDs were too dim to be able to read them accurately from afar. He’s been wanting to improve on his project using seven segment displays, but until recently it has been cost prohibitive.

[Brett] wanted his new project to use 24 seven segment displays. Three rows of eight displays. To build something like this from basic components would require the ability to switch many different LEDs for each of the seven segment displays. [Brett] instead decided to make things easier by using seven segment display modules available from Tindie. These modules each contain eight displays and are controllable via a single serial line.

The clock’s brain is an ATmega328 running Arduino. The controller keeps accurate time using a DCF77 receiver module and a DCF77 Arduino library. The clock comes with three display modes. [Brett] didn’t want and physical buttons on his beautiful new clock, so he opted to use remote control instead. The Arduino is connected to a 433MHz receiver, which came paired with a small remote. Now [Brett] can change display modes using a remote control.

A secondary monochrome LCD display is used to display debugging information. It displays the time and date in a more easily readable format, as well as time sync information, signal quality, and other useful information. The whole thing is housed in a sleek black case, giving it a professional look.


Filed under: Arduino Hacks
Hack a Day 09 Jan 03:00

Hard Drive Clock is Simple and Elegant

[Aaron] has been wanting to build his own binary desk clock for a while now. This was his first clock project, so he decided to keep it simple and have it simply display the time. No alarms, bells, or whistles.

The electronics are relatively simple. [Aaron] decided to use on of the ATMega328 chips he had lying around that already had the Arduino boot loader burned into them. He first built his own Arduino board on a breadboard and then re-built it on a piece of protoboard as a more permanent solution. The Arduino gets the time from a real-time clock (RTC) module and then displays it using an array of blue and green LED’s. The whole thing is powered using a spare 9V wall wort power supply.

[Aaron] chose to use the DS1307 RTC module to keep time. This will ensure that the time is kept accurately over along period of time. The RTC module has its own built-in battery, which means that if [Aaron's] clock should ever lose power the clock will still remember the time. The RTC battery can theoretically last for up to ten years.

[Aaron] got creative for his clock enclosure, upcycling an old hard drive. All of the hard drive guts were removed and replaced with his own electronics. The front cover had 13 holes drilled out for the LED’s. There are six green LED’s to display the hour, and seven blue LED’s for the minute. The LED’s were wired up as common cathode. Since the hard drive cover is conductive, [Aaron] covered both sides of his circuit board with electrical tape and hot glue to prevent any short circuits. The end result is an elegant binary clock that any geek would be proud of.


Filed under: Arduino Hacks

HackEDA hits Kickstarter, makes Arduino board design a drag-and-drop affair (video)

Writing code for an Arduino-friendly board is relatively easy; creating the board is the hard part, unless you live and breathe electrical engineering. If HackEDA has its way, however, the design process could be almost as easy as window shopping. Its new Kickstarter-backed project lets tinkerers choose from a list of parts and get a made-to-order board without knowing a lick about PCB assembly -- algorithms sort out the finer details. While the initial effort includes just 36 combos based around an Atmega328 processor, contributors who want tangible hardware can pay anything from $30 for a bare board through to $10,000 for the first stages of mass production. The truly committed will have to wait until December for the finished goods, but those willing to try HackEDA can use its existing web tool for free.

Filed under: Misc

Comments

Source: Kickstarter, HackEDA

Engadget 20 Jun 13:00

Pocket Serial Host acts as an Apple II disk drive

[Osgeld] is showing off what he calls a sanity check. It’s the first non-breadboard version of his Pocket Serial Host. He’s been working on the project as a way to simplify getting programs onto the Apple II he has on his “retro bench”. When plugged in, the computer sees it as a disk drive.

The storage is provided by an SD card which is hidden on the underside of that protoboard. This makes it dead simple to hack away at your programs using a modern computer, then transfer them over to the retro hardware. The components used (starting at the far side of the board) are a DB9 serial connector next to a level converter to make it talk to the ATmega328 chip being pointed at with a tool. The chip below that is a level converter to get the microcontroller talking to the RTC chip seen to the right. The battery keeps that clock running when there’s no power from the 5V and 3.3V regulators mounted in the upper right.

The video after the break shows off this prototype, the breadboard circuit, and a demonstration with the Apple II.

[Thanks Brendan]


Filed under: classic hacks, computer hacks

Engine start button with fingerprint and remote webasto control

Engine start button with fingerprint and remote webasto control with original key from factory. Board based on the ATmega328, it controls engine start function, climate control, battery voltage, coolant fluid temperature, and so on. Fingerprint scanner BIOCODE Auto M10.

Arduino based Cybot

Primary image

What does it do?

Navigate around via ultrasound but will eventually do more

I recently recieved lots of Cybot parts from my friend who collected the parts of eBay, no longer wanting them he kindly gave them to me, my plan was to convert it to an Arduino based robot.

If you are not aware what a Cybot looks like here is a picture I took before the dismantling process:

The Cybot had some good features; line following, IR remote control, speech recognition and even the ability to find its IR ball and shoot goals into an IR goal.

Cost to build

Embedded video

Finished project

Number

Time to build

12 hours

Type

wheels

URL to more information

Weight

read more

Obstacle avoidance robot (made from drift car)

Primary image

What does it do?

Navigate around via ultrasound

Hello again everybody my name is chickenparmi, and I like robots.

Today I would like to show you my obstacle avoidance bot, with a difference. The difference with this bot is that it has been build onto an RC drift car, meaning it goes very fast and is very dangerous.

Cost to build

Embedded video

Finished project

Complete

Number

Time to build

Type

URL to more information

Weight

read more

Ebay-bot (my version of the start here robot)

Primary image

What does it do?

Avoid obstacles

This is my version of the "start here" robot. For me this was a programming exercise. I had written an obstacle avoiding sketch for my Rover 5. It worked but I was never really happy with it. Most code that I've seen online uses lots of delays in the code. Some time ago I swore to myself to never use the delay function in void loop ever again. There are various reasons for it, once you start writing more advanced code the delay function can cause lots of trouble. I also use a library (RF24network) in another project where I can not use the delay function.

Cost to build

$50,00

Embedded video

Finished project

Number

Time to build

Type

URL to more information

Weight

read more