Completed Ardunio Contoller: Few Problems, Help Needed

Problem better now.. but still it persist when the FEEDMODE is implemented.

Now when turning ON or OFF any Power Module the System doesnt freeze though. But in FEEDMODE it does freezes.

It is because it is turn OFF nearly everything in ONE go, so more noise?
 
Then i need to redo my PCB
You ALWAYS need decoupling caps at EVERY power pin of EVERY IC. They are not shown in schematics because it is assumed that they are never omitted.


Just food for though (for the next project?) Makes changes 1 at a time so that you can understand WHAT the problem was. In this case, now you don't know if it was the pullups, PSU noise or something else.
 
VS redoing the PCB from scratch, I'd try to make the effort to squeeze the decoupling caps in there as-is. All you need is a bit of bare copper to solder each pin from the cap to, as close to the pins on the IC as possible - it doesn't have to be a "pretty" implementation with through holes especially meant for the cap.
 
"VS redoing the PCB from scratch, I'd try to make the effort to squeeze the decoupling caps in there as-is."

You can also buy IC sockets with the decoupling caps already installed:

110-93-314-41-801000.jpg


Stu
 
"VS redoing the PCB from scratch, I'd try to make the effort to squeeze the decoupling caps in there as-is."

You can also buy IC sockets with the decoupling caps already installed:

110-93-314-41-801000.jpg


Stu

That's basically what I had in mind, but home-made - just solder the cap across the pins/pads (on the underside of the board, opposite the IC) such that it's up "in the air" and not touching the board.
 
Problem better now.. but still it persist when the FEEDMODE is implemented.

Now when turning ON or OFF any Power Module the System doesnt freeze though. But in FEEDMODE it does freezes.

It is because it is turn OFF nearly everything in ONE go, so more noise?

Perkaruppan,

the reason most of the time Arduino freezes relates to one of the digital pins pulled high or low without any sort of impedance attached to them. I see you are using my code for feed mode, good for you. I don't think your problem is there (it is just the place where it shows or the failure mode). Start by disconnecting the probe pins one by one and see which one is causing troubles; revise your pin usage strategy.

cheers,
Marian


PS. there is no reason to pull up the I2C's SCL and SDA. Leave them alone. It will eventually make your system unstable.
 
PS. there is no reason to pull up the I2C's SCL and SDA. Leave them alone. It will eventually make your system unstable.

Kindly, that is not at all true. Adding the pullups does nothing to negatively affect the system stability. Furthermore, please see the following come

  1. Looking at the schematic for the arduino duemilanive, there are no external pullups on-board, meaning that the Atmega8's internal pullups are being used. This simply is not going to be stable. [URL]http://arduino.cc/en/uploads/Main/arduino-duemilanove-schematic.pdf The external pullups are not an option, the must be in place for a stable data bus.

    [/URL]
  2. Adding pullups (they end up being in parallel) to existing pullups (either internal or on-board) will have NO ill effects as long as the combined (it is parallel) resistance is anything reasonable above a few hundred ohms.
Adding the resistors simply ensures that the lines are pulled up to V++ and don't float near 0 logic when the data lines are driven hard by power thirsty components or parasitic bus characteristics.
 
Last edited:
Bean, no disagreement, but the clock board has the pull ups already on, so why do it twice ?


Marian
 
Start by disconnecting the probe pins one by one and see which one is causing troubles; revise your pin usage strategy.

He said above that he's not using any digital pins except one for the One Wire temp sensor, which should work just fine with the other hardware he's using. Meanwhile, he's got no decoupling caps on his circuit and no pullup resistors, both which CAN cause this sort of problem.

PS. there is no reason to pull up the I2C's SCL and SDA. Leave them alone. It will eventually make your system unstable.

Do you have something to back that up with? All anecdotal evidence I've seen (my own experimentation, forum posts on arduino forums, commercial implementations using I2C with arduinos) suggest that external pullups are a good idea. In addition, all the "official" documentation I've seen supports that position too, including the I2C-bus.org spec and the original Philips I2C spec, which call for pullups stronger than the internals activated by the Wire library:

