KuttyPy

ATMEGA32 Microcontroller Training Utility

Previous Installer 6.2.0

The kuttyPy (/kʊtipʌɪ/) Microcontroller training utility allows real-time manipulation of the registers in microcontrollers via a connected computer containing its python library. setReg and getReg function calls act as a real-time debugging and monitoring utility, and combined with Python's visualization and analytical utilities, this approach has immense pedagogical potential for beginners.

The kuttyPy hardware is an ATMEGA32 microcontroller development board developed by the ExpEYES project, and is currently supported by this software. It contains the kuttyPy firmware, but can also be used to run other programs via its bootloader.

ATMEGA32 training board for beginners

+

Live User Interface with click-and-explore features

Active monitoring and control of each microcontroller pin. No compile+upload required

Direct Register level access, and tweaking tools

Monitoring utilities built into the bootloader

Upload your own compiled C code and use as a serial monitor!

Control Robots!

The interactive UI is used to set the PWM output on various channels of a PCA9685 PWM generator board to control a robotic arm available online for 20 dollars or so.

Test and Measurement tool

+

Use it as a monitoring utility for your projects

8 Channel voltmeter, 0-5000 mV with 10-bit resolution

Analog Gauge Display and data logger!

Differential inputs with up to 200x gain

Control via the Python Library

+
Monitor your Python code’s activity while it executes

Alter registers on-the-fly

+

Select any register for reading/writing

Twiddle bits and observe the hardware's reaction

Set up Read/Write sequences and test response without compile/upload

Check out the ADC read sequence on the write.

In this demo, the ADC is read by first setting the bits in the ADCSRA(control and status register), then reading back ADCL(8LSB)+ADCH(2MSB), and also checking the new status of ADCSRA after the operation.

Harness the power of Python

+

Use the KuttyPy as a data acquisition board

Combine with powerful Python modules for data analysis and visualization

Plot 10-bit ADC values from up to 8 channels with just a few lines of code

In this demo, the ADC is read continuously and values are plotted using matplotlib

Plug and Play a range of I/O accessories

+
A hall sensor is being tested using the ADC. On the right, is a servo motor being controlled via the PWM output.

Plug and Play I2C sensors

+

Acquire data from sensors for luminosity, humidity, acceleration, angular velocity etc. via I2C

Plug and play. No coding required

Automatically scan for connected sensors

View data on analog gauges or the data logger

Control I2C devices such as DACs ( shown in the video )

The MCP4725 12-bit single channel DAC is connected to the I2C port, and its output is connected to the analog input(A0) for reading the actual set value.

Choose standalone mode / Live monitor

+

The KuttyPy monitor code is part of the bootloader.

This allows users to upload their own Hex files without losing the training utility features.

The user can switch back to the monitoring utility in a snap!

This example shows how to skip back and forth to an LED scanning code written in C and uploaded

In the animation, after fiddling a little with the PWM controls on the monitor, the 'user app' button is clicked. This triggers the following -> Within a few ten milliseconds the user uploaded hex file starts executing. The console turns into a serial monitor, and shows any text sent by the user uploaded hex.

More examples for standalone operation

+

Lots of example C code is shipped with the software

From simple codes for blinking LEDs, Reading ADCs, and operating PWM outputs

To stepper motor control, and persistence of vision displays.

A persistence of vision display made with C code! Write text in thin air using 8 LEDs on PORTB.

Installation from pypi (License: MIT)


Windows

py -3 -m pip install kuttypy
kuttypy

Linux

pip3 install kuttypy
kuttypy

Connect the hardware, and import the library. Import will throw an error if the hardware is not detected

from kuttyPy import *
getReg('PINC')
readADC(0)

To view the full list of ATMEGA32 registers

print(REGISTERS.ATMEGA32_REGISTERS)

Installation from source (License: MIT)


  • Install dependencies (Ubuntu 18.04)
sudo apt-get install python3 python3-serial python3-pyqt5 python3-pyqt5.qtsvg
  • Clone the repository, and run the file
git clone https://github.com/csparkresearch/kuttypy-gui
cd kuttypy-gui
python3 KuttyPyGUI.py

KuttyPyPlus : Pick And Place Assembly


Developed by Jithin B.P @CSpark Research, 2018.
Special thanks to Georges Khazanadar for Debianizing efforts.