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.

An on/off digital toggle signal chip

Status
Not open for further replies.
Re: Looking for an on/off digital toggle signal chip

Presuming you need want to turn on/off the power to the batteries, there are several ways;

1) scr or traic if the voltage is PWM or half-wave or such

2) series transistor or mosfet

3) relay

- - - Updated - - -

The CD4066 is an analog switch and it will not work properly in your application. The specification limiting their input current to 10mA is because they drop so much voltage in their internal resistance that they would overheat if you tried to pass more.

Betwixt already stated the CD4066 is NOT suitable as a direct device to switch on/off the load.
 
Re: Looking for an on/off digital toggle signal chip

Hello kma1787!

At this point, what i am trying to do with the chip, is to disconnect a LiPo over-discharge buzzer, that is connected to an Arduino - so the Arduino can switch a relay on and off. I discovered that the buzzer by itself, when buzzing - and when it starts on buzzing, it goes on forever or until it drains the LiPo, consumes not a bit of energy and can over discharge the LiPo by itself quite fast. Actually the buzzer is very strong, it can be heard in an open field, from a distance of more than 150 meters - the reason being, that there are some very noisy model airplanes out there!


Here is the buzzer link, just solder two wires to the sound emitting module on the back of the board:

**broken link removed**


And here is an Arduino IDE code, that can be used to monitor, if the buzzer has started buzzing:


int vmeterl = 0;
int voltcl = 0;
int vmeterlraw = 0;

void setup ()
{
pinMode (vmeterl, INPUT);
Serial.begin(9600);
}

void loop (){
vmeterlraw = analogRead (vmeterl);

voltcl = map(vmeterlraw, 0, 1023, 0, 500);

Serial.print("voltage is: ");
Serial.print(voltcl / 102,DEC); // print; the integer value of volts
Serial.print("."); // decimal point.
Serial.println(voltcl % 102,DEC); // hundredths of a volt;

delay (250);

if ((voltcl / 102>2)&&(voltcl % 102)>=3){

//In this case - do something if the buzzer starts buzzing and sends to the sound emitting module
//more or equal to 3.3V - i found it a figure, that enables to recognize for sure that the buzzer is
//working and not just some incidental flow of electricity.


}

}

- - - Updated - - -

Hello Brian!
Thanks for the thorough response!

To keep the line of thought on, from bulletin no.6 - What kind of resistor or circuit would i need, to lower the Arduino PWM 5V 40mAh, to the area of 1 mAh, needed as you say, for the chip?

As well, please take a look at this relay:

https://www.sparkfun.com/products/100

Would the Arduino 5V 40mAh PWM, be more "comfortable" with switching this relay, than the relay discussed before?

Could it be, that this here new relay, is so much more low bound on switching voltage and amps - that i can even switch more than one of these relays, at once, by using only one Arduino 5V 40mAh PWM ??

Thanks.
 
Last edited:

Re: Looking for an on/off digital toggle signal chip

I still think you are heading in completely the wrong direction. There is no need to use PWM at all to operate the relay and you are wasting most of the available power trying to do it. The schematics I gave you in post #11 will do everything you need without even using the Arduino, battery warning board and the regulator at all. You are using a sledgehammer to break a nut!

Brian.
 
Re: Looking for an on/off digital toggle signal chip

I am sure you are correct, the truth is i am a bit hesitant, with my low level knowledge of electronics, to try and build a real circuit, with specific mission oriented small electronic components. I even had problems understanding the full picture of the circuit you suggested. I am in a serious lack of theory here, please forgive me for this awkward situation! I just might try going for the circuit you set forth, when i will be done with that LEGO playground i am assembling here, with these way too general and too big gadgets !!!
 

Re: Looking for an on/off digital toggle signal chip

Hello Brian!
How are you doing?
I am still messing around with big gadgets, trying to understand, really, very basic things!

I am having trouble understanding a bit more thoroughly the term 'Ground'.

I have searched other newbies questions, regarding the subject and saw that the most basic explanation was, that ground is at its core, 'a logical reference point'.

But this definition, does not provide enough information, of course, and here is why, in my case:

Say i want to use only ONE relay, for the whole bunch of 4-5 LiPo's low-voltage cut-off assembly i am building here, would that be possible?

If ground is only a 'logical reference point', then no problem! instead of having one relay per battery, which 'presumably' has nothing to do with current or other parameters, i can switch on and off, all the batteries and not just one, by switching all their grounds through a single relay? and even the small switching chip, that you say, in your estimation, can pass through, no more than 4 mAh - What does it matter, if i only switch the ground, which in only a 'logical reference point'? even on that small chip to a 1000mAh battery ground.

Now, i am almost sure, that this is completely wrong, but can you please, just illuminate the subject a little bit more, so i can understand, how and why is it wrong?


Perhaps another way to put my question is: Is there any difference, between using the relay to switch the red wire and using the relay to switch the black wire?

Thanks a lot,
Roi.
 
Last edited:

Re: Looking for an on/off digital toggle signal chip

Sorry, I've injured my back and not been able to sit at a keyboard as much as usual.

Ground is a concept, meaning the point that other measurements are taken from. Usually, it is also the 0V line of the circuit.

I think you need to go back to basics, are you talking about a relay to disconnect the whole battery pack from it's load or a relay to switch the measurement point from one cell to another?

Brian.
 
Re: Looking for an on/off digital toggle signal chip

