Digital Signal Processing Reference
In-Depth Information
WHEN '0' =>
lmotor <= '1';
-- REVERSE
WHEN '1' =>
lmotor <= '0';
WHEN OTHERS => NULL ;
END CASE ;
ELSE
lmotor <= '0';
END IF ;
IF rmotor_speed /= '0' THEN
CASE rmotor_dir IS
-- FORWARD
WHEN '1' =>
rmotor <= '1';
-- REVERSE
WHEN '0' =>
rmotor <= '0';
WHEN OTHERS => NULL ;
END CASE ;
ELSE
rmotor <= '0';
END IF ;
ELSE
lmotor <= '0';
rmotor <= '0';
END IF ;
END PROCESS ;
END a;
13.5 Low-cost Sensors for an FPGA Robot Project
A wide variety a sensors can be attached to the FPGA board. A few of the more
interesting sensors are described here. These include infrared modules to avoid
objects, track lines, and support communication between FPGA-bots. Other
modules include sonar and IR to measure the distance to the nearest object and
a digital compass to determine the orientation of the FPGA-bot. Most robots
will need to combine or “fuse” data from several types of sensors to provide
more reliable operation.
Signal conditioning circuits are required in many cases to convert the signals to
digital logic levels for interfacing to the digital inputs and outputs on the FPGA
board. Analog sensors will require an analog-to-digital converter IC to interface
to the FPGA board, so these devices pose a more challenging problem. Small
low-cost A/D ICs are available with SPI interfaces that require a minimal
number of FPGA pins.
Sensor module kits are available and are the easiest to use since they come with
a small printed circuit board to connect the parts. Sensors can also be built
using component parts and assembled on a small protoboard attached to the
FPGA-bot. Sensor modules are interfaced by connecting jumper wires to digital
inputs and outputs on the FPGA board's J3 and J2 expansion header connector.
Search WWH ::




Custom Search