Tag Archives: 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


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


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


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


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


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


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]

Staff with Click Sound and Obstacle Alarm

People who are visually impaired usually use a staff to guide them as they walk. They tap with their staff to know if an obstacle is present around. Others use the echolocation technique. They produce a clicking sound through their tongue, foot, and fingers and through this they detect objects from their surrounding by sensing the echoes produced.

The design above is a simple project that aims to assist visually impaired persons by having a staff that produces a beep/click sound that they can use for echolocation and also has an ultrasonic sensor that alerts the user if there is an obstacle ahead. Inside the handle of the staff, the control circuit is located. Below it, the speaker is positioned facing front to release in a forward direction the beep/click sounds for the user to sense what is ahead. The speaker is connected to PWM pin of the microcontroller to produce sound. An ultrasonic sensor is located at the base of the staff. It is connected to an interrupt pin of the microcontroller. The continuous beep/click sound is replaced by an alarm sound when the sensor detects an obstacle. With this, additional aid is provided to the user especially to those who are not trained to be capable of echolocation. The base circuit and the control circuit in the handle are connected through the use of 179840-1 and 177900-4 Power Double Lock from TE Connectivity. These are headers and crimp housing connectors that provides durability to the design. The feature locking capability that secures the mating of the circuits connected together.

The design is operated with a +5V battery and has a switch to ON/OFF the circuit. The project is programmed to detect objects half meter and below. Beyond this range, the design will not alarm for the user to have a lesser restriction in moving. With this design, visually impaired users don’t have to tap their staff hard, which could hit someone or something.

Staff with Click Sound and Obstacle Alarm – [Link]

ATMEGA328 Component Tester


baweja_akshay @ instructables.com has build a ATMEGA328 component tester that is able to test Resistors, Capacitors, Inductors, BJT, FET, Thyristors and more.

Coming upon COMPONENT TESTER so it can test almost everything, obviously not the power components because they require more current and power which our AVR Microcontroller couldn’t handle !! Oh yeah, I forgot to tell you guys that we would be using an ATMEGA328 for our build !!

ATMEGA328 Component Tester – [Link]