h-bridge to

Hello,

I have a Vex kit, and I am using its sensors and structure to build my robot.
For the “brain” I am not using the Pic18 that I got with the kit, I am using FPGA DE2 board from Altera.
Does the 3 wire motor I got in the kit have an H-bridge build in?
If I want to use a different controller then the Pic I will need to add an H-bridge.
Does it matter what kind, who can I design H-bridge for vex motor?

Thanks in advance

Yes, the 3-Wire motors do have an internal speed controller. It’s like an H-bridge, but with some external circuitry. Instead of having two digital outputs feeding to the H-bridge, you can control the motor’s direction and speed using a single wire. You send PWM signals from a PWM output on your board. Sending pulses 1 milleseconds apart will cause the motor to spin in one direction, while sending pulses 2 milleseconds apart will cause it to spin in the opposite. Sending them 1.5 milleseconds apart will cause the motor to stop spinning - neutral.

So, no, you do not need add an external H-bridge. The PWM wire (wire you send signals to) is the white wire. The red and black are the power wires, and you can supply anywhere from 4.4 to 9.1 volts. If I recall correctly, the datasheet used to say up to somewhere around 15 volts. Overvolting you motors will decrease the life of them, however. So unless you really need that extra horsepower, I would suggest that you feed it no more than the 9.1 that the datasheet tells.

Yes, the 3-wire motors and servos have internal H-bridges to drive them. Your controller must generate TTL-level timed pulses on the white wire to control motor speed and direction.

The pulse should be generate about 60 times per second, and the width of the pulse determines the motor’s direction and speed. If the pulse is 1ms, then the motor runs full speed one direction. The motor stops if the pulse is 1.5ms. 2ms makes the motor run full speed the other direction. Pulse widths in-between these values provide proportional speeds.

The 2-wire Vex motors do not have internal H bridges, so you would make use of a Motor Controller 29, which basically makes a 2-wire motor behave exactly like a 3-wire motor.

Cheers,

  • Dean

thanks for the replay really helpful,

I design my robot like a forklift (without the lift :))
Meaning three wheels while two stationary wheels are in the front and the third wheel in the back is responsible for speed and direction of the robot.

Do you think it will be able to move with a DE2 board, 9[v] batteries and sensors on it or will I need to add engines to the front as well?
PC250015.jpg

I don’t think you’ve provided quite enough information for us to give you a useful answer. For those that don’t know what a DE2 Board is, the user manual can be found here.

9V is a reasonable voltage to run Vex motors, but the size of the battery matters. A 9V transistor battery cannot provide enough current to run your robot. A 9V 2000mAh NiMH or NiCd battery pack would probably be fine (though at full charge would be a bit high for the motors).

How do you plan to wire the motors to the DE2 board? You could wire it such that the motors and the DE2 board have separate batteries.

Your photo shows Vex motors attached to all three wheels, so I’m not sure what you mean by “add engines to the front as well”. It doesn’t look like a particularly heavy robot, so I think it should have enough power as it is built (assuming a suitably sized battery is used).

Cheers,

  • Dean

I am using a 2900mAh Ni-MH rechargeable battery 1.2[v]

What did you meant when you said “a bit high for the motors”.

Second I connected the motor to the de2 board and got strange results .
At first it seems fine but after I changed the motor directions it went on and off for unpredictable times and after that he stoped reacting
for indication I created a I made the leds on the board to run indifferent direction for each pulse length (1ms running right 2ms running left 1.5ms stops) so I know the code is working

quazar said

.

That’s 60 Hz meaning about 17 ms that’s the clock period I set and my duty cycle is changing according to the motor pulse width needs which determined be switches states from 0-7 for manually changing the duty cycle .

If it will help I will send the code but I don’t think it’s the problem
Something about the motor control that is not reacting as it spouse to.
When I checked the motor with the pic and robotc software it did almost the same thing and then the motor started to make noises - like it changing the direction of the motor all the time

any ideas/thoughts ?
thanks in advance

I notice in another post a solutionto connect the arduino ground to the power supply ground… is it safe to connect the de2 ground the a power supply ground
and why this is a solution at all?

This may be required and will probably be safe. The details depend on exactly how the boards are wired together with the power source.

