Skip to content

FRED Overview

Shaun edited this page Sep 3, 2016 · 2 revisions

Top Level IO

  • clk_24 - Master Clock
  • RST_IN - Master Reset
  • [UVW][HL]_OUT - PWM Signals
  • Resolver to Digital Converter Comms (AD2S1210)
    • SPI Comms (SCLK_OUT, MISO_IN, MOSI_OUT)
    • Control (A_OUT, RES_OUT, SAMPLE_OUT, WR_OUT)
  • I2C (MAX1139, ADP1048)
    • SCL, SDA
  • GPIO
    • brake_out
    • leds_out

IP Blocks

pll - Altera PLL

A Phase Locked Loop that takes in the master clock and generates two sub clocks, a 40 MHz Clock and a 600 kHz Clock. See FRED Clock Tree (ToDo).

virtual_jtag - Altera Virtual JTAG

The Altera Virtual JTAG port is used to communicate with registers inside the FRED block. This is more of a backdoor that's being used on the Development kit. The FRED PCB will still have this interface as a debugging backdoor but register interface will be ported to a higher speed FX2 solution - Chris Mc's awesome FPGA Link. See FRED Register Map (ToDo).

dr_proc - Data from FPGA to CPU

This decodes the incoming instruction register and sets up the requested register on the JTAG DR chain. ASYNC - NEEDS TO BE FIXED

pwm_proc - Data from CPU to FPGA -- Need to rename...

This decodes the incoming instruction register and sets the internal register. ASYNC - NEEDS TO BE FIXED

slow_clk_proc - Generate a 50 kHz Clock

This is a simple process to generate a 50 kHz 'slow' clock. See FRED Clock Tree (ToDo).

pwm_scale - Scale the PWM Signal (Torque Ctrl)

Takes in a torque value (10-bit) and a pwm value (10-bit) and outputs a scaled PWM signal (10-bits). pwm_out = (pwm_uh_in*torque_in)/1024)

speed_pid - First pass at a PID Controller

This is specifically the PID controller for Speed. The block is designed to be implemented in multiple places.

position_error - Absolute Position Tracker

Give a position error for the current position to requested position. This block is also used to track the robot's absolute position. Eventually this block will also track soft and hard limits, and act upon them (ToDo).

i2c_master - I2C Master Library from eewiki.net

I2C bus controller for I2C devices.

torque_ctrl - BangBang (really rough) torque control

Takes in a requested and actual speed, and outputs a 'torque++ or torque--.' Really rough - need to get rid of this.

speed - Speed Calculator

Takes in a changing resolver signal and outputs a speed. Need to fix this up to have useful units. Currently it's in resolver ticks/clock without any filtering...

counter - Free running open-loop position controller - unused?

Generates a 1024 bit bidirectional counter.

closed_loop - Commutation controller

Generate the 10-bit position signal from the resolver's 16-bit current position and saved commutation information.

three_phase_lookup - Lookup for Sign Signals

Generate three phase-10 bit high and low signals from a 10-bit input. Sub block includes Altera ROM.

vh_pwm, vl_pwm, uh_pwm, ul_pwm, wh_pwm, wl_pwm - PWM blocks

This block generates a 10-bit centered PWM signal. Need to include synchronization for each phase - maybe even for each motor to ensue blocks stay phase locked (ToDo).

u_dead_time, v_dead_time, w_dead_time - Dead Time Blocks

This keeps the High Side and Low Side from driving at the same time creating a short circuit and causing the motor driver to shutdown.

resolver - Resolver Reader Block

Generates the SPI block for communicating with the AD2S1210 resolver to digital converter.