Show Posts
Pages: 1 [2] 3
16  Using Arduino / General Electronics / Re: how to reduce the electrical noise on: March 19, 2013, 02:09:05 pm
Hey ,

Thank you for replying .

I will try the 0.1uF caps in parallel, but I have to buy them tomorrow to try.

I have capacitors on both sides of the 7805.

Someone suggested keeping a lower value resistor for reset instead of 10k, how lower that should go?
Ignore him he knows not what he says.

2 10uF capacitors.
put 2 ceramic capacitors of 0.1uF in parallel with the ones you have. Mind you the capacitors shown on the link do not look like 10uF at all they look like 10nF.

I will take a photo very soon

I have used voltage regulation in the circuit using the 7805
Have you got capacitors on the input and output pins?
17  Using Arduino / General Electronics / Re: how to reduce the electrical noise on: March 19, 2013, 01:49:44 pm
What is the next size of caps I can try instead of the 10uF?
18  Using Arduino / General Electronics / Re: how to reduce the electrical noise on: March 19, 2013, 01:48:13 pm
Ok I basically use the same version here
2 10uF capacitors.
Without the PUSH button to reset and the in-circuit programming chips
with exactly same parts and wirings.. I have soldered them all in the solder board. I will take a photo very soon

Power source is my grid and wallwart 12V , I have used voltage regulation in the circuit using the 7805 .
19  Using Arduino / General Electronics / how to reduce the electrical noise on: March 19, 2013, 01:20:08 pm
Hi All

My arduino standalone board that i soldered with voltage regulator for staircase lights automation seems to be restarting/flickering whenever i switch on my tubelight which flickers almost every time due to start issue or whatever.

Is there anyway to immunize the arduino from power glitches like this? like bigger caps for voltage regulation,etc?

Someone suggested keeping a lower value resistor for reset instead of 10k, how lower that should go?

Running the arduino from the batteries will fix?  or may introduce more problems than the fix?
20  Using Arduino / Microcontrollers / Re: Simple time RTC based relay stops after a while on: March 18, 2013, 05:02:29 pm
Hi Thanks for the reply.

Regarding the reset, Yes I used 10k resistor .

You said you had circuits that resets the microcontroller on power glitch , I think that would just restart the sketch ?

for me it seems to just hang.. can i try a lower value like 1k?

I will soon give you the whole sketch and photos .
21  Using Arduino / Microcontrollers / Simple time RTC based relay stops after a while on: March 18, 2013, 01:41:52 pm
I have a very simple RTC circuit based on ds1307 attached to ATMEGA328 .
I have bootloaded this chip with external crystal and have let it run by itself on a circuit.

I have a relay that switched on during day time and switched off at night..

All seems to work well for like 1-2 days then somehow the whole thing stops working until i power cycle it.
I have powered arduino using a voltage regulated 12V wallwart and i have a voltage regulator IC as well to bring the 12v down to 5 on the circuit  and use the same wallwart to energize the relay.

I am sure the 12V regulator has its own IC/Caps, etc

And the power comes to this setup from my Inverter and during the grid failure which happen a lot of time lol.. there is always a very slight power blink or something. Caps should take care of it as it is very very short.
My computers do not stop running during this break .

So its either the RTC that stops giving data to the atmega OR the whole mega crashes and requires a reboot.

RTC time is correct because when i reset the arduino once in a while, it just works

Also I feel like an Atmega is an overkill for a silly task, I m going to soon use an attiny84 for this but didnt find any readymade RTC code that works with 84 yet.

Is arduino dependable to run for like months without any action from the user? because if i plan to use this system to be able to run some important stuff like street lamps, and want to know if this is good enough to run for years without power cycles,etc or there are any special things to note before doing a system that is

Sorry if i sound silly, I m not an expert in electronics more like a noob, Im a software person and do this all at night for fun.
I know the word arduino like exactly some 50 days ago and have no other background .

Here is the code, I don't know if there is a problem with code here.

int sensorPin = A0;    // select the input pin for the potentiometer
int ledPin = 13;      // select the pin for the LED
int relayPin = 8;      // select the pin for the LED

void loop() {
getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);

  Serial.write("Its night time");
  digitalWrite(relayPin, LOW);
  Serial.write("Day time");
  digitalWrite(relayPin, HIGH);


// Convert normal decimal numbers to binary coded decimal
byte decToBcd(byte val)
  return ( (val/10*16) + (val%10) );

// Convert binary coded decimal to normal decimal numbers
byte bcdToDec(byte val)
  return ( (val/16*10) + (val%16) );