You can think of the signals going between these boards as numbers on a number-line. The ground wire provides a common reference for the zero point on the number lines for both boards. This way, if one board sends 5V, the other board will see 5V relative to the common ground. Without some sort of common reference, there is no way for the boards to communicate.

It can become unsafe if the boards have a common reference that isn’t grounded on both boards (somewhat common with complex power supply configurations). This can cause an out-of-spec voltage to flow into one of the boards causing damage. If you have such a situation, the usual fix is to use an opto-isolator which allows a connection between two boards without a common ground.

I suspect it will be safe for you to wire ground between the DE2 and the Arduino. If you are powering them both from the same battery, they probably already share a common ground via the battery’s negative connection.

Cheers,

  • Dean

Hi again

I have another question about the batteries and I hope you could help
If you remember

so if I’ll take 6 battery that a 7.2 volts and I have two of every thing (encoder, motor, line tracker and sonic) and in addition to the altera de2 board.

  1. could you tell me how long will the battery will last using the vex components only or the only way is to check it myself.

  2. should I use a seprate batteries for the motors and a seprate batteries for the sensors and the board?

what are the Considerations I need to think of considering the voltage?

The motors will be the biggest variable, since they can consume anywhere from a few milliamps when off up to several amps when stalled. If you assume the motors will be running about half the time but not heavily loaded, then figure their average current draw will be 1A each.

The sensors draw negligible power. Not sure about the DE2, but I’d guess less than half an amp depending on what all you have running.

So a very rough guess (if you are using 2 drive motors) is an average load of 2.5A: 2.9Ah / 2.5A = 1.16h

If my assumptions are close then you’ll get around an hour of driving time from your battery. I’m probably within a factor of two, so expect to get somewhere between half-an-hour and two hours of runtime.

Your motors will almost certainly draw the majority of the power, so adding a 2nd battery for the electronics is unlikely to extend the driving time by much (certainly not 2x). If you want to greatly extend runtime, you would be better off using two battery packs wired in parallel.

A separate electronics battery will make the robot more reliable when the drive battery gets low and/or when the drive motors stall. This is because the DE2 controller won’t reset from low battery voltage when the drive motors place heavy “spike” loads the drive battery.

If your project can’t tolerate a controller reset, using a second battery is a good idea. Of course, you can always start with one battery and switch to two later if it proves to be a problem.

Hope this helps,

  • Dean

I have used the motor with my Arduino, and you have to use PWM. It might not work elsewhere.

thanks that’s help a lot

Hi again,
I am coming back with a more detailed info about my robot power consuming needs :rolleyes: and things are not looking good for the mobile version

I will start at the batteries

As I said I am using VIPOW AA KR15/51 1.2 volt rechargeable batteries that supply 2.9 ampere for hour, but at closer look their voltage is reaching to more than 2 volt after charging
I still don’t get why… could it damage the batteries?I didn’t charge more than 10 hours and on my charger that also have the discharge option it says that for 4 1.2 volt battery a current of 150 [mA] for hour that is more than 15 hours charge time that needed in a 290 [mA] as it said on the battery so I think 10 hours shouldn’t damage the battery

