Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

FPGA/ Communicating with H-Bridge

Status
Not open for further replies.

Ham23

Newbie level 4
Joined
Feb 13, 2022
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
34
I was wondering how to proceed with using the H-bridge to control the Motor. I have an FPGA Board (Intel Cyclone V De0-Nano-SoC), I have generated a PWM Signal, and a SPI interface. Created a Top model but unfortunately can’t still get it to communicate with the H-bridge. It works fine with the aurdnio but no luck here.


[ UPLOAD SCHEMATIC FROM EXTERNAL WEBPAGE ]
 

Attachments

  • multimoto-v1_6_schematic.pdf
    98.5 KB · Views: 151
Last edited by a moderator:

Hi all,


I have a Cyclone V De0-Nano-SoC board and a multi motor h-bridge that works fine with an Arduino, but doesn't want to communicate with the fpga. I want to start out by controlling one DC motor and then increase it to 4. At the moment, I have 2 sub-modules (one that generates a PWM signal and one that is an SPI interface to communicate with the H-bridge). Then I have a top-module that calls both the PWM and SPI sub modules. Once I select my pins and plug in the DC motor, nothing really happens.

Any help is greatly appreciated.

Here is the Google drive link to the code files: [ UPLOAD PROJECT FILES FROM FILE SHARING SERVICE ]

Link for the H-Bridge in use: https://www.robotshop.com/ca/en/multimoto-4-channel-h-bridge-speed-controller-arduino.html
 

Attachments

  • FPGA-LEO-20220322T180825Z-001.zip
    20.3 KB · Views: 110
Last edited by a moderator:

Well, I'm not going to read all your code.

But, have you done a simulation? Have you looked at signals with a scope?
 

Hi,

but doesn't want to communicate with the fpga
An SPI Interface is a synchronous Interface. Thus there is no option for the slave to 'not want to communicate'.
Please give a detailed error description.

Klaus
 

Unclear points so far:
- How did you wire the FPGA to the motor controller board? Did you actually connect all necessary signal to run a motor?
- Which SPI commands do you want to send to the controller, how do you start a SPI transmission?
 

Hi,


An SPI Interface is a synchronous Interface. Thus there is no option for the slave to 'not want to communicate'.
Please give a detailed error description.

Klaus
Agreed. I should have said that the pwm signal sent to the H-bridge seems not be getting there. I double checked the manual and the pin assignments for the board look to be right. I am also sending an enable signal to enable the H-bridge (which should light up the LED on the H-bridge) but this doesn't seem to work either. So I guess my error is getting the H-bridge working
 

Unclear points so far:
- How did you wire the FPGA to the motor controller board? Did you actually connect all necessary signal to run a motor?
- Which SPI commands do you want to send to the controller, how do you start a SPI transmission?
The H-bridge sits on the Arudino header of the board. I followed the pin assignment from the manual so i dont think thats the issue. I want to send the PWM signal to the H-bridge. I use an enable signal to enable the H-bridge through SPI transmission (maybe that could be the issue). I haven't dealt with hardware with too much depth so I'm not too sure
 

Well, I'm not going to read all your code.

But, have you done a simulation? Have you looked at signals with a scope?
I have, they seem to be running as intended. Created a tb and run that.
 

So, your simulation looks correct. Your input signals measured with a scope look correct. The only other possibilities are a defective chip, or shorted outputs.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top