http://www.i2c-bus.org/fileadmin/ftp/i2c_bus_specification_1995.pdf
http://www.i2c-bus.org/

Making statements like this:

Missing or wrong termination is the source of many field problems. As a rule of thumb, the higher the termination the better the signals.

Also, look at page 43 of this document, NXP's current I2C spec:

http://www.nxp.com/documents/user_manual/UM10204.pdf

It shows that the ATMega's internal pullups (50k ohms) are essentially too weak for even the best-case circuits.

If you've got experience or documentation to back up your position, please share, as I'm always eager to learn. :)

Also, different subject, just saw this from earlier:

The atmega chips run at 5V so plugging that plug-pack in directly to the Vin pin would be catastrophic.. If you gave nice clean 5v on the Vin pin would be ideal.

The Vin pin on the Duemilanove goes to the input side of the onboard regulator - it's essentially the same thing as the power jack on the edge of the board, so putting +12v on Vin is the same as plugging +12v into the jack, and is perfectly safe. The only real difference is that the Vin pin is "downstream" of the reverse protection diode, so you want to be sure you don't connect power to the Vin pin backwards. For reference, the Duemilanove schematic:

http://arduino.cc/en/uploads/Main/arduino-duemilanove-schematic.pdf
 
Bean, no disagreement, but the clock board has the pull ups already on, so why do it twice ?


Marian

Well in that case. . . :lol: Disregard my windbag statements above.

The Sparkfun RTC board has pullups on it? That strikes me as **** poor design. Slaves shouldn't have something that only needs to exist once on a bus. :mad: What if a few other vendors put pullups on their I2C slave breakout boards, and I put them all on my bus? Having too-strong termination certainly CAN cause problems (it'll exceed the current limit on the bus lines!)
 
Bean: Will change my CODE to turn OFF and ON one switch at a time using Delay, during feed mode. It is for sure noise that is been pickup for the way things are going around.

Nathan: Already i have too many wires running around the board and re-doing the PCB i think wont be that big a hassle, as it takes 3-4days for delivery and should cost me about 10$ for 3 boards.

Also another Question on the Decouplers, since i have quite a few wires through the IC, i cannot connect the ground of the IC and VCC of the IC as shown in the image by Stugray. but i have some Ground Wires going near the VCC of the IC's. Can i connect the Decoupler to those grounds? or it has to be necessarily the Ground of the IC? The ground wires that go near the VCC go the GND of the IC too, but after travelling a distance. I am using a software called PCB Artist for the PCB. And since i am unable to import it, i have attached an image. The GREENs are the decouplers. The Purples are the JUMPERs that i need to connect all the grounds together. on the left is the Resistors on the SCL and SDA, and the Capacitors 470uF and 0.1uF between the +5 and GND.

controller+unit.jpg


http://indianaquariumhobbyist.com/gallery2/d/41242-2/controller+unit.jpg
 
got a suggestion from Nano-reef.com. They say that the ground wire that i am using the connect the Controller unit and the Power Module, is the problem as it will carry the maximum noise. So they are asking me to Disconnect that wire, as already the Power supplies are from a common ground. Is it alright to do it?
 
Bean, no disagreement, but the clock board has the pull ups already on, so why do it twice ?


Marian

Certainly... I only saw the DS1307 on the schematic above and was not aware that he was using an add-on board with the clock and on-board pullups.

I don't care for the arduino, so don't know what the usual suspects sell as add-on cards. I am an Atmega fan, but use BACOM-AVR and design and build my own boards :)
 
The board should idealy have a ground plane. For 2 sided boards I prefer signal traces on top and a ground plane on the bottom, with as few signal traces on the bottom as possible. I also use tend to use ground plane fills on the top layer as well.

Decoupling caps need to be as close to the supply and Vss pins of the IC as possible.

There should only be a single point where digital and analog grounds are tied... this point should be as close to the power supply filters as possible.
 
Back
Top