Taking what I said about the overcharging voltage I need to put a regulator in order to protect the vex motors that should be supply by 6 batteries.
So I thought about the LM350T that can supply up to 3[A] and can be adjust between 1.2 - 33[v] of output voltage.
http://www.national.com/ds/LM/LM150.pdf
Any other suggestions?
The second part of the power consuming is the DE2,communication module, sensors, 3 LM324N and other sort of resistors and capacitors according to the voltage regulators.
After close examine the de2 I notice I can operate him with a min of 5 volt and if I want to burn a program I will need more (didn’t check how much probably 9)
While burning it consume about 0.6[A]
When I look on the datasheet at page 20
http://users.ece.gatech.edu/~hamblen/DE2/DE2_Schematic.pdf
I could see that board have a 5 voltage regulator with 1[A] and in addition a 3.3 [v] lm2676 that can supply up to 3[A] that’s 4[A] all together
So my question is
do I need a regulator for the De2 board if the total voltage of 4 batteries won’t exceed the 9 voltage original power supply?
How such a huge voltage could affect my design for the robot power?
As for the sensors I have check most of them and they are using only 10 [mA] so all together like 70[mA] at most so let say 100[mA].
The communication uses 22[ma] at transmit and 18[ma] at received according to the data sheet so at most 30[mA].
The 3 LM324N that are use to protect the De2 can tolerate up to 50[ma] but I am using them as comparators op and non-inverting unit amp so I don’t think they will use more than 1[mA] each so all together it gives me 10[mA]
That’s means a LM78M05CT that can supply up to 1[A] in a series with a UA78M33 the can supply up to 0.5[A[ should cover that part

UA78M33
[url]http://www.ddrservice.net/files/Integrated-circuits/U/ua/UA78M33.pdf
Lm78M05CT
[
Thanks in advance

RotemAny thoughts will be nice](http://www.datasheetcatalog.org/datasheet2/b/0do3jjj98lpod917pe6xpa4143cy.pdf)

Hi again,
I am coming back with a more detailed info about my robot power consuming needs :rolleyes: and things are not looking good for the mobile version

I will start at the batteries

As I said I am using VIPOW AA KR15/51 1.2 volt rechargeable batteries that supply 2.9 ampere for hour, but at closer look their voltage is reaching to more than 2 volt after charging
I still don’t get why… could it damage the batteries?I didn’t charge more than 10 hours and on my charger that also have the discharge option it says that for 4 1.2 volt battery a current of 150 [mA] for hour that is more than 15 hours charge time that needed in a 290 [mA] as it said on the battery so I think 10 hours shouldn’t damage the battery

Taking what I said about the overcharging voltage I need to put a regulator in order to protect the vex motors that should be supply by 6 batteries.
So I thought about the LM350T that can supply up to 3[A] and can be adjust between 1.2 - 33[v] of output voltage.
http://www.national.com/ds/LM/LM150.pdf
Any other suggestions?
The second part of the power consuming is the DE2,communication module, sensors, 3 LM324N and other sort of resistors and capacitors according to the voltage regulators.
After close examine the de2 I notice I can operate him with a min of 5 volt and if I want to burn a program I will need more (didn’t check how much probably 9)
While burning it consume about 0.6[A]
When I look on the datasheet at page 20
http://users.ece.gatech.edu/~hamblen/DE2/DE2_Schematic.pdf
I could see that board have a 5 voltage regulator with 1[A] and in addition a 3.3 [v] lm2676 that can supply up to 3[A] that’s 4[A] all together
So my question is
do I need a regulator for the De2 board if the total voltage of 4 batteries won’t exceed the 9 voltage original power supply?
How such a huge voltage could affect my design for the robot power?As for the sensors I have check most of them and they are using only 10 [mA] so all together like 70[mA] at most so let say 100[mA].
The communication uses 22[ma] at transmit and 18[ma] at received according to the data sheet so at most 30[mA].
The 3 LM324N that are use to protect the De2 can tolerate up to 50[ma] but I am using them as comparators op and non-inverting unit amp so I don’t think they will use more than 1[mA] each so all together it gives me 10[mA]
That’s means a LM78M05CT that can supply up to 1[A] in a series with a UA78M33 the can supply up to 0.5[A[ should cover that part

UA78M33
[url]http://www.ddrservice.net/files/Integrated-circuits/U/ua/UA78M33.pdf
Lm78M05CT
[
Thanks in advance

RotemAny thoughts will be nice](http://www.datasheetcatalog.org/datasheet2/b/0do3jjj98lpod917pe6xpa4143cy.pdf)

Hi again,
I am coming back with a more detailed info about my robot power consuming needs :rolleyes: and things are not looking good for the mobile version

I will start at the batteries

As I said I am using VIPOW AA KR15/51 1.2 volt rechargeable batteries that supply 2.9 ampere for hour, but at closer look their voltage is reaching to more than 2 volt after charging
I still don’t get why… could it damage the batteries?
I didn’t charge more than 10 hours and on my charger that also have the discharge option it says that for 4 1.2 volt battery a current of 150 [mA] for hour that is more than 15 hours charge time that needed in a 290 [mA] as it said on the battery so I think 10 hours shouldn’t damage the battery

Taking what I said about the overcharging voltage I need to put a regulator in order to protect the vex motors that should be supply by 6 batteries.
So I thought about the LM350T that can supply up to 3[A] and can be adjust between 1.2 - 33[v] of output voltage.
http://www.national.com/ds/LM/LM150.pdf
Any other suggestions?

The second part of the power consuming is the DE2,communication module, sensors, 3 LM324N and other sort of resistors and capacitors according to the voltage regulators.
After close examine the de2 I notice I can operate him with a min of 5 volt and if I want to burn a program I will need more (didn’t check how much probably 9)
While burning it consume about 0.6[A]
When I look on the datasheet at page 20
http://users.ece.gatech.edu/~hamblen/DE2/DE2_Schematic.pdf
I could see that board have a 5 voltage regulator with 1[A] and in addition a 3.3 [v] lm2676 that can supply up to 3[A] that’s 4[A] all together
So my question is
do I need a regulator for the De2 board if the total voltage of 4 batteries won’t exceed the 9 voltage original power supply?
How such a huge voltage could affect my design for the robot power?

As for the sensors I have check most of them and they are using only 10 [mA] so all together like 70[mA] at most so let say 100[mA].
The communication uses 22[ma] at transmit and 18[ma] at received according to the data sheet so at most 30[mA].
The 3 LM324N that are use to protect the De2 can tolerate up to 50[ma] but I am using them as comparators op and non-inverting unit amp so I don’t think they will use more than 1[mA] each so all together it gives me 10[mA]
That’s means a LM78M05CT that can supply up to 1[A] in a series with a UA78M33 the can supply up to 0.5[A[ should cover that part

UA78M33
[url]http://www.ddrservice.net/files/Integrated-circuits/U/ua/UA78M33.pdf
Lm78M05CT
[http://www.datasheetcatalog.org/datasheet2/b/0do3jjj98lpod917pe6xpa4143cy.pdf

Any thoughts will be nice

Thanks in advance

Rotem](http://www.datasheetcatalog.org/datasheet2/b/0do3jjj98lpod917pe6xpa4143cy.pdf)

Stages of planning a robot power supply with batteries
• Consumer ID:
Altera e-card
MRF24J40 E-card module
Two 3 wire VEX motors
Two VEX optical encoders
Two VEX ultrasonic sensors
Three VEX line trackers
• Voltage and current consumption breakdown for all consumers.

*the batteries are the same as I first mentioned 1.2[v] 2900[mAh] according to what it says on them they need to be charge in 290mAh for 15 hours and I charge them for about 6 hours in a 150[mAh] charger and they came to 2[v] so I am relaying on that.

First part 4 batteries
Altera e-card - Fed by the 9 [v] power supplier a schema is attached and according to it on page 20 you can see a two regulators that in a max influx will need up to 4 [A]
Laboratory testing measured during the burning process of the card (I thought the process stream much effort) consumption of about 610 [mA] while at normal it’s a 0.5[A] consumption.
The minimum voltage to activate the card is 5 [v] but the minimum voltage for the burning is about 9 [v] (didn’t check it though) but because I will burn my code only once it’s doesn’t really matters.
MRF24J40 E-card module - Required operating voltage of 5 [v] maximum current during the transmitting of 22 [mA] and during receiving time 18 [mA] According to manufacturer pages. Let say max of 30[mA].
The other sensors are using according to my lab check up to 20[mA] and can work with 3.3 – 5 [v] that’s 140 [mA] and I think I prefer them in a 5 [v] operation volt like the communication module.
LM324N components and other small consumers won’t need more than 50 [mA] at most.
Second part 6 batteries
The motors need a voltage 4.4 to 9.1 I prefer something in the mid 7.2[V] (nice and round) and consume up to 1.5 [A] each.
• Set the desired input voltages
The robot has three different supply voltages needs
5 [v] e-card, communication and sensors
7.2 [v] motors
3.3 [v] LM324N elements
That means three power regulators, I have found:
7805TC that will supply 5[v] and 1.5 [A] with series to the LM2937ET or UA78M33 for 3.3[V] and 0.5[A]
For the motors I want to use the LM350T adjustable regulator that will supply between 1.2 -33 [v] with 3[A].
My questions are

  1. About the Altera E-card … 4 [A] a lot of current, I attached the system schema, there is two regulators in there one for 5[v] with 1[A] and one for 3.3[v] with 3[A] so -> 4 all together.
    Do I need a regulator for the card if I won’t supply him with more than 9 [V]?
  2. How will I know according to the regulators that I choose if they could stand the current and voltage that will drop on them and how could I know the current that they will use? (I could not found a good enough answer in the datasheet but most likely I just don’t know how to look, I do know that I need to look on the drop Voltage and quiescent current and power deception but I can’t find them in every datasheet)
  3. Taking into account all the regulators the components spec how long will the batteries stand for?
    For the motors 2.9/3 ~ about an hour for max load – this is enough for me needs
    For the others I think all together not including the de2 board will need about 0.5 [A] now if I am wrong about the de2 board and I hope I am and that quasar you are right the total current is 1-1.5[A] so for this part 2.9/1.5 is about 2 hours .
    But what about when the voltage drop a little under 5 and the board will shut down.?

do you know of a modular dc power supply that would supply me with 3 different steady voltages as I need and will be small and light like a 12 [v]
bettery, is there is such a beast? or maybe a dc to dc converter ?

thanks in advance for any effort

attached de2 board schematic
DE2_Schematic[1].pdf (300 KB)

rotemkim,

There is quite a lot of information in your post, and it looks like you have done all the right analysis to design your power system. I’ll do what I can to answer your questions…

I didn’t find a system schematic attached, so I can’t answer this question with certainty. I suspect those regulators will be sufficient if you keep the voltage below the 9V needed for burning.

It isn’t uncommon for inrush currents to exceed a regulator’s rating, as long as the duration of the inrush isn’t too long it won’t be a problem. Modern regulators have thermal protection that will prevent them from being damaged if too much current is pulled for too long.

At worst, the regulators may “brown out” if the current draw is too high for too long. As long as the inrush only happens during powerup, you can hold the board in reset until the unrush has passed and the regulated voltage has stabilized.

The datasheet may provide information about how the regulator behaves outside of its normal operating ratings. Without knowing the exact regulator, I can’t say much more. If I can’t find the answer in the datasheet, I usually just try it and see what happens…

Those estimates sound about right to me. I don’t know how sensitive the de2 board is to voltage sag. Some microprocessors will work fine down into the 1.8v range, but their signal levels may drop to the point that they can’t communicate with anything (radios, PWM signals, etc).

You’ve got the right answer. A DC-to-DC convertor would be a great solution for you. I am not an expert in the design of good multi-output DC-to-DC convertors

However, WebBench Designer at the National Semiconductor website will do a good job of designing one for you. You provide your power source and load requirements, and it will design a complete solution for you (using National Semi chips, of course ;).

Hope this helps,

  • Dean

Hi
I guess the post with the attached file didn’t pass but it’s a Altera PDF system schematic.
But it doesn’t really matter I think |I have answered my questions and as you said

I wanted to prepare for the worst case scenario but I guess it’s not that easy if I am limited in the current that I can supply with a battery.

About the regulators datasheet I think I found what I need and I did the math and it’s should be fine but I want to explore the dcTdc converter it’s seems more interesting then just three simple regulators design.
I will try to learn who to use the site you have mentioned and get back to you with an answer and hopefully a good design.
I am just wary that I won’t have enough time to check my Robot properly before the test.
Just one question about the converter
is it possible to design a converter that will work with only 12[v] batteries and will give the desired different voltages

thanks a lot for your answers

I’m having trouble following your train of thought, but it sounds like one of the things you are interested in is DC-DC converters with multiple outputs, and how to design them. Texas Instruments has a large number of DC-DC converters and support available, including web-based design lab, somewhere around here:
http://focus.ti.com/analog/docs/powerhome.tsp?familyId=64&contentType=4
TI makes lots of battery management/charge/discharge management/DC-DC conversion chips, as do many other mfg like Linear Technology, National, etc.

There is an AcademicDecathon Robot competition that requires max 4AA batteries (=5-6V); I saw a post on some AD site with a link to a free TI sample of a DC/DC converter to bump that up to Vex (7.2v x ~3A) levels.

It may make your robot performance more predictable to run the motors from a regulated 7.200v supply, but most systems (including Vex) run the motors directly from the battery.