In this series, USB requests and descriptors have been already discussed. With the knowledge of USB requests, descriptors, transfer types and transactions it is now easy to understand how data is communicated over USB interface. Another aspect of the USB communication is line states and encoding, which is generally ignored by the system designers as a USB device can be designed without knowing the Signaling and Encoding schemes. The signaling and encoding schemes are implemented at the lower levels (usually on the controller IC) and usually gets abstracted during system designing. However, understanding the terms related to bus states and encoding would help in getting comprehensive view of the USB System.
Controller Chip Selection for Developing USB Enabled Device (Part 6/6)
In this series, every possible detail about the USB system including its architecture, protocols, requests and descriptors as well as signaling and encoding has been already discussed. Wrapping up the series, selection of the controller chip for the development of a USB enabled device is discussed here.
Atmega 32u4 Based Generic USB Mouse (Part 1/25)
A Mouse is a common computer peripheral apart from the keyboard. Even the touchpad is not able to dent the popularity of mouse. Nowadays the keyboards, as well as mouse connect through the computers via USB cable or the fancier one connect to the PCs wirelessly through Bluetooth. This project is an attempt to demonstrate the functioning of a generic USB mouse. The 8-bit USB AVR – Atmega 32u4 is used as the USB device controller in the project. In order to avoid complexity, the project uses AVR based Lightweight USB Framework (LUFA) as the firmware.
Atmega 32u4 Based USB Digital Voltmeter (Part 25/25)
In this project, a digital voltmeter will be designed which will show the voltage reading on a desktop application. The device will read analog voltage with respect to the ground, digitize the reading and send the reading to personal computer on USB interface. The device could read four different voltages in range from 0V to 5V.For this, the device will be configured as CDC Class Device. A CDC Class device has USB communication over two types of transfers – Control transfer and Bulk transfer. The control transfer will be used for enumeration of the device. After enumeration, device will use bulk transfers for sending the voltage readings to the computer.
Atmega 32u4 Based USB Controlled Servo Motor (Part 24/25)
In this project, a device will be designed which will allow controlling a servo motor from the desktop computer on USB interface. For controlling a servo motor, PWM output needs to be generated from the microcontroller. The length of the ON time of the PWM signal at the control pin of the servo determines the angle the servo should rotate.The project device receives data from the host computer on USB interface which will determine the ON time of the PWM signal and according a PWM signal will be send out to the control pin of the servo using in-built timer. For this, the device will be configured as HID Class Device again. An HID Class device has USB communication over two types of transfers – Control transfer and Interrupt transfer.
Atmega 32u4 Based USB Data Logger (Part 23/25)
In this project, a device will be designed that will read analog data from any analog sensor and will send the digitized form of that data to a personal computer on USB interface. On PC, a desktop application will store the data in an excel spreadsheet therefore performing the data logging. For this, the device will be configured as HID Class Device again.An HID Class device has USB communication over two types of transfers – Control transfer and Interrupt transfer. The control transfer will be used for enumeration of the device. After enumeration, the analog readings will be digitized and sent to the host computer on a real-time basis using Interrupt Transfer. In this project, Accelerometer Sensor – ADXL335 will be used as analog sensor. Any other analog sensor can also be used and tested with minor modifications in this project.
USB Controlled Atmega 32u4 GPIO Pins (Part 22/25)
In Atmega 32u4 Based USB Controlled LED Series Project, how data is communicated from computer to a generic HID device was seen. Then, in Atmega 32u4 Based LED Status Project, how microcontroller configured as generic HID device can communicate data to the computer was studied. For data transmission from computer to device, control transfer was used while for data transmission from device to computer, interrupt transfer was used.In this project, a generic HID device will be designed that will exchange data with a computer both ways. Primarily, it will receive data packets from the host computer and will use those data packets to control input/output ports of the microcontroller.
Atmega 32u4 Based LED Status (Part 21/25)
In the Atmega 32u4 Based USB Controlled LED Series Project, it was demonstrated how to use control transfer to receive data from computer to the peripheral. In this project, it will be demonstrated to transfer data from microcontroller to the host computer. For this, the device will be configured as HID Class Device again. An HID Class device has USB communication over two types of transfers – Control transfer and Interrupt transfer.When data has to be exchanged from default endpoints i.e. endpoint 0 IN and endpoint 0 OUT only, the control transfer is sufficient to perform the data communication. Usually, HID devices only use control transfer for enumerating with the host.
Atmega 32u4 Based USB Controlled LED Series (Part 20/25)
Throughout this USB series, different types of USB devices have been designed and developed. These devices were enumerating with the host computer and then were using Class Specific transfers for further USB communication. Like the Keyboard, Mouse and joystick devices were using interrupt transfers for their operations after enumeration.Similarly, the audio class devices were using isochronous transfers for their operations after enumeration. The CDC Class devices were using bulk transfers for their operations after enumeration. Any of these transfers (Bulk, Isochronous or Interrupt) are enabled only after the control transfer which let the device get enumerated with the host. These transfers are required when data is also sent from the device to the host computer.
Atmega 32u4 Based USB EEPROM Reader (Part 19/25)
External memories are frequently used to store and carry computer data. The USB flash drives are quite common nowadays. This project is an attempt to demonstrate making of USB storage devices. The project converts an external EEPROM which basically has I2C interface to an USB device. The project actually works like a protocol changer between I2C and USB standards. The external EEPROM used in the project is AT24C512 which has 512 Kb memory space.In this project a desktop application written in Python will be used to write, read and erase data from the EEPROM. The 8-bit USB AVR – Atmega 32u4 will be used as the controller chip on the device to accept control instructions from the host computer according to USB protocol and implement the data control operations on EEPROM through I2C protocol.
Atmega 32u4 Based USB Musical Keyboard (Part 18/25)
The music keyboard is one of the most common musical instruments. The electronic musical keyboards have been around for a long time. The electronic music keyboards synthesize musical sounds electronically according to MIDI (Musical Instrument Digital Interface) standards. Fortunately, the USB protocol does have provision to implement the MIDI standard under Audio Class Devices. The USB protocol has the MIDI subclass under the Audio Class 1.0. In this project, the device designed is based on the MIDI subclass and it transmits the MIDI Data Packets using Audio Class of the USB protocol.On any musical keyboard, there are physical keys pressing which specific musical notes having predetermined pitch and volume are generated. Any electronic music keyboard also works similarly.
Atmega 32u4 Based USB Speaker (Part 17/25)
A speaker is a device that produces sounds from the electrical signal having audio encoded. The speakers usually have a 3.5 mm jack for audio output from the computer. Nowadays USB interface is also gaining popularity for interfacing audio devices with the computer. A lot of portable audio and musical devices nowadays have USB connector for interfacing with the computers.The USB pluggable portable devices are easy to carry away along with a laptop or notebook computer anywhere. Plus, USB is now such a universal interface that it is more common than any other computer interface for serial communication. The USB pluggable devices also have the advantage that they can draw power from the USB port itself. When USB interface is used by an audio device for connecting with the computer, the audio stream coming from the device also needs to be according to the USB protocol.
Atmega 32u4 Based USB Microphone (Part 16/25)
A microphone is a device that senses the sound waves and sends the digitized audio signals to the computer. The commonly used microphones have a 3.5 mm jack for audio input to the computer. Nowadays USB interface is also gaining popularity for interfacing audio devices with the computer. Even a lot of microphones and portable speakers nowadays have USB connector for interfacing with the computers.When USB interface is used by an audio device for connecting with the computer, the audio stream also needs to be sent according to the USB protocol. In this project, a typical audio jack input of a regular microphone is replaced with the USB interface to connect with a computer.
Atmega 32u4 Based Wireless USB Mouse (Part 15/25)
How a generic mouse is made was explained in the Atmega 32u4 Based Generic USB Mouse Project. In this project a wireless mouse will be designed. For making a wireless mouse, there will be two circuits involved in the project – a transmitter circuit which will have a keypad included for getting the user input and a receiver circuit that will connect with the PC through USB port. The two circuits will connect wirelessly using NRF24lO1 module.The NRF module is a Wireless Transceiver that works on 2.4 GHz ISM (Industrial Scientific Medical) band. It is manufactured by Nordic Semiconductors. The transmitter section will have Arduino Mega as the controller board. At the receiver section, the computation will be handled by two controller boards – Arduino UNO and Arduino Pro Micro, each having their own computational roles.
Atmega 32u4 Based Wireless USB Keyboard (Part 14/25)
How a generic keyboard is made has been already explained in the Atmega 32u4 Based Generic USB Keyboard Project. In this project a wireless keyboard will be designed. For making a wireless keyboard, there will be two circuits involved in the project – a transmitter circuit which will have a keypad included for getting the user input and a receiver circuit that will connect with the PC through USB port.The two circuits will connect wirelessly using NRF24lO1 module. The NRF module is a Wireless Transceiver that works on 2.4 GHz ISM (Industrial Scientific Medical) band. It is manufactured by Nordic Semiconductors.The transmitter section will have Arduino Mega as the controller. The Arduino Mega is selected due to a large number of GPIO pins available with board.
Atmega 32u4 Based Virtual Serial Mouse (Part 13/25)
In one of the previous projects – Atmega 32u4 Based Composite Keyboard Mouse Project, a composite device was made. A composite device is a device that has functions of two devices on the same hardware like the composite keyboard mouse was able to operate as generic keyboard as well as generic mouse. In this project, again a composite device – Virtual Serial Mouse is designed. The device works like a mouse as well as an UART to USB converter.The making of a mouse has been already explained in the Atmega 32u4 Based USB Mouse Project. Similarly, making of an UART to USB converter has been explained in Atmega 32u4 Based UART to USB Converter Project. The 8-bit USB AVR – Atmega 32u4 is used as the controller chip in this project. The AVR based Lightweight USB Framework (LUFA) is used as the firmware which is modified and loaded to the Arduino board for making the project.
Atmega 32u4 Based UART to USB Converter (Part 12/25)
UART was a popular serial interface in the past times. Still, a lot of embedded system devices uses UART for serial communication. However nowadays, the personal computers do not have RS-232 ports but have only the USB ports for serial communication. In this project, an UART to USB converter is designed to enable connecting embedded devices having UART interface to the personal computers.The project device works like a virtual serial device. That means that the data packets from the host computer are received according to the USB protocol and data packets from the connecting embedded device are received according to UART protocol but the project device will change the protocol in-between while the PC will be acknowledged that it is connected to a USB peripheral and the connecting embedded device will be acknowledged that it is connected to a computer having UART interface.
Atmega 32u4 Based Gamepad (Part 10/25)
How generic USB keyboard and mouse are built has been already explained in the Atmega 32u4 based Generic USB Keyboard project and Atmega 32u4 Based USB Mouse project respectively. In this project, another common desktop peripheral – the joystick is designed. A joystick is commonly used for gaming on the desktop computers. This project demonstrates the basic functioning of joystick and how a USB pluggable Joystick can be made using the open source LUFA framework with the Arduino platform. The 8-bit USB AVR – Atmega 32u4 is used as the device controller chip in the project. The project uses AVR based Lightweight USB Framework (LUFA) as the firmware which will be modified to make a custom joystick device.
Atmega 32u4 Based Composite Keyboard Mouse (9/25)
How using LUFA and Arduino Pro Micro, Keyboard and mouse can be made has been already demonstrated in the Atmega 32u4 based Generic USB Keyboard project and Atmega 32u4 Based USB Mouse project respectively. In this project a composite keyboard mouse will be designed. A composite device is a device that can perform multiple functions. It means that with the same hardware, the device can work like two different devices. Like in this project, the device using the same hardware function as keyboard as well as mouse. The project utilizes 8-bit USB AVR – Atmega 32u4 as the USB controller chip and uses AVR based Lightweight USB Framework (LUFA) as the firmware which is modified to implement the project.
Atmega 32u4 Based Multimedia Keypad (Part 8/25)
Many keyboards nowadays come with multimedia control functions as well. These functions work with the default multimedia player of the operating system. Like many keyboards have multimedia functions to work with the windows media player of the windows operating system. The control functions are like playing and pausing the multimedia playback, increasing, decreasing or muting the volume, start playing the next track and stopping the playback of media file. In this project a keypad is designed to control the similar multimedia functions.