Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

The fly using 16F877 and 2 x TC4427

The fly using 16F877 and 2 x TC4427

This is an observation to see how easy or difficult it is to emulate the behavior of a fly. Since it is technically a bit complicated to built a flying robot we will make it drive around instead.
Let’s start by building the proper electronics. The schematics feature:

A 16F877 as microprocessor as brain Two TC4427A mosfet driver to handle the power requirements of the 9 volts Lego motors A UA7805 voltage stabilizer so the whole circuit is powered by a Lego 9 volts battery box A 1N4007 diode in the ground line to prevent negative power spikes caused by the motor to reach the 5V part of the circuit A 0.1 uF capacitor across the motor to eliminate interference with the RS232 connection to the PC A 470 uF capacitor across the 9 volts power rail to reduce startup and stop power spikes Two LED’s as eyes A ‘human detector’ as aluminum foil proximity detector And of course an RS232 connection to the PC for debugging purposes Apart from that it’s rather straight forward:

In this robot example the food never runs out, so the robot would simply stumble upon the food and then stay there forever. So after hanging about for 100 turn we pretend the food is no longer there (TOUCH = 0) and exit the food loop. In the ideal robot with the ideal sensor chances are the robot would immediately see the food again, but every once in a while it’s an advantage when something doesn’t quite work as it should, and this happens to be one of those moments.

Meanwhile flies are attracted by light (or is that only mosquitoes?), so we need the option to move towards the light. Since the Lego electrical connectors can be mounted in different ways you need to check this routine ‘stand alone’ so to speak to see if it is searching light or avoiding it.

Visit Here for more.







 

More Articles to Read

Smart "Homer"
Smart "Homer"
A DIY Segway-style vehicle
A DIY Segway-style vehicle
Superbeta transistors inside: Die photos and analysis of the LM108 op amp
Superbeta transistors inside: Die photos and analysis of the LM108 op amp
Peeqo is a desktop bot that communicates through GIFs
Peeqo is a desktop bot that communicates through GIFs
Using a Programmable Input Multiplier to Minimize Integer Boundary Spurs
Using a Programmable Input Multiplier to Minimize Integer Boundary Spurs
Serial seven segment LED display shield
Serial seven segment LED display shield
G-code controlled drawing plotter
G-code controlled drawing plotter
An Arduino round word clock
An Arduino round word clock
The Sandwich-o-Matic will make your lunch automatically
The Sandwich-o-Matic will make your lunch automatically
Scalar Network Analyser Jr
Scalar Network Analyser Jr

Top


Shares