Author Topic: Advise for circuit, and pcb layout  (Read 3595 times)

0 Members and 1 Guest are viewing this topic.

Offline Jak24Topic starter

  • Full Member
  • ***
  • Posts: 96
  • Helpful? 0
Advise for circuit, and pcb layout
« on: February 16, 2014, 04:44:46 AM »
Hi!

So I am designing a pcb for my robot, and I would greatly appreciate some constructive criticism.
I have attached the eagle schematic and board file.
I use 2 arduino's because I have 2 I2C devices and their address cant be changed for some reason...
and I am using BTN7971B For my motor controller as I will be controlling 4 fairly high power motors
I have attached the circuit which I based the design on for the motor controller, and also I am using a  lm2576 for 5v regulation for which
here is the original circuit: http://www.hobby-hour.com/electronics/lm2576-step-down-switching-regulator.php
basically If you wold have any advise/ tips on the layout/circuit please advise.
It's not finished, things like the pin outs to my sensor, but most of the main circuitry is there.
One thing I am sure I will need to change is all the small capacitors being replaced for a larger one, any suggestions on a
suitable value for those capacitors would be great.
So any advise or suggestions would be much appreciated

Thanks

Offline knossos

  • Robot Overlord
  • ****
  • Posts: 278
  • Helpful? 14
Re: Advise for circuit, and pcb layout
« Reply #1 on: February 16, 2014, 05:54:49 AM »
Have you looked at setting up a second software I2C to avoid having to use a second Arduino?  Take a look at this and this for example.
« Last Edit: February 18, 2014, 05:12:45 PM by knossos »
"Never regret thy fall,
O Icarus of the fearless flight
For the greatest tragedy of them all
Is never to feel the burning light."
 
— Oscar Wilde

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Advise for circuit, and pcb layout
« Reply #2 on: February 16, 2014, 07:57:53 AM »
I do not see de-coupling caps on the atmega or sensors. 100nF caps very close to the Vcc & ground pin of each chip is important.

I do not see any pull-ups on the I2C lines.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Advise for circuit, and pcb layout
« Reply #3 on: February 16, 2014, 01:41:15 PM »
Could you explain how you think the optocouplers help in this case?
How did you choose the value for the pull-up for the opto-coupler outputs?

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Advise for circuit, and pcb layout
« Reply #4 on: February 16, 2014, 01:42:52 PM »
Also, the trace loop around D1 from the inductor sense is very bad for a switching regulator. The switching node to feedback input pin should be as short and straight as possible to avoid parasitic inductance and oscillation.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Advise for circuit, and pcb layout
« Reply #5 on: February 16, 2014, 01:45:25 PM »
And it looks like you're drawing main power from the Arduino voltage pin. That is unlikely to work for any significant amperage.

Offline Jak24Topic starter

  • Full Member
  • ***
  • Posts: 96
  • Helpful? 0
Re: Advise for circuit, and pcb layout
« Reply #6 on: February 17, 2014, 02:01:22 PM »
Hi

Thanks for the replies!
And it looks like you're drawing main power from the Arduino voltage pin. That is unlikely to work for any significant amperage.
I am powering the arduino from the 5 reg circuit (through the 5v and gnd pin), that and every other chip that needs 5v.

Also, the trace loop around D1 from the inductor sense is very bad for a switching regulator. The switching node to feedback input pin should be as short and straight as possible to avoid parasitic inductance and oscillation.


fixed attached a new version
Could you explain how you think the optocouplers help in this case?
How did you choose the value for the pull-up for the opto-coupler outputs?

I didn't choose it, I based my design entirely on a prebuilt btn7971b controller from ebay:
http://www.ebay.com/itm/BTS7971B-BTN7971B-70A-High-power-motor-drive-module-with-Optocoupler-MO03010-D75-/281236241549?pt=LH_DefaultDomain_77&hash=item417afc7c8d
And it's circuit is attached!
I simply chose it because I figured it would work, and since I am still an amateur in electronics I would not want to mess with it.
I do not see de-coupling caps on the atmega or sensors. 100nF caps very close to the Vcc & ground pin of each chip is important.

I do not see any pull-ups on the I2C lines.

So I should just put a 100nf 15V cap on the power for each sensor/ Mcu?
Pull-ups I believe are on the sensor, otherwise should I add 2 x 2.2 k resistors?

Thanks

Offline Jak24Topic starter

  • Full Member
  • ***
  • Posts: 96
  • Helpful? 0
Re: Advise for circuit, and pcb layout
« Reply #7 on: February 22, 2014, 02:18:45 PM »
Just bumping this thread, perhaps someone has further advise to give, also it recently dawned on me that I
have not accounted that I could accidentally turn both PWM inputs on the h-bridges to high.
If someone could advise some sort of circuitry with which this can be solved, It would be greatly appreciated.
Also
I do not see de-coupling caps on the atmega or sensors. 100nF caps very close to the Vcc & ground pin of each chip is important.

I do not see any pull-ups on the I2C lines.

So 1 100nf cap for each sensor and mcu?
Thanks

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Advise for circuit, and pcb layout
« Reply #8 on: February 22, 2014, 06:33:00 PM »
Here is a schematic for an H-bridge with logic to prevent any accidental 'smoke states'.
The OUT A and OUT B from the logic in the lower left connect to the INPUT A and INPUT B to the transistors.
« Last Edit: February 22, 2014, 06:37:27 PM by waltr »

Offline Jak24Topic starter

  • Full Member
  • ***
  • Posts: 96
  • Helpful? 0
Re: Advise for circuit, and pcb layout
« Reply #9 on: February 23, 2014, 02:05:14 PM »
Here is a schematic for an H-bridge with logic to prevent any accidental 'smoke states'.
The OUT A and OUT B from the logic in the lower left connect to the INPUT A and INPUT B to the transistors.
added what you mentioned to the circuit, new schematic attached.
Is it an issue if its a pwm signal and not a digital out?
Lastly could you perhaps link where you got that circuit you attached?
Thanks

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Advise for circuit, and pcb layout
« Reply #10 on: February 23, 2014, 05:20:16 PM »
I designed that circuit from scratch.
Study the truth table and work out the logic on paper to see how it works.
The circuit has two inputs, a direction and a PWM for speed (PWM is a digital signal).

I just saw that the resolution is pretty bad so the signal names are:
On the two inputs in the bottom left corner:
top input is: ENABLE which is what the PWM speed control signal goes to. A logic low turns the H-Bridge OFF.
Bottom inputs is: PHASE which controls the motor direction.

The top output of the logic is: OUT_A and the bottom output is OUT_B.
OUT_A feeds the left side of the H-bridge (INPUT A) into R1. OUT_B feeds the right side of the H-bridge (INPUT B) into R2.
« Last Edit: February 23, 2014, 05:27:04 PM by waltr »

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,345
  • Helpful? 82
Re: Advise for circuit, and pcb layout
« Reply #11 on: February 24, 2014, 11:28:50 AM »
An alternative is to use a half-bridge driver with cross-conduction prevention. As a bonus, it will drive N-channel MOSFETs even on the high side.
I like the IR2183, for example.

 


Get Your Ad Here

data_list