Tag Archives: ATmega328

Using an ATmega328 without a crystal

Here is another guide from David Johnson-Davies @ technoblogy.com explaining how to program an ATmega328 on a breadboard using the Arduino IDE. The guide is focused on how to use the internal clock of the microcontroller and how to achieve this using the Arduino environment. By default Arduino IDE doesn’t include a Boards option for an ATmega328 without an external crystal, so here is how to add this support.

Proto Board Power Supply

David Johnson-Davies @ technoblogy.com build a breadboard friendly power supply to power your Arduino or other low power electronics. The power supply is able to deliver 0V to 5.5V at up to 0.5A and it’s powered from two Li-Ion rechargeable batteries. The output can be adjusted using a rotary encoder, and the voltage is displayed on a three-digit 7-segment display. The whole circuit is controlled by an ATmega328.

RandA, Combining Raspberry Pi & Arduino

Two years ago, open electronics had produced “RandA“, an Atmega328-based board for Raspberry Pi to deliver the advantages of both, Raspberry Pi and Arduino. Earlier this month, an updated version of RandA has been released to be compatible with Raspberry Pi 3.

RandA is a development board that leverages the hardware equipment and the computing power of Arduino with its shields, and the enormous potential of the Raspberry Pi. It features Atmega328 microcontroller, has RTC (Real Time Clock) module, power button and sleep timer, connectors for 5 volts and connectors for mounting Arduino shield.

Combining these two platforms is a way to exploit specific characteristics of both. Raspberry Pi could use Arduino as configurable device, and Arduino might work as a controller for Raspberry Pi allowing access to complex environments like the network, allowing complex processing or access to multimedia.

RandA was created at first for Raspberry Pi 2 and B+, using the first 20 pins to connect them, the serial port for programming the Atmega328 and for communication with Raspberry Pi. With the enhancements that come with the third version of Raspberry Pi, such as upgrading CPU to a quad-core 64 bit ARMv8 clocked at 1.2 GHz and adding WiFi and Bluetooth transceivers, there were some structure modifications that require updating the RandA.

Raspberry Pi 3 uses the standard UART0 serial port for connection via the Bluetooth interface equipping version 3. Therefore, it is no longer available on GPIO14/15 as it was in the first and second version of Raspberry Pi. The secondary UART1 serial is configured on those pins instead, but this serial port is based on a simulated serial not on a preset UART hardware. In particular, its clock is connected to the frequency of the clock of the system which varies in function of the load in order to save energy.

To solve this, the software is configured to recover the UART0 on GPIO 14/15 pins without modifying any hardware parts. This way will disable the Bluetooth peripheral, but the WiFi is still working and you can use Bluetooth by connecting a Bluetooth dongle via USB.

To know more about the new version of RandA you can review this post, and reading this post to learn more about RandA in general. You can get your RandA board for about $36 and this tutorial will help you get starting with it.

Scout ESC, A New Tank Controller Board By Open Panzer

Open Panzer Project is an attempt to create open source versions of all electronics used in RC tanks today, with professional quality and features. The goal of this project is to expand the hoppy and to improve everyone’s experience of RC tanking corner, which will speed-up its growing.

Open Panzer recently developed the Scout ESC board, a dual brushed-motor speed controller that accepts both standard RC inputs or logic-level serial commands. It features an ATmega328 that can be programmed with the Arduino IDE through standard FTDI cable.

The Scout ESC operates at ultrasonic frequencies, at voltages up to 16 volts, and is rated at 10 amps continuous per channel, but the addition of a fan can increase the current capacity. The Scout has its own onboard fan controller that can drive any standard 12 volt 2-pin PC case fan. An onboard thermistor also allows the processor to monitor the board temperature.

The Scout is 65mm x 47mm board that is perfect for controlling even the heaviest 1/16th scale RC tanks. It is compatible with the Open Panzer Tank Control Board, so no additional setup is required.

Scout ESC specification:

  • Input voltage: 6 – 16 volts
  • Operating current:
    • 10 amps per channel continuous without fan
    • 20 amps peak
  • Motor PWM: 21 kHz
  • RC Inputs: Standard 1000-2000 uS pulse width (1500 uS = motor stopped)
  • Serial Input: 38400 baud; 8 data bits, no parity, one stop bit; TTL level (5v max)
  • Dimensions (L x W): 2.6″ x 1.9″ / 65mm x 47mm
  • Mounting holes: 1.57″ / 40mm (use 4-40 or 3mm screws)

As it is an open source project, you can get Scout board files, schematics, and bill of materials from the website, and the firmware and libraries from the github repository. The Open Panzer wiki has more information about the project, and the Open Panzer Community is open for everyone for discussion.

4-20 mA current output for Arduino Uno

prototipo-600

Giovanni Carrera writes:

The purpose of this project is to provide a 4-20 mA output from a PWM signal generated by a microcontroller ATmega328 and numerous other chips, such as the PIC. One of the more interesting applications of this circuit would be to replace or to realize a smart sensor with Arduino.”

4-20 mA current output for Arduino Uno – [Link]

Tiny Lisp Computer using ATmega328

tinylispcomputer

The Tiny Lisp Computer is a self-contained computer programmed in Lisp. Some programming examples are included in the author’s website.

This article describes a self-contained computer with its own display and keyboard, based on an ATmega328, that you can program in Lisp. You can use it to run programs that interface to components such as LEDs and push-buttons via the I/O pins, read the analogue inputs, and operate external devices via the I2C and SPI interfaces. It has a small monochrome OLED display that gives 8 lines of 21 characters per line, and a miniature PS/2 keyboard

Tiny Lisp Computer using ATmega328 – [Link]

Simple & Cheap Arduino Uno ATmega328 Programmer

FAP6GHBIQK3Q7JK.MEDIUM

Here’s how to build a simple & cheap Arduino Uno ATmega328 Programmer by

Simple & Cheap Arduino Uno ATmega328 Programmer – [Link]

$2 Arduino – ATMEGA328 as a stand-alone

FA4529XIMDZATMV.MEDIUM

In this tutorial you will learn how to use ATMEGA328 microcontroller as standalone Arduino. This way you can minify your next arduino project.

They cost only 2 bucks, can do the same as your Arduino and make your projects extremely small.

We will cover the pin layout, how to make it ready for the Arduino software by burning a bootloader and how to upload sketches.

$2 Arduino – ATMEGA328 as a stand-alone – [Link]

ATMEGA328 based Weather Station

IMG_1715-904x602

Vlad @ denialmedia.ca has build a solar powered weather station based on ATMega328 microcontroller that is able to measure temperature, a humidity, and UV radiation and it uploads measurement on WeatherUnderground network. The data are send to the air using a 433MHz link. The sensors used are DHT22, ML8511, BMP180 and a TP4056 charger IC is used to charge the Li-Po battery from a solar cell.

ATMEGA328 based Weather Station – [Link]

MAX038 Function generator

FR9WEPTIKLFROJ1.MEDIUM

Milen @ instructables.com has designed a Function Generator based on the popular MAX038 and is controlled by ATMega328PU. Signal characteristics are displayed on a LCD screen.

The digital features of the function generator were performed by one Atmega328 chip. Its functions are the following:
controls the frequency range selection
controls the signal type (sine, rectangular, triangular, sawtooth)
measures the amplitude of the signal
measures the DC offset
measures the frequency of the signal
measures the THD of the sine signal in the audio range (this still have to be implemented)
displays all this information on a character 16×2 LCD display.

MAX038 Function generator – [Link]