Show Posts
Pages: [1] 2 3 ... 24
1  Using Arduino / General Electronics / Re: Power Supply voltage dropping - faulty supply ? on: April 11, 2014, 03:16:09 pm
Update :

OK. I have another similar power supply ( 12V 3A with 17Ah battery ) in another room for a non-critical function.

Have re-routed that to the problem system.

Before power-on, the supply is 13.19V
After switching on all components of the home system, dropped to 12.91V and registering 1.2A
Has remained constant for 30 minutes now.

So I guess that if it remains stable for the next hour, I can safely assume my old power supply was faulty.

Thanks to all for the input. Really appreciated.

Update : 2 hours and no change at all smiley
2  Using Arduino / General Electronics / Re: Power Supply voltage dropping - faulty supply ? on: April 11, 2014, 01:49:36 pm
If it worked before that and doesn't work afterwards then I think we found the problem.

My problem with that statement is that it would also be correct to say : If "the complete system as a whole" worked before that and doesn't work afterwards then I think we found the problem. - we still can't say for certain that it is the power supply - although suspicion and logic says it is the most likely candidate.

The Amp sensor is not detecting any real change in the current draw by the system, so is it reasonable to assume that, once any load, no matter how large or small ( like the brand new un-used Mega ) is connected, the transformer or circuitry of the power supply could start it's gradual loss ?
3  Using Arduino / General Electronics / Re: Power Supply voltage dropping - faulty supply ? on: April 11, 2014, 01:43:29 pm
That's bad, a power surge and PC destroyed.
You don't know what else is damaged.
I suggest to use a multimeter and check everything step by step.

I have done all the steps that I can think of :

disconnected each part of the system from the 12V supply when the reading was down to 9V, one at a time. In each case, there was no noticible change to the 9V reading.

At the end, I was left with a totally disconnected Mega 2560 ( all wires are on male header pins, so were physically removed ) and still no change.

So I suspected the Arduino and ethernet shield.

Removed the shield - no change.

Disconnected the Mega and connected a spare, brand new, Mega - same reading - so unlikely that the Mega was damaged and causing the drain.
4  Using Arduino / General Electronics / Re: Power Supply voltage dropping - faulty supply ? on: April 11, 2014, 01:38:40 pm
Does it get hot?


Yes, the casing that the power supply and battery are in, is warm, but not too warm that I can't keep my hand on it.
5  Using Arduino / General Electronics / Re: Power Supply voltage dropping - faulty supply ? on: April 11, 2014, 01:37:23 pm
Hi Mike

Quote
and that their effect on the system voltage should be almost instant after power is applied ?
Not too sure what that means.

Quote
that I have a faulty power unit
Yes that would be my guess as well. Just remove all the load to check but it sounds lie a faulty supply.
Of all the parts in a system the power supply is nearly always the most unreliable.

I am assuming that any effect that any components of the system could possibly have, should be reasonably constant and should exist from shortly after power is applied, and not degrade the power like this over a period of time.

I have removed ( switched off with toggle switch ) the load and the power supply is now reading 11.5V
6  Using Arduino / General Electronics / Power Supply voltage dropping - faulty supply ? on: April 11, 2014, 12:53:41 pm
I have a home automation and security system running on a mega 2560. All been working well for over 6 months with no changes.

Nothing changed recently on the components list of things attached to the Arduino.

Power is from a 220V Power supply that is rated output 12VDC 5A with a 12V 9Ah battery in the power supply box ( battery was changed this morning to rule it out of the equation ).

When I power up the Arduino, relay boards, sensors, etc, the voltage from the supply is 11.47V

Over a period of 2 hours, nothing is used on the system. No relays activated, no sensors triggered, no inputs change.

My Hall sensor on the main power line is reading 1.03A and remains reasonably constant ( between 1.00 an 1.05A )

But the voltage measured from the power supply drops to around 9.3V over a 2 hour period.

Would it be correct to assume that the components in the system, pullup resistors, etc should hold a steady 'state' and their drain / effect should remain reasonably constant, and that their effect on the system voltage should be almost instant after power is applied ?

My last guess is that I have a faulty power unit - we did have a power surge a few weeks back after a power outage, and that destroyed my PC, and that was on the same circuit as the power unit in question.

Any other ideas ?
7  Using Arduino / Programming Questions / Re: Remove delay from inside function on: April 07, 2014, 03:56:14 am
Thanks Paul

Sorry, my error when I tried to extract the text relevant to the question.

The LogItWeb function is in fact outside the main loop.

So the following should work ?

Code:

long ClientStopMillis = 0;

void setup(void) {

}

void loop(void){
unsigned long currentMillis = millis();

if(ClientStopMillis != 0 && ClientStopMillis <= currentMillis){
client.stop();
ClientStopMillis = 0;
}

LogItWeb(1,tempC2); // tempC2 contains a float value from a sensor reading

} // end of main loop

