alternative controller and firmware for a cheap rc
C Objective-C
Latest commit 30c2960 Jul 29, 2012 @wertarbyte change LCD menu title
Failed to load latest commit information.
.gitignore prepare git repository Apr 6, 2012
Makefile add LCD config menu Jul 26, 2012
README add documentation Sep 20, 2012
acc.c omit scaling of ACC data Jul 26, 2012
acc.h add accelerometer sensor (ACC) code Jul 26, 2012 initial commit Apr 20, 2012
channels.c remove useless ; from code Jul 29, 2012
config.h add LCD config menu Jul 26, 2012
datenschlag.c introduce config.h and rework ds aux switch code Jun 15, 2012
datenschlag.h add fuction to query the queue presence of a cmd Jun 12, 2012
datenschlag_structs.h make Datenschlag frame size variable Jun 2, 2012
funkenschlag.c improve voltage checking (prevent jitter) Sep 20, 2012
input.c typedef isrc_t for input devices Jul 15, 2012
input.h add typedef guard Jul 15, 2012
lcd.c add delay after each LCD clear cmd Sep 20, 2012
lcd.h add LCD clock icon to MAG calibration Jul 27, 2012
lcd_menu.c change LCD menu title Sep 20, 2012
lcd_menu.h add LCD config menu Jul 26, 2012
lcd_status.c optimize switch display Sep 20, 2012
lcd_status.h add LCD config menu Jul 26, 2012
mag.c add MAG center calibration to LCD menu system Jul 26, 2012
mag.h add MAG center calibration to LCD menu system Jul 26, 2012
serial.c remove useless ; from code Jul 29, 2012
serial.h fix declaration of serial_write_str() Jul 15, 2012
src_adc.c apply ADC scale/trim to raw values Jul 15, 2012
src_adc.h read Datenschlag gimbal angle from ADC input Jun 16, 2012
src_ds.c make mag_heading signed to indicate errors Jul 26, 2012
src_ds.h move Datenschlag preparation to own file Jun 15, 2012
src_nunchuk.c add <math.h> include Jul 15, 2012
src_nunchuk.h move definition of NC input range to src_nunchuk.c Jul 2, 2012
src_sw.c deduce number of channels and inputs from source[] Jun 16, 2012
src_sw.h move switch sources to own unit Jun 15, 2012
src_twi_adc.c make compilation of TWI ADC conditional Jul 2, 2012
src_twi_adc.h add support for external TWI ADC Jun 22, 2012
twi.c make twi_wait() handle errors/timeouts Sep 20, 2012
twi.h add twi_write_reg function Jun 30, 2012


=== Funkenschlag ===
the process of generating a spark, lit. "spark punch"

Stefan Tomanek <>

== What is Funkenschlag?

Funkenschlag is a simple firmware for use in RC model transmitters.  It uses an
ATMega microcontroller to query the controls present in such devices and
generate the PPM signal fed to the radio transmitter module.

== What is required to use Funkenschlag?

An ATMega microcontroller (e.g. ATMega8, ATMega168 or ATMega328) is required to
run the program itself; any radio module processing PPM input should be suitable
to transmit the signal generated by the controller.
Funkenschlag supports analog control sticks as well as digital switches and a few
other control devices you can build your TX from.

== What was the intention of developing Funkenschlag?

I wrote the firmware to replace the puny electronics present in my cheap 6ch
TX[1]. While the device itself was advertised as being able to process 6
channels, the transmitter module is capable of transmitting at least 8 channls
if such a signal is fed to it. I also added several other inputs and sensors to
the TX as well as implemented a serial data link nicknamed "Datenschlag".

== What is "Datenschlag"?

Datenschlag ("data punch") is a serial protocol that utilizes one servo channel
to encode and transmit arbitrary binary data. This data stream can contain
information about switch positions, magnetic bearing of the TX, additional
servo commands for camera positioning or any other instruction for the vehicle.
The receiver has to decode this data stream to obtain the instruction. My fork
of the popular multirotor project Multiwii[2] contains such code so that e.g.
up to 8 AUX switches can be operated without the need for additional servo

== What other hardware can be put into the transmitter?

My transmitter employs a PCF8591 I²C ADC chip to query additional analog
inputs as well as an HMC5883 magnetometer to constantly measure the bearing of
TX and pilot; this bearing can then be transmitted to the quadcopter (using
Datenschlag) to adjust control commands if in HEADFREE mode. For reliable
compass measurements, an accelerometer is needed to provide tilt compensation.
The TX status can be displayed on an alphanumeric I²C display; support for
connecting a Wii nunchuk is also present, making it possible to control the
system using the accelerometer and/or joystick.

== Is it free?

Yes, the entire source code is licenced under the conditions of the GPLv3.

== So what hardware is supported right now?

  * ATMega8
  * ATMega168/ATMega328

External ADC (needed if more than 4 analog inputs and TWI are to be used):
  * PCF8591 (I²C)

  * ST7032 alphanumeric 8x2 I²C display

  * HMMC5883 (I²C)

  * ADXL345 (I²C)

Additional input devices:
  * Wii Nunchuk Accelerometer and joystick (I²C)

== Is there a schematic?

Sure, see the link[1].