Here I built a circuit and software that controls two servo motors based on user movement.
Basically: the white circuit board has an accelerometer that detects its orientation. It sends the signal to the FPGA circuit (green board) that then interprets this data and sends the appropriate signal to move the motors.
In detail: the accelerometer creates a 0-5 volt signal relative to its orientation. A programmable integrated circuit (PIC) microcontroller then converts the analog signal into an 8 bit digital signal. The PIC was programmed in C++. Then, I use 8 wires to transmit the 8 bit signal in parallel to the Field Programmable Gate Array (FPGA) board. The PIC has an 8 MHz clock and the FPGA has a 50 MHz clock, so I use a 9th wire from the PIC to FPGA as a "ready bit" to indicate that the 8 bit value has settle and is now read to be read by the FPGA. At this point, the FPGA stores this 8 bit value in a register and converts it to a Pulse Width Modulation (PWM) signal that the servo motors can "understand." The motors are then passed the PWM signal and will move to the corresponding orientation.
For my schematic design and software code, visit:
http://www.pierresleiman.com/Pierre_Sleiman/PWM.html
Link to this comment:
All Comments (0)