Hey Brian,
I hope you feel better as soon as possible!

Relay to disconnect the whole battery pack from it's load.
 

Re: Looking for an on/off digital toggle signal chip

I'm still a little confused as to what you are trying to achieve. This thread has covered several scenarios and seems to have gone back to square one.

I'm going to make assumptions based on the various methods you have suggested:
1. You want your board to actually measure the battery voltage
2. You want to digitally control the relay using the output from your board
3. The relay coil needs more voltage than the board outputs can produce but not necessarily more than the batteries produce.

Look back at the schematic I gave you earlier, the one with the resistors across the cells. Use just two resistors across the whole pack output, don't worry about the resistors connected to the mid points between cells. Use Ohms law to calculate the resistor values so their mid point is just below the maximum voltage you can measure at an analog input when say 1mA is flowing through them. Calling the top resistor R1 and the bottom one R2, the calculation is:

1. Find the total resistance of R1 and R2 that lets 1mA flow through them, R1+R2 = (Battery voltage / 0.001) the result is in Ohms.
2. Find the value of R2 that drops the maximum ADC voltage across it when 1mA flows through it (Arduino max = 5V??) R2 = (ADC maximum / 0.001) again the result is in Ohms.
3. Knowing the total and the value of R2, R1 must be (total - R2).
4. The values will almost certainly not be available "off the shelf" so choose the nearest ones you can get, erring on R1 being higher and R2 being lower so their total stays about the same. The exact values are not critical because you can compensate for a slightly lower reading in the ADC calculation in software.

Once you have the voltage measured, your next step is to control the relay. I suggest you use just one digital output on the Arduino and use it to drive a single transistor to boost the current it can carry. This is a much better solution than paralleling PWM outputs. Connect the digital output to a 1K resistor and then to the base pin of an NPN transistor (2N2222, BC337 or similar). Connect the emiter pin to ground and the collector to the relay coil. The other side of the relay goes to the top of the battery (+ end) or the positive side of your power supply if you are using one. Also connect a diode (1N4001 or similar) across the relay coil with the cathode (banded end) away from the transistor. You can now operate the relay under software control by making the digital output high or low (1 or 0).

The next step is to write your software so you measure the voltage and when it drops below your 'cut-off' level, you make the digital output go high so it turns the transistor on and energizes the relay. An additional advantage of this is you can control when the relay is turned off again by software decision. You will find that when the relay disconnects the load, the battery voltage goes up slightly and in turn this may make it look like it should be connected again. You should avoid this happening because for a while it will keep "chattering", the relay kicking in and out in a loop. What you do is write the software so the voltage which disconnects the battery is as you want it but the voltage to reconnect it is nearer to that of a fully charged pack.

I hope that makes sense.

Brian.
 

Re: Looking for an on/off digital toggle signal chip

Thanks,

I will read the above carefully and return to you with questions.

Roi.
 

Re: Looking for an on/off digital toggle signal chip

Hey Brian!

Regarding your great, elaborate explanation above, i have a question that focuses on the relay control circuit, which i am attempting to build now. i am referring to the circuit with the 2N2222, BC337 or similar transistor and the diode: Does the reason for needing this control circuit, arise from the phenomenon, that you mentioned in this post a few times before, which is that when the relay is switched off, the battery voltage could momentarily jump up and reopen the relay? or is the reason for this control circuit totally different? What about the opposite phenomenon, could it exist? What i mean is that, if the right control circuit is not built around a relay, it can turn back off right away after every time it is turned on? Is the answer to this last answer depending on the type of relay e.g. "Normally on" or "Normally off" ??

Thanks a lot,
Roi.
 
Last edited:

Re: Looking for an on/off digital toggle signal chip

Does the reason for needing this control circuit, arise from the phenomenon, that you mentioned in this post a few times before, which is that when the relay is switched off, the battery voltage could momentarily jump up and reopen the relay?

Exactly! The relay itself will draw little current but the load it's contacts are switching could be higher. When you load a battery, it's voltage always drops a little so you have to avoid having a fixed trip point where the relay operates, instead you have two trip points, one 'upper' trip where you decide the battery is good and a lower one where you decide it's discharged. The idea is that as the battery discharges below the lower point it gets disconnected but by then it can't go back to the higher trip and reconnect itself. For example, if the battery is 12V, and you set the relay to operate at 11.5V, as the battery voltage drops to 11.5V the relay would disconnect and remove the load, the voltage may then go back up to 11.6V which would make it reconnect again and keep repeating the cycle. If you made the lower trip point 11.5V but the upper trip point say 11.7V it would disconnect as before but stay disconnected until the battery was recharged. You can decide the two trip points in software.

Yes, you could have the effect reversed but a circuit that connected the load when the battery was low and turned it off when it was charged would be unusual. A system like that is used in emergency lighting where failure of the AC supply switches a battery into circuit to operate lights but in that application, it's more usual to simply power the relay from the AC directly as all you need to know is whether it's there or not. No measurement is needed.

Brian.
 
Re: Looking for an on/off digital toggle signal chip

Hello Brian!
How are you doing?

I have a question, that i would like to ask you, regarding a couple of servos, that i converted to continuous servos and connected them to the same signal source and am not able to find a 0 movement point, for both of them, at once and at the same time. Is there an electronic component, that could help me solving this problem?

Should i open a new topic/thread or move this question to a new thread, or can i elaborate on the question here?

Thanks,
Roi.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top