// Gets the date and time from the ds1307
void getDateDs1307(byte *second,
          byte *minute,
          byte *hour,
          byte *dayOfWeek,
          byte *dayOfMonth,
          byte *month,
          byte *year)
  // Reset the register pointer
  Wire.requestFrom(DS1307_I2C_ADDRESS, 7);

  // A few of these need masks because certain bits are control bits
  *second     = bcdToDec( & 0x7f);
  *minute     = bcdToDec(;
  *hour       = bcdToDec( & 0x3f);  // Need to change this if 12 hour am/pm
  *dayOfWeek  = bcdToDec(;
  *dayOfMonth = bcdToDec(;
  *month      = bcdToDec(;
  *year       = bcdToDec(;

boolean isday()
  if((hour>4) && (hour<17))
    return true;
  return false;

void printtime()
   Serial.print(hour, DEC);
  Serial.print(minute, DEC);
  Serial.print(second, DEC);
  Serial.print("  ");
  Serial.print(month, DEC);
  Serial.print(dayOfMonth, DEC);
  Serial.print(year, DEC);
  Serial.print("  Day_of_week:");
  Serial.println(dayOfWeek, DEC);

22  Using Arduino / Microcontrollers / Re: Arduino doesnt seem to boot when powered externally on: March 07, 2013, 02:28:52 am

I presume you've got an Arduino Uno and the external power is via the 2.1mm power socket?  If not please shout out as the rest of this will be based on that assumption.

I indeed googled up that one and someone suggested 10k resistor from rx to tx  and I tried , didnt work.
Don't do that.  I can't imagine why that was considered a good idea.  On the plus since it's not a dead-short you are unlikely to have smoked anything.  Rest assured putting a resistor between RX and TX is not a normal requirement - so take that out and maybe don't listen to that someone so much in future  smiley  

There is nothing in the Arduino that makes it need a serial connection - unless you make that happen in your code - it's common to use those pins for purposes other than serial comms in fact, or for there to be no serial communication at all in a sketch, as it is with the blinky example you cite.

On the question of the serial monitor being open, the Arduino also doesn't wait for comms to be confirmed so if you don't open the serial monitor and there are Serial.println() etc in your code, they will just happen and be lost if there's nobody/nothing listening.  You can send as much as you like without anything connected on the other side and the Arduino is fine with that...unless you code it to do so.  Same goes for data sent to the Arduino - unless you're specifically looking for it it will be ignored.

Opening the serial monitor does reset the Arduino though, so your sketch will be restarted as a consequence.

Are you suggesting the blinky LED sketch doesn't start when you run it from external power without the USB plugged in?  If so, does the power on LED come on?  What you're describing sounds to me to be a power issue with your wall wart.

Cheers ! Geoff

Thanks for your reply.

LED Sketch does start nicely and works when i power with an wallwart..  Power LED is on and the 13 pin LED is blinking which suggests me everything is normal

but with my wireless sketch wont boot, can this still be a problem with power adapter?

More wierdness is that I have 2 UNO R3s with the Nrf24 attached to each and both behave just like this. could this be a problem with my nRf chip? I dont know

Regarding resistor yeah I was lucky.. i didnt wire it directly.

23  Using Arduino / Microcontrollers / Re: Arduino doesnt seem to boot when powered externally on: March 07, 2013, 02:22:51 am
A further thought - if it's not an Arduino Uno but an older model, not all automatically select the power source.  I have an Arduino that needs to have a jumper changed to select the power source being the 2.1mm DC jack.  An Arduino Uno should (I think all models) auto-select the power source.


I have UNO R3 smiley
24  Using Arduino / Microcontrollers / Arduino doesnt seem to boot when powered externally on: March 06, 2013, 05:39:01 pm
Hi Guys

I indeed googled up that one and someone suggested 10k resistor from rx to tx  and I tried , didnt work.

Small programs like Blinking when i Upload to arduino does work when i remove the arduino from usb and connect it to the external power.

I tried NRF2401+ chip with the RF 24 library / getting started example.

This arduino seems to run ONLY if the serial monitor is open else I believe arduino is waiting for the computer to open serial port before it can run.
Because even when i connect the arduino to the USB it does not really start running or send / receive the signals.. immediately after i open the serial monitor, it loads up the welcome message and starts working

I tried to disable all the serial outputs on the command and still I cannot make it run independent of the usb.

Is this library specific or  i am doing something wrong here?

25  General Category / General Discussion / Re: First time need help. Solar Controller on: February 27, 2013, 08:36:21 am
Yes but make sure you voltage divide your higher voltages ,etc before sensing them with arduino.

Also Xantrex system might already have provisions to use the bleeeding energy to utlize the otherwise un-used enegy.

Please check with your Xantrex support before trying to do to this smiley

Most/All of the wind turbine systems will have a diversion system, so ask Xantrex on how to add Diversion load to your system first.

26  Using Arduino / General Electronics / Re: Home automation - looking for ideas to improve it on: February 24, 2013, 04:49:55 pm
Thanks for your answer, Helped me a lot.

Input goes only through the ULN and Relays are powered by the external 12v wallwart.

Another question though :
Whats the best way to detect the day and night.. I do have a DS1307 chip.. but wanted to know if there is any better options/simpler/etc
27  Using Arduino / General Electronics / Home automation - looking for ideas to improve it on: February 24, 2013, 12:11:05 pm
Hi All..

I have setup 6 automated lights on my stair case using PIR sensors.
I use a UNO right now.. which now has all the digital io pins taken by the relays / PIR sensor inputs.

My question is..
I need at-least 4 Inputs and 6 Outputs + a DS1307 for RTC.. is it possible to use a ATTiny84 with shift outs?
so It uses less power and I will have an extra UNO to play with smiley and basically

all I m going to do is use the clock to see if its day or night ? and then use the PIR sensors to activate relays

I have ordered a few ATTinys like 84 and 85  already..
So I would love to use anything that doesnt waste my complete UNO that just looks nice smiley

One side qn: sometimes ALL my lights go on .. when someone runs around.. so Is it possible I may exceed the amperage that i can take out of each/combined IO ports?

My relay is "8 Channel relay board with +12V relays 10A/250V AC with ULN2803 IC" Seller didnt provide me any datasheets to work with.

28  Using Arduino / General Electronics / Re: Home automation on: February 15, 2013, 03:32:07 pm
Thanks for the answer, Regarding the wires, I do have lots of cat5 ethernet cables.. is it possible to carry these digital signals over that without added devices/chips?
29  Using Arduino / General Electronics / Home automation on: February 15, 2013, 12:32:10 pm
Hi All,

I am trying to automate my staircase lights now.. there are about 6 of them.. right now my electricians have setup it all with 2 way switches.

each 2way switch is connected to 2 lights at a time. so switching them on will set 2 lamps to be on at a time.

I have an arduino, and have a fairly basic understanding of how things work in this regard and how to use digital signal to trigger relays with transistor.

Now question is in the actual implementation.

I have like 3 PIR sensors.. that i would place at 3 places on 3 floors to detect movement and use that inputs to trigger my lights.

How do i run these small wires over a longer distances? say about each floor is atleast 12 feet high.. will digital signals/voltages go over 36 feet easily?

Can i buy a wire like this ?

or a normal twisted wire ( one they use for small speakers) will do the job? , I can buy the normal jumper wires i used to experiment for longer distances but worried this could easily damaged on longer term// also dont know much about voltage drops,etc.

I heard on this forum that I cannot pass these wires together with the AC grid wires, should i use seperate pipings? I would love have it as internal wiring. any options here?

Another unrelated question about the Relays

I am thinking to buy a relay control board like this

There is also 4/ 8 relay boards like this in ebay, will this do the job? i am worried abut drawing too much current out of the arduino and exceed the limits.

how many relays is safe to run on the same power adapter? or from the arduino 5v itself?

I plan to learn things with this 6 lights to start.. I would love to control them all separately but even if I wire them in 2 pairs so a relay controls 2 lights, im fine with it.
then slowly add other room lights into the mix.. how do this scale..

how many arduino's(Mega) I m going to need to completely automate the home lights and fans.. which is about 14 in total.

I would also get a Raspberry Pi for web control for all my lights/fans very soon , may be use this as the base station
I am much better at software side of the things than the hardware wiring,etc . I can code my own android/iphone and web app that controls this easily .

I did try to google a lot/etc, I couldnt find all the answers there. I started with arduino like 2-3 weeks ago sorry for all the silly questions if they are.

Is there any open systems like "open energy monitor" for home automation so I am better off purchasing all the components and use the set standard instead of redoing it.

30  Using Arduino / General Electronics / Re: Question about powering the arduino and relay on: February 12, 2013, 10:09:31 am
Measure the resistance of the relay coil with a multimeter, then use Ohms Law to calculate the current it takes in the steady state @ 12V. The initial current when the relay turns on may be a little higher because of the movement of the relay armature.

You should be able to use a single power supply for both the relay and the Arduino.

Tried this, it works , so far so good.

Thanks smiley
Pages: 1 [2] 3