Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Separate Power Supply... YET AGAIN!

Status
Not open for further replies.
S

Souper man

Guest
I want to power my 2 motors seprately (6volt around 30mA). I dont know what to get or how to do it. I want the configuration to be simple, but effective. I want a output on a chip, say a 555 (pin3, roughly 200mA) and take that and make it turn on a separate supply, without interfereing. Any Ideas??? again???
 
Souper man said:
I want to power my 2 motors seprately (6volt around 30mA). I dont know what to get or how to do it. I want the configuration to be simple, but effective. I want a output on a chip, say a 555 (pin3, roughly 200mA) and take that and make it turn on a separate supply, without interfereing. Any Ideas??? again???

I suggest you try measuring what your motors take! - do it under load, and under stall conditions - be prepared to be staggered when you do!. 30mA is no where near high enough!.

It's common to have seperate batteries for the motors, and for the electronics.
 
Do these motors need to be reversible?

It's easy to make a dual PWM circuit with three comparators, using one as an oscillator and the other two as plain comparators, use a quad IC like the LM339.

You need to use the outputs to drive MOSFETs, also don't forget the pull-ups which I haven't included on my schematic!
 

Attachments

  • Dual PWM.GIF
    Dual PWM.GIF
    5.3 KB · Views: 785
Last edited:
under Load, it is about 50 mA. Stall is 400mA.

They do not need to be reversible, only on their own batteries
 
That's not very powerful what can you do with that?

Sorry I forgot to post the source for the circuit which I have modified.
**broken link removed**

As the motor is so small a MOSFET isn't needed, I would add a small PNP transistor with a suitable base resistor to the the output of the comparator.
 
These motors are for a small, lightweight robot, if you were wondering which, search spagetti 2.0 in the search thing. So by using your circuit, the motors will be on their own power supply (4AA batteries)? The circuit itself will run on a rechargeable 9v (150mA), but the motors will drain it quickly, so They must run on the 4 AA power supply.
 
The link isnt very helpful, because I still dont get how I will be able to use that for a seprate power supply...

Also, forget the 555 timer and all the component stuff. I just want my motors to draw on their own batteries. They only need to go forward.
 
I posted the link for copyright purposes as I modified a circuit taken from their website. Also one of the images on there are helpful.

Running it from a separate power supply would be easy, the comparators have open collector outputs don't they?
**broken link removed**

Therefore all that's required is for you to connect a PNP transistor in series with the positve supply to the motor and connect its base to the output of the comparator. When the comparator's output transistor turns on it will connect the base of the transistor driving the motor to 0V turning it on. When the comparator's output transistor turns off no current will flow so the transistor driving your motor will also turn off.

EDIT:
My previous atachment contained an error; I've fixed it for you.
 
Last edited:
so the collector goes to the motors + terminal and the - just goes into the - side of the 4 AA? Also does the emitter go to the 4AA battery supply? What about the Comparator? would one side go to ground and the other goes to the circuit that turns on the motor (output of chip x)?

If so, This is very easy and if you verify it i will experiment with it. Also, could i replace the transistor with a mosfet? not that i will, but for future robots.

THANK YOU SO MUCHS
 
Souper man said:
so the collector goes to the motors + terminal
No the emitter goes to the + terminal of the hgher supply voltage; remember it's a PNP transistor not an NPN transistor.

and the - just goes into the - side of the 4 AA? Also does the emitter go to the 4AA battery supply? What about the Comparator? would one side go to ground and the other goes to the circuit that turns on the motor (output of chip x)?
The both the supplies need a common 0V rail. The comparator needs the low control logic voltage and the transistor needs the higher voltage that does the work.

If so, This is very easy and if you verify it i will experiment with it. Also, could i replace the transistor with a mosfet? not that i will, but for future robots.
You could use a p-channel MOSFET but there really isn't any point for such a small motor.
 
I've drawn what I was talking about so it's clear for you to see.
 

Attachments

  • Separate supply.GIF
    Separate supply.GIF
    3.1 KB · Views: 608
THANK YOU SO MUCH!!!

what is Rb?
a resistor of my choice?
Where does the + and - of the comparator go to? does - go to ground and + go to chip x?
Would i connect the negative termninals of both batteries to the negative bus?
 
Last edited by a moderator:
Souper man said:
THANK YOU SO MUCH!!!

