Tag Archives: ATmega88PA

Build your own Arduino-compatible, remote-controlled lights


Maker hacks his own Arduino-compatible, Philips Hue-like bulbs with LYT and Souliss.


Looking to control the multi-colored lights in your home? Sure, you could always go out and buy your own set of Philips Hue bulbs. Or, you can do what a Dario Di Maio has done and build your own that plugs into a standard light socket. As the Maker points out, while smart LEDs have become quite common today, none have been Arduino-compatible.

lyt_ledbulb-1

For this project, the Maker used the Authometion LYT — an ATmega88PA powered RGBW LED bulb with an Arduino shield as a gateway, which enabled him to freely create his own custom behaviors and code. Both the Arduino and shield run the Souliss framework, while the lights are controlled through the Souliss App.

The shield is equipped with two radio modules, an ESP8266 Wi-Fi SoC that connects the Arduino with the home router and a PL1167 2.4 GHz transceiver wired to the Atmel MCU to control the bulbs. (Di Maio recommends either the Uno and Leonardo.)

Meanwhile, the ESP8266 and the Arduino are linked via USART. According to Di Maio, you can download the necessary libraries and examples from the Authometion store. These allow you to bridge command over Wi-Fi to the USART and then to the PL1167.

lytshield-softserial

“We will run two instances of Souliss, one on the ESP8266 and the other on the Arduino board, this because Souliss embedded the communication between different nodes and this let us skip the writing of a custom code to link these two devices,” Di Maio writes.

The bulb itself is a 9W RGBW LED, which generally should fit in most lamps with an E27 plug. The Maker provides an elaborate breakdown of his project along with the necessary code on his page here.

ATmega88PA drives this One-Armed Bandit

More than 30 years ago, “vagrearg” learned 6802 microprocessor programming on a dev-kit system. After a few weeks of tinkering, vagrearg designed a One-Armed Bandit (slot-machine) program on 7-segment displays.

“If I remember correctly, the dev-kit had 6 displays in a matrix, 4 to display address and 2 for data, and an 4×5 keyboard matrix for input and a speaker,” he explained in a recent blog post.

“Any user-code could take over the system and do whatever. The program was written in 6802 assembly and took up 2..3kByte of memory.”

Earlier this month, vagrearg was feeling nostalgic and decided to reconstruct the One-Armed Bandit with the following components:

“Two hours of soldering later I had a board capable of reliving old memories. The system runs on 3xAA batteries which should last for about 24 hours of continuous play. The batteries hold several months when the system is in sleep mode,” he said.

“No real optimization has been performed to reduce power consumption. A later version may revisit that part in the firmware, especially sleep-mode power reduction could be improved.”

On the software side, the One-Armed Bandit is capable of implementing the following features:

  • 

Four reels with symbols
  • Random positioning
  • Animated reel movement
  • Sound when reels are moving
  • Hold any reel
  • Start rolling/subtract credits
  • Detect winnings/add credits
  • Bonus button (double cost/win)
  • Music
  • Scrolling text
  • Sleep mode

“Music is generated by the AVR processor using a timer to toggle an output-pin. This has the advantage that it can run asynchronously from the rest of the code,” vagrearg added. 

”The timer is also useful to generate the correct pitch over several octaves. The melodies are then simple tables with a pitch and a duration.”

Interested in learning more? You can check out the project’s official page here.

SLDongle
 powered by Atmel’s 88PA

Simon Schoar wanted to offer his colleagues an opportunity to explore the fascinating world of microcontrollers (MCUs). So he came up with the idea to give his co-workers a specially designed Atmel-powered development board nicknamed “SLDongle” for Christmas.

Key components and specs include:

“The technically challenged can plug sld into their USB port and enjoy the beauty of the assembly. The LEDs light up and cycle through different animation sequences,” Schoar explained in a recent blog post. “The more experienced can remote control the LEDs from their USB host by piping data into sldtool (Linux/Mac). The initial delivery contained examples to visualize the CPU utilization (shell for Linux, C for Mac), but the team quickly came up with a nifty ruby solution, counting down the remaining minutes until the next train departs at the station nearby.”

And advanced users? Well, without the need of dedicated ISP hardware they can flash their own C or ASM software directly via USB. More specifically, holding the button while powering up allows sld to enumerate as USBasp, enabling the board to be flashed by avrdude or similar software.

Interested in learning more about the ATmega88PA-powered SLDongle? You can check out Simon Schoar’s blog post here, HackADay’s coverage here and Github here for the corresponding BoM, Eagle/Gerber files and source code.