void LogItWeb(int Location, float LogTxt){
if (DSLcount > 0){  // if there was a previous failure, then wait 10 loops before trying again
DSLcount++;
if (DSLcount > 10) DSLcount = 0; // now try again

if (DSLcount == 0){ 
DSLcount = 1;  // if the following connect fails, then DSLcount will be 1 and activate the 10 loop delay.
if (client.connect(myserver, 80)) {
DSLcount = 0;  // if the connect succeeds, then set the DSLcount to 0, so no delay loop next time
client.print("GET http://www.xxx.com/xxx.php?data=");
client.print(Location);
client.print("--");
client.print(LogTxt);
client.println(" HTTP/1.1");
client.println("Host: www.xxx.com");
client.println();
// set the Stop time as the current millis + 250 ms
ClientStopMillis = currentMillis + 250;
// delay(250);
// client.stop();
}
}
}
8  Using Arduino / Programming Questions / Remove delay from inside function on: April 07, 2014, 02:31:46 am
I am wanting to eliminate all Delays in my code.
I have a function in my main loop that accepts some data, uploads it to my web site ( php page that adds data to an online log file ), and then closes the connection.

From experience, I have found that I have to add a short delay ( in this example, a delay of 250 ms ) before client.stop so that the preceding code completes fully to the web based php page. The code at present is working as required.

Code:
void loop(void){
unsigned long currentMillis = millis();
void LogItWeb(int Location, float LogTxt){
if (DSLcount > 0){  // if there was a previous failure, then wait 10 loops before trying again
DSLcount++;
if (DSLcount > 10) DSLcount = 0; // now try again

if (DSLcount == 0){ 
DSLcount = 1;  // if the following connect fails, then DSLcount will be 1 and activate the 10 loop delay.
if (client.connect(myserver, 80)) {
DSLcount = 0;  // if the connect succeeds, then set the DSLcount to 0, so no delay loop next time
client.print("GET http://www.xxx.com/xxx.php?data=");
client.print(Location);
client.print("--");
client.print(LogTxt);
client.println(" HTTP/1.1");
client.println("Host: www.xxx.com");
client.println();
delay(250);
client.stop();
}
}
}
LogItWeb(1,tempC2); // tempC2 contains a float value from a sensor reading
} // end of loop

Would it work to remove the client.stop to outside the function like this ? :
Is the function LogItWeb able to change the value of variable ClientStopMillis for use outside the function ?

Code:
void loop(void){
unsigned long currentMillis = millis();
// add a new variable
long ClientStopMillis = 0;
void LogItWeb(int Location, float LogTxt){
if (DSLcount > 0){  // if there was a previous failure, then wait 10 loops before trying again
DSLcount++;
if (DSLcount > 10) DSLcount = 0; // now try again

if (DSLcount == 0){ 
DSLcount = 1;  // if the following connect fails, then DSLcount will be 1 and activate the 10 loop delay.
if (client.connect(myserver, 80)) {
DSLcount = 0;  // if the connect succeeds, then set the DSLcount to 0, so no delay loop next time
client.print("GET http://www.xxx.com/xxx.php?data=");
client.print(Location);
client.print("--");
client.print(LogTxt);
client.println(" HTTP/1.1");
client.println("Host: www.xxx.com");
client.println();
// set the Stop time as the current millis + 250 ms
ClientStopMillis = currentMillis + 250;
// delay(250);
// client.stop();
}
}
}
// add this code to the general section of the Main loop
if(ClientStopMillis != 0 && ClientStopMillis <= currentMillis){
client.stop();
ClientStopMillis = 0;
}
LogItWeb(1,tempC2); // tempC2 contains a float value from a sensor reading
} // end of loop

9  Using Arduino / General Electronics / Re: SN754410 Quadruple Half H Driver - what signal to activate ? on: March 27, 2014, 11:24:10 pm
now noW nOW NOW !!
damn autotype.
At least I wasn't trying to say ExpertS EXchange smiley

I hear your logic on the pull-up / pull-down resistors. So better to use a transistor to sink the opposite pin to ground only when required.

I have learnt so much from such a small project.

Thanks again for your help.
10  Using Arduino / General Electronics / Re: SN754410 Quadruple Half H Driver - what signal to activate ? on: March 27, 2014, 01:35:04 pm
to MarkT

Many Thanks for the input and guidance.

Feedback is that the transistors worked perfectly and the H-Bridge is not operating exactly as it should.

Now that I think that I grasp the idea of having the pins high and low ( as opposed to simply making one High ), I wonder if it would not be easier to simply have a pull down resistor connected to both pins 2 and 7, so they are Low by default, and each only requires a positive signal to activate ?

Regards
11  Using Arduino / General Electronics / Re: SN754410 Quadruple Half H Driver - what signal to activate ? on: March 22, 2014, 03:49:19 pm
Thanks for the reply MarkT

The RC receiver is a very cheap unit from a kid's toy. I have checked the output and am seeing a constant 4.7V+ on the line being driven, and 0V on the other line. ( switched around when RC controller changes direction ).

I suspect that the 0V that I am seeing is not 0V ( as in Ground ), but just no voltage, no ground, not connected to anything.

So I think the only options that I would have ( with my limited supplies and parts available ) would be to pull down the line that is at 0V with a resistor, or with a transistor which is activated by the high line.

Any advice welcome.
12  Using Arduino / General Electronics / SN754410 Quadruple Half H Driver - what signal to activate ? on: March 22, 2014, 03:10:59 pm
Hi
I am modifying a RC car. The new battery pack / motor is 9V, and the car receiver runs 5V.
I have added a 5V regulator to feed the receiver board, and all working perfectly.

Also added a SN754410NE Quadruple Half H Driver 16-Pin Plastic DIP so the output from the receiver can control the 9V to the motor.

All working except the SN754410NE

If I read examples on the net, it looks like the input pins ( pin 2 - 1A and pin 7 - 2A ) require a 5V+ input. But I am finding that the receiver outputs 5V+ to pin 2, and 0V to pin 7, but the motor does not turn.

I tried disconnecting the input pins ( pins 2 and 7 ) and then connecting the 5V+ from the regulator to either of these pins. Nothing happened.

But if I connect Ground to either pin, the motor spins perfectly as it should.

My only guess here could be that the SN754410NE has internal pullup resistors on the inputs ( pins 2 and 7 ), so the signals from the receiver, when input pin 2 = 5V+, is not grounding pin 7. And that the internal pull-up is working like an active input signal on pin 2 when I connect ground to pin 7.

Could anyone please tell me if I am understanding this correctly ?

If this is correct ( meaning that the input pins actually need a ground on the 'opposite' input pin to activate the motor ), could the problem be overcome by adding a pull-down resistor to the input pins ?  Is this even possible if the SN754410NE has internal pull-ups ? And what size resistor to overcome the internal pull-up ?  I am thinking along these lines as I would prefer to not have to modify the existing receiver, and to use only the 5V+ signals that I am already getting from it.

< addition >
Or would it be better to add a 2N3904 transistor, with SN754410NE pin 2 's   5V+ connected to a 10K resistor connected to 2N3904 Base, 2N3904 Emitter to Ground, and 2N3904 collector to SN754410NE pin 7. Thinking that if SN754410NE pin 2 is activated with 5V+, then the 2N3904 is activated to pull SN754410NE pin 7 down to ground. A second 2N3904 would be used to sink pin 2 when pin 7 is High.
13  Using Arduino / General Electronics / Re: Electric Fence Voltmeter on: February 19, 2014, 05:14:39 pm
The resistor is : http://za.rs-online.com/web/p/through-hole-fixed-resistors/6835332/

Description is : VR68 10kV Resistor,1W,5%,33M

Anything I am missing in thinking these will work for the project ?

Regards
14  Using Arduino / General Electronics / Re: Electric Fence Voltmeter on: February 19, 2014, 04:32:42 pm
Thanks to all for the advice so far.

So what I have now is this ( please see attachment )
Can anyone please confirm if I am on the right track with the diagram ?

I have sourced the resistors and already have the 1N4007.

But I do not have sufficient understanding to know what rating components to use for the capacitor and the Zener.

My understanding is that the output from the voltage divider should range from 0.303V for 1KV, up to 2.424V for 8Kv. The capacitor will simply store, over a few pulses, the input voltage from the divider ( so it won't exceed the input voltage, but would take a few pulses to get up to the input voltage ).

The Arduino would read the voltage from the capacitor ( result is 1KV for each 0.303V in the capacitor ).

Would I need to add a manual discharge circuit for the capacitor  ( cap '+' terminal to a push button switch to a resistor to ground ) to discharge the capacitor after reading the value ?

Or could a 2N2222 or simplar NPN transistor, controlled by a High Output Pin on the Arduino, replace the manual push button above ?
That way, I could let the capacitor charge for, say, 6 seconds ( 6 pulses ), read the capacitor voltage on the Arduino Input Pin, and then program the 2N2222 transistor Output pin HIGH, for say 3 seconds )  to ground and discharge the capacitor.

Thoughts please.
Regards
15  Using Arduino / General Electronics / Electric Fence Voltmeter on: February 17, 2014, 04:10:27 am
Hi

Am looking at making a voltmeter for my electric fence.

After research, it would appear that the best option is to use a voltage divider.

The spec for the fence energizer, depending on the settings, is anywhere from 1000V to 8000V pulses.

A voltage divider with :
R1 consisting of 6 resistors, in series, 1W 33Mohms each, giving 198Mohms.
The resistor is : http://za.rs-online.com/web/p/through-hole-fixed-resistors/6835332/
R2 is 2 resistors, in series, 1/2W 30Kohm each, giving 60K.

The output should then range from 0.303V for 1KV, up to 2.424V for 8Kv.

Questions :
1. should I add a Zener Diode after the voltage divider to ensure the output from the divider never exceeds the input pin limit of 5V ?  Or is there a better way to do this ?
2. Because the voltage pulses for only a fraction of a second, once per second, is the Arduino Uno capable of reading the voltage ?

Another idea that I saw only 1 post about, was to add a capacitor to the voltage divider to buffer the voltage, but I do not fully understand how this would work, as I assume that the capacitor would just keep storing more and more with each pulse, and surely must eventually fail, or need some sort of discharge circuit added to discharge the capacitor after each pulse.

Advice please.
Pages: [1] 2 3 ... 24