Nui (IR volume controller)

 

nui_v1p0-600

Alvaro Prieto made an IR volume controller and wrote a post on his blog detailing its assembly:

Nui is an IR controlled volume controller for analog audio. It sits between your audio source and speakers and can amplify or reduce the volume using IR commands (and eventually BLE).
Why do I need this?
It all started because I have my trusty Logitech Z-2300 speakers and subwoofer I purchased back around 2004/5. They still work great, but instead of being on my computer, they are used for my TV. Unfortunately, the TV’s line out doesn’t honor the TV’s volume and is always outputting at max volume. Sure, I can get up and change the volume on the speakers themselves, but wouldn’t it be more convenient to do it with the TV remote?!
That’s how the Nui project started. It sits between my TV and my speakers and now I don’t have to get up to change the volume :D

See the full post on his blog and on GitHub:

Traktorino, an open source DIY MIDI controller

Traktorino

Here’s an Arduino based open source MIDI controller by Musico Nerd, the Traktorino:

The Traktorino is a powerful low-cost DIY MIDI Controller. It is based in the Arduino platform and it comes in DIY kit, or assembled. In its core, there’s a shield that connects to an Arduino Uno, which uses open-source code, making it totally hackable.
The Traktorino is a MIDI class compliant device, designed for controlling Traktor. It has several features and custom made mappings, so you can take the most of the software. However, it can do much more than that. The Traktorino can control any software that accepts MIDI, like Ableton Live, Serato, FL Studio, Logic, etc

More info at musiconerd.com and on GitHub.

Check out the video after the break.

‘Daytime Running Light’ module (DRL) with ATtiny85

montaj_test2

Nicu Florica writes:

A reader of my sites and blogs, Mr. Liviu Hinoveanu wanted to replace classical DRL module made with 555 with Attiny85 programmed in Arduino style.
He send me the schematic and PCB designed with Livewire and PCB Wisard software
After I undertand what module must work, I write DRL_ATtiny85.ino sketch.
Mr. Hinoveanu made module and upload sketch in ATiny85 like in article from Programarea unui microcontroler ATTiny85 cu sketch Arduino.

See the full post on his blog, Arduinotehniq.

Check out the video after the break.

 

Arduino bootloader and ISP

After having developed a sketch using the Arduino IDE, you can compile and load it on the Arduino board connected to your PC with just a click on the upload button:

isp-002

The program is stored in the flash memory of the microcontroller (on Arduino Uno boards this is the ATmega328p).

You can upload your program on the microcontroller without the need of a dedicated programmer because of the microcontroller itself runs a small program named bootloader.

The bootloader is indeed a program, already flashed in every microcontroller of the Arduino boards, that is executed everytime the microcontroller is reset. The first operation the bootloader does is to check if on the serial/USB connection there’s a request to flash a new program. If so, the bootloader talks with the Arduino IDE, receives the new program and stores it in the flash memory:

isp-001

The bootloader used as of now on the Arduino Uno boards is named optiboot.

If you buy an ATmega328p chip and you want to upload your sketches on it using the Arduino IDE you have first to flash the bootloader in the chip. You usually need a dedicated programmer to program the chip. ATmega microcontrollers support a programming method named In System Programming (ISP), designed to program the chips directly on the board where theyt are located.

This method requires to connect 6 pins of the chip to the programmer:

  • 5V and ground
  • reset
  • MISO, MOSI and SCK

For example every Arduino Uno has a dedicated connector which allows to re-program the ATmega328p chip without removing it from the board:

isp-003

On the Internet you can find several ATmega programmers (for example this by Adafruit); very interesting is the possibility to use an Arduino as a programmer, thanks to the work of Randall Bohn.

First you have to upload on your Arduino the ArduinoISP sketch which is included in the Examples shipped with the IDE:

isp-004

then you have to create – for example on a breadboard – a minimal circuit with the chip to be programmed, a 16MHz crystal and two 22pF capacitors:

isp-013

using some jumpers, connect your Arduino Uno to this circuit as it follows:

  • 5V -> pin 7 and 20
  • Ground -> pin 8, 22 and the two capacitors
  • pin 10 of Arduino or RESET of the ICSP connector -> pin 1
  • pin 11 of Arduino or MOSI of the ICSP connector -> pin 17
  • pin 12 of Arduino or MISO of the ICSP connector -> pin 18
  • pin 13 of Arduino or CLK of the ICSP connector -> pin 19