what is Rb?
a resistor of my choice?[
Rb needs to allow enough current into the transistor to become saturated (fully turned on) so it can carry the current required by the motor. In order for this to happen the base current needs to be one tenth of the collector current.

Your motor takes 50mA so the base will require 5mA.

Suppose the battery's minimum voltage is 4.8V.

Here's how you calculate Rb:

[latex]Rb = {4.8-0.7\over0.005} = 820 \Omega[/latex]

Where does the + and - of the comparator go to? does - go to ground and + go to chip x?
The circuit illustrated in my previous post is not the complete circuit; it only illustrates how you connect the output transistor and motor to the comparator on the output stage of the first circuit I posted.

The complete schematic is the schematic in my previous post combined with the one in my first post. I suggest you read the website I linked so you can understand how comparators work before attempting to build this.

Would i connect the negative termninals of both batteries to the negative bus?
Yes, that's what I mean by a common 0V rail.
 
Last edited:
I still dont get it (sorry!), how is a comparator going to run this? the link doesnt even clear up my question. Could i use a H-bridge to run my motors?
 
You use H-bridge for direction control, but you don't need it right?
The comparator is used as oscillator, as PWM to control the speed of the motor. Am I right?
 
Yes, you are but I think it needs more explanation for those who are unfamiliar with Schmitt trigger oscillators.

Souper man said:
I still dont get it (sorry!), how is a comparator going to run this? the link doesnt even clear up my question. Could i use a H-bridge to run my motors?
An h-bridge is only required when you need to change the direction of the motor.

Look at the schematic that I orignionally posted.
dual-pwm-gif.13150


The comparator on the left froms an oscillator.
**broken link removed**
The website that I linked you to doesn't explain how the oscillator works but it explains the comparator Schmitt trigger and hysteresis.

I'll give a brief explaination but you really need to understand Schmitt triggers before you'll get it. The comparator is configured as a Schmitt trigger, it has an resistor and capacitor on its output. The inverting input is connected inbetween the resistor and capacitor to provide feed back and the non inferting input is connected to a potential divider to bias it at half the supply voltage.

When the oscillator is first started the voltage on the capacitor will be zero and the output of the Schmitt trigger will be high. The capacitor will charge through the resistor until it reaches the Schmitt trigger's upper threshold. The output of the Schmitt trigger will then go low and the capacitor will discharge back though the resistor until it gets to a low enough level to turn the Schmitt trigger back on again causing it to recharge. This cycle repeats until the power supply is interrupted; it is an example of a relaxation oscillator.

The frequency is controlled by the RC time constant Schmitt trigger hysteresis and the voltage on the non-inverting pin. If you want you can calculate all of this from first principles but I didn't bother, the website says the LED will flash at 2Hz, all I did was divided the capacitor and resistor values by 10 so it will oscillate at about 200Hz.

So what we've built a relaxation oscillator how do we get pulse width modulation from it?

Easy, the answer is that the waveform on the capacitor is a sawtooth waveform. All we do is add a comparator on the output and compare it will a variable reference. If the reference is set to half the supply we'll get 50% duty cycle as the sawtooth wave is higher than the reference for half the time and below the reference for hlaf the time. If the reference is set at a higher voltage then the duty cycle will be lower as the sawtooth wave is higher than the reference for only a short period of time. If the reference is set to a lower voltage then the output will be a higher duty cycle becase the sawtooth wave form is above the reference for longer periods. You can easllly set it to be fully on or fully off be setting the reference below or above the peak or troffs in the sawtooth waveform respectively. You can invert this behaviour so a higher reference gives a higher duty cycle and a lower reference gives a lower duty cycle by swapping round the comparator's inverting and non-inverting inputs.

The clever thing is (within reason) you can connect as many comparators as you like to the capcitor in the relaxation oscillator. Look at the first schematic in this post, I have connected two comparators to the capacitor to give you two channels.

The schematic below demonstrates how you can connect a transistor to the output of a comparator so it can drive a motor. The comparator is the outpur comparator on the PWM oscillator illustrated in the first schematic.
separate-supply-gif.13151


To give you a good understanding it's a good idea to simulate the circuits above using a simulator like LT SPICE.
 
Hi,
The 220 k:eek:hm: resistor and 0.47 uF capacitor determine the time constant, two 100 k:eek:hm: devide the supplied voltage to two to the non inverting input, then what is the purpose of the 22 k:eek:hm: resistor?
 
bananasiong said:
Hi,
The 220 k:eek:hm: resistor and 0.47 uF capacitor determine the time constant, two 100 k:eek:hm: devide the supplied voltage to two to the non inverting input, then what is the purpose of the 22 k:eek:hm: resistor?

Positive feedback!, to provide hysteresis.
 
so then the 3 comparator schemmy (one with the long post) is ran on the 9v. Then the output of the 2 comparators is ran into the input and output of the other comparator. This will then run the comparator and run the motor. Where does the controlled pulse or current go to (to control that motor)? It is coming together now, except of where the PWM signal comes from
 
Souper man said:
so then the 3 comparator schemmy (one with the long post) is ran on the 9v. Then the output of the 2 comparators is ran into the input and output of the other comparator. This will then run the comparator and run the motor.
Yes.

Where does the controlled pulse or current go to (to control that motor)?
The PNP transistor?

It is coming together now, except of where the PWM signal comes from
I've simulated the circuit in Crocadile Clips (yes I know I hate the program as it's a bit playskool but it's good for this sort of thing as it's interactive).

It uses :mu:A741s so no pull-up resistors are used on their outputs and the frequency is totally different to the circuit I origionally posted. I didn't bother copying because it's easier for me to draw a similar circuit from memory.

It should be easier to understand now. The blue waveform is the voltage on the capacitor and the red is the PWM outpu waveform. You can see it change when the reference voltage on the output comparator is adjusted.
 

Attachments

  • PWM SIM.GIF
    PWM SIM.GIF
    43 KB · Views: 1,499
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top