Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

alternative controller and firmware for a cheap rc

branch: master
Octocat-spinner-32 .gitignore prepare git repository April 06, 2012
Octocat-spinner-32 Makefile add LCD config menu July 27, 2012
Octocat-spinner-32 README add documentation September 20, 2012
Octocat-spinner-32 acc.c omit scaling of ACC data July 27, 2012
Octocat-spinner-32 acc.h add accelerometer sensor (ACC) code July 27, 2012
Octocat-spinner-32 initial commit April 20, 2012
Octocat-spinner-32 channels.c remove useless ; from code July 29, 2012
Octocat-spinner-32 config.h add LCD config menu July 27, 2012
Octocat-spinner-32 datenschlag.c introduce config.h and rework ds aux switch code June 15, 2012
Octocat-spinner-32 datenschlag.h add fuction to query the queue presence of a cmd June 13, 2012
Octocat-spinner-32 datenschlag_structs.h make Datenschlag frame size variable June 03, 2012
Octocat-spinner-32 funkenschlag.c improve voltage checking (prevent jitter) September 20, 2012
Octocat-spinner-32 input.c typedef isrc_t for input devices July 15, 2012
Octocat-spinner-32 input.h add typedef guard July 15, 2012
Octocat-spinner-32 lcd.c add delay after each LCD clear cmd September 20, 2012
Octocat-spinner-32 lcd.h add LCD clock icon to MAG calibration July 27, 2012
Octocat-spinner-32 lcd_menu.c change LCD menu title September 20, 2012
Octocat-spinner-32 lcd_menu.h add LCD config menu July 27, 2012
Octocat-spinner-32 lcd_status.c optimize switch display September 20, 2012
Octocat-spinner-32 lcd_status.h add LCD config menu July 27, 2012
Octocat-spinner-32 mag.c add MAG center calibration to LCD menu system July 27, 2012
Octocat-spinner-32 mag.h add MAG center calibration to LCD menu system July 27, 2012
Octocat-spinner-32 serial.c remove useless ; from code July 29, 2012
Octocat-spinner-32 serial.h fix declaration of serial_write_str() July 15, 2012
Octocat-spinner-32 src_adc.c apply ADC scale/trim to raw values July 15, 2012
Octocat-spinner-32 src_adc.h read Datenschlag gimbal angle from ADC input June 16, 2012
Octocat-spinner-32 src_ds.c make mag_heading signed to indicate errors July 27, 2012
Octocat-spinner-32 src_ds.h move Datenschlag preparation to own file June 15, 2012
Octocat-spinner-32 src_nunchuk.c add <math.h> include July 15, 2012
Octocat-spinner-32 src_nunchuk.h move definition of NC input range to src_nunchuk.c July 02, 2012
Octocat-spinner-32 src_sw.c deduce number of channels and inputs from source[] June 16, 2012
Octocat-spinner-32 src_sw.h move switch sources to own unit June 15, 2012
Octocat-spinner-32 src_twi_adc.c make compilation of TWI ADC conditional July 02, 2012
Octocat-spinner-32 src_twi_adc.h add support for external TWI ADC June 22, 2012
Octocat-spinner-32 twi.c make twi_wait() handle errors/timeouts September 20, 2012
Octocat-spinner-32 twi.h add twi_write_reg function June 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].

Something went wrong with that request. Please try again.