isp-014 isp-015

Configure the IDE to use Arduino as programmer:

isp-005

then burn the bootloader:

isp-006

after few seconds, the IDE should confirm that the bootloader was programmed on the chip:

isp-011

Shield

On some webstores I found an Arduino shield which makes it simple to program ATmega chips. It’s named AVR ISP Shield and manufactured by a company called “OPEN-SMART”:

isp-012

This shield has a ZIF (Zero Insertion Force) socket where the chip goes, some pins to connect it to external boards and a buzzer that is used to confirm the burn process with two beeps.

On the Internet I found an archive with the documentation about this shield and the “official” sketch. You can also use the sketch shipped with the IDE, it won’t only activate the buzzer when the burning process ends successfully.

If you need to program several ATmega328p chips (for example if you’re building your Arduino-compatible boards) the use of this shield makes the programming process much easier and faster!

 

Attiny85 backpack programmer header

p-img_20180220_102908-600

Facelesstech published a new build:

So when I was into using just a atmega328 dip chip I make a programmer header for it that also had a crystal and the capacitors need to make it function. I wanted to do the same for the attiny85. As you know you have to use a ISP programmer to flash the attiny85, This requires you to look up the pinouts and get a bunch of jumps out to wire it up. I wanted to eliminate all of this.

More details at Facelesstech site. Github link here.

Check out the video after the break.

Laser arm

img_20180311_181008-600

Facelesstech published a new build:

So some time last year I ordered one of those servo 2 axes (pan and tilt torret) arm kits from aliexpress. It was fun to play with but I didn’t quite find a reason to use it in a project. Then I seen this project on hackaday and a light bulb went off in my head, Why hadn’t I thought about adding a laser to the arm. This would be great to let your cat or dog play with or drive them mad.

 

Check out the video after the break.

Arduino controlled Dual Mono AK4490 DAC (part 3)

Arduino controlled Dual Mono AK4490 DAC

Here’s the part 3 of Dimitris’ Arduino controlled Dual Mono AK4490 DAC project we covered previously:

Following up on Part 2, it’s time to talk about the output stage.
This output stage is the brainchild of my friend Kostas, all I did was lay out the PCB.
It is a fully discreet single-ended class-A output stage, outputting ~2.4V RMS.

More details on Dimdim’s blog. If you missed part 1 and part 2, be sure to check it out.

BLE with Bluno Beetle

Some time ago my friend Mauro Alfieri showed me an interesting development board produced by DFRobot and called Bluno Beetle (now Beetle Ble). It seemed the perfect board to start “playing” with the Bluetooth Low Energy (BLE) technology; therefore I ordered  one board directly from the DFRobot store.

I expected to receive the usual anonymous parcel with the board inside an antistatic plastic bag; DFRobot instead sends its products in an elegant cardboard box, protecting them with foam:

bluno-011 bluno-012

Bluno Beetle is really small and therefore perfect for wearable projects:

bluno-013 bluno-014

But what is it? Simplifying is a board, Arduino Uno compatible (it hosts the ATmega328P microcontroller) to which has been added the CC2540 chip from Texas Instruments to act as USB and BLE controller. The two chips communicate via a serial interface:

bluno-001

The CC2540 chip is actually a real microcontroller that runs a firmware developed by DFRobot. This firmware can be configured using AT commands. Normally the firmware runs in transparent mode, that is it acts as a “bridge” between the USB/BLE interfaces and the ATmega microcontroller. If you then connect the Bluno to your PC and activate the serial monitor, each character you type is forwarded to the ATmega and viceversa.

To send AT commands, first you have to enter the AT mode of the firmware, sending the + character 3 times (without appending a line ending). The firmware confirms the new mode with the sentence “Enter AT Mode”:

bluno-006

Now you can send the commands, appending the Windows line terminator (CRLF). For example to display the firmware version:

bluno-007

To exit the AT mode and go back to transparent mode, you have to send the AT+EXIT command.

Drivers

It may happen that – if it’s the first time you connect the Bluno Beetle to your Windows PC – it is not correctly recognized:

bluno-003

The correct drivers are shipped with the Arduino IDE. You only need to do a manual installation specifying the path where you installed the IDE:

