Measuring Different Duty Cycles and Engaging Corresponding States

A project log for RC Car Attiny 85

My attempt at making a rudimentary RC car with a couple of attiny-85 and some 433Mhz Modules.

Alvi AhmedAlvi Ahmed 02/23/2019 at 08:400 Comments

Here I programed the receiving attiny85 to sample the incoming pwm signal when it was high. When the signal becomes high, a ctc counter starts and counts the amount of the time the signal has been high for, thus giving our duty cycle.

With this, at specific duty cycles, a certain state will turn on. With 4 different duty cycles that could be make from the transmitter attiny85, there were 4 different states that could be turned on from the receiver side.

Here is as demo of it: 

Since the state machine was working, that means the duty cycle measuring technique works, so for now on will use this method of signal encoding.