bluno-004

Windows will identify the new device as an Arduino Uno:

bluno-005

Arduino

As explained above, if the firmware running on the CC2540 chip is in transparent mode, using the USB connection you can talk directly to the ATmega328P microcontroller. This means that you can program the microcontroller using the Arduino IDE without any problems… just choose Arduino Uno as board and select the correct serial port:

bluno-008

BLE and transparent mode

In transparent mode Bluno transmits via BLE each byte it receives from Arduino (the ATmega microcontroller) and – viceversa – it sends to Arduino each byte it receives from BLE.

In this first post let’s explore the demo application DFRobot provides; in a future post I’ll explain how to develop your application to interact with Bluno Beetle via BLE.

If you have an Android smartphone, you can directly install the apk file for the application named BlunoBasicDemo (application of which the source code is also available). In the same Github repository you can also find the source code of the iOS application, you have to compile by yourself.

Compile and upload the following sketch on the board:

unsigned long previous_time = 0;
 
void setup() {
  Serial.begin(115200);
}
 
void loop() {
 
  if (Serial.available() > 0) {
    int incomingByte = Serial.read();
    Serial.print("New byte received: 0x");
    Serial.println(incomingByte, HEX);
  }
  unsigned long actual_time = millis();
  if(actual_time - previous_time > 10000) {
    Serial.println("Hello world!");
    previous_time = actual_time;
  }
}

The sketch reads the incoming bytes (coming from the app) and sends back to the app their hexadecimal value. Every 10 seconds moreover the sketch sends to the app the text Hello world!.

Launch the app. After having clicked on the Scan button, you can choose your Bluno board from the list of detected devices:

bluno-009

Every 10 seconds you should see a new HelloWorld! string appear. You can try to send a character (for example the letter “a”); you’ll receive an answer from Arduino (0x61 is indeed the hex code – in the ASCII table – for the letter “a”):

bluno-010

HID mode

Bluno also supports the HID (Human Interface Device) mode. When running in this mode, Bluno simulates an input peripheral (keyboard, mouse…) connected via BLE.

The AT command that enables this mode is:

  • AT+FSM=FSM_HID_USB_COM_BLE_AT

After having enabled the HID mode, you can send one or more “keys” with:

  • AT+KEY=

you can send up to 3 different keys at a time, concatenating their codes with the + character. The codes to be used, according to the type (page) of the HID device, are listed in the USB specification.

The AT+KEY command notifies the pressure of a key on the keyboard.  It is therefore necessary, after a few moments, to send the AT+KEY=0 command to indicate that the key has been released; otherwise on the PC associated with Bluno you’ll see the character appear repeatedly!

Debug mode

Using two different AT commands you can enable the debug mode of the firmware. This mode allows to receive – via the USB connection – a copy of all the data sent and received through the BLE connection.

The two commands are:

  • AT+BLUNODEBUG=ON (copies the messages sent by the ATmega)
  • AT+USBDEBUG=ON (copies the messages received from BLE)

bluno-002

By default the first debug mode is active, while the second is disabled. You can verify it if you upload the sketch listed above: in the serial monitor you’ll see the Hello World! sentences but not the characters sent by the app.

TWANG, an Arduino-based dungeon crawler

20180111_130909-1-600

Bdring built his own Arduino-based 1D dungeon crawler inspired by Robin Baumgarten’s  Line Wobbler:

I have been a Patron of Robin Baumgarten for a while. He makes experimental hardware for games. His Line Wobbler one dimensional dungeon crawler is my favorite and I have always wanted to play it. It uses a door stop spring as the controller. An accelerometer in the knob allows it to work like a joystick and also detect the wobble used to attack the enemies.

More details at Buildlog.net blog.

Yield function, printable class and mapping arrays: Useful but unknown features from Arduino core

test-printable-arduino-1

Yahya Tawil over at Atadiat wrote a new tip for Arduino developers about three hidden and useful features in Arduino core:

Arduino core, the source code of Arduino API functions and classes, has three useful features that can be used effectively. As the Arduino core documentation doesn’t mention them (at least until the time of publishing this micro-blog), these features are not well-known for arduino developers. Let’s discuss each feature of them one by one.

More details at Atadiat blog.

Via the contact form.