Help me! Urgent

Discussion in 'The Projects Forum' started by MocGames, May 14, 2013.

  1. MocGames

    Thread Starter New Member

    May 10, 2013
    6
    0
    I need to find a solution to stop my Arduino controller being corrupted from a gradual falling off of the input voltage. Let me explain the project I am working on..

    I have programmed the Arduino micro controller to animate an RGB LED strip light. I have only a 6v ac supply which I have successfully rectified and added a voltage regulator (I have since found out the Arduino has a regulator but this does not matter to my problem). See image 1 & 2.

    Everything works OK so long as the voltage supply is constant. However my 5.5v supply (after rectification/regulator) when turning off is a gradual fall in voltage and not instantaneous, like when say you unplug a USB supply from your laptop to the Arduino.

    I need to some how be able to switch off the supply voltage in a single moment when it drops below a given voltage value can anyone help me? Also I cannot use a voltage comparator as this requires another power source as a reference which I'm not allowed to have. Suggestions :confused::D
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,669
    804
    Arudino is a set of microcontrollers, so which one are you using?
     
  3. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Using a half-wave rectifier will generally give you....well, less than optimal results, considering power is above 5V a small fraction of the period. That capacitor looks awfully small....what it's it's value?

    Also, the linear regulator you are using (7805?), requires a minimum voltage greater than 6V to regulate the output, known as the drop out voltage.


    You should apply a better power scheme, rather than trying to cope with the crippled one you have, otherwise, you are bound to run into many more problems.

    The Arduino should be able to run at lower voltages (it already is), so you might be able to get a 3V regulator to work.
     
  4. KC8RWR

    New Member

    May 14, 2013
    5
    0
    I would have to agree that a more robust power supply solution would be a good thing here. I would at least use a full wave rectifier. Maybe a large value resistor across the capacitor would help it turn off quicker.

    If you really want a quick and dirty solution though putting the power switch after the regulator would do it. Of course.. then your regulator is constantly running wasting energy as heat. You could solve that with two switches but then you have to remember to always switch off the output of the regulator first and then the input. Or.. you could use a 2-pole switch to shut them both off together.

    Of course, this brings the ac and the dc into close proximity with one another. You might get some 60 or 50hz bleeding into your DC. You might fix that with a bypass capacitor between the switch and ground. If the switch ever failed you might get your AC straight into your Arduino. But that is why it is a dirty solution.
     
  5. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Isn't the problem really that the filter cap takes some time to discharge? If so, you need to short it to ground through a small resistance when you turn the PS off. Attached is a schematic of a power supply that demonstrates this principle. It's also a great little 5V power supply that needs a DC input of at least 7.5 V.
     
  6. edwardholmes91

    Member

    Feb 25, 2013
    181
    18
    The first thing I notice is that you are using a half wave rectifier, it's probably easier if you use something like a bridge rectifier, then put a nice big smoothing capacitor across it. I also notice that you are supplying the voltage regulator with 6V and it's a 5.5V output. Normally you will need more than this to get a reliable output. I seem to recall using 7.5V on a project once with a 5V regulator and that seemed to work ok.
     
  7. MocGames

    Thread Starter New Member

    May 10, 2013
    6
    0
    Thanks for the replies guys. Micro Controller is the Arduino Duemilanove.
    The point is that I cannot use another power supply so this is the challenge I have I need to work with what I have been given and the dynamo is the only place I can power this project .

    I am taking the 5V out from the Ardiuno to the LED strip. I have to use this and not the 9V out because the LED strip will be destroyed with 6V or more. The small capacitor shown is 10uf which I replaced with a 2200uf but this did not help. I am going to try some of the things you suggested and get back to you. again thank you so much for taking the time to respond to me
     
  8. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,669
    804
    Try enabling the brownout detector. This is made to reset the chip anytime the power supply voltage sags below a preset level.
     
  9. CoHPhasor

    New Member

    May 13, 2013
    13
    0
    ^ Kubeek, the BOD is enabled by default depending on the model.
    IF the BOD is enabled my suggestion would be a Zener diode between the source and the Arduino.

    Once the Zener's breakdown voltage is not overcome by the falling source voltage it should disconnect.
     
  10. DerStrom8

    Well-Known Member

    Feb 20, 2011
    2,428
    1,328
    Why not use a small 9v battery?

    As mentioned before, half-wave rectified 6v will not be enough for a couple of reasons, the most obvious is that the regulator has a voltage drop itself. You can lose up to a couple volts, which means you won't have enough left to power your Arduino.

    I'm sorry to say it, but you really don't have much choice in the matter--you need to find a way to get another power source that can actually do what you need it to.
     
  11. MocGames

    Thread Starter New Member

    May 10, 2013
    6
    0
    The power from the dynamo is sufficient enough to power the Arduino through the regulator as we have already seen this, this is not a problem. The problem is as the power fades from the dynamo as it slows down over time it messes with the Arduino electronics, the program freezes resulting in it having to be reloaded. I cannot use another power supply or battery I can only work with the dynamo power. Knowing this can anyone make suggestions? I really do appreciate all of your advice in this matter.
     
  12. DerStrom8

    Well-Known Member

    Feb 20, 2011
    2,428
    1,328
    My question was WHY are you not able to use something else?

    A large capacitor might be enough to fill in for the times that the dynamo slows down, providing it doesn't stay down for too long.
     
  13. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Have you tried measuring the voltage out of your regulator? There it's no way it's 5V.

    As suggested, a full wave rectifier would help, however, your regulator still won't regulate.

    What to you mean the program has to be reloaded? You program it once and it will retain that, for decades unless you erase it(or exceed the memory write cycles).

    The chip has a means to detect a brown out, or a power sag, add kubeek pointed out. You configure this by setting the appropriate fuses for the chip. The fuses are the BODLEVEL fuses listed in the datasheet on page 296- provided you have a 328 chip.
     
  14. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    The number one cause for erratic μC operation is a poor power supply.

    Do you have a .1 μF cap across the power pins of the μC? You should!

    I have already explained how to effect a quick shutdown of the power to your μC. Have you tried it?

    And, as others have posted your rectification and regulation circuit is inadequate.

    Further efforts to solve this issue will likely be fruitless until you solve the power problem.
     
  15. MocGames

    Thread Starter New Member

    May 10, 2013
    6
    0
    Hi all a friend has suggested I try a buck boost circuit using a the chip MCP1640. Could one of you show me a diagram as to how you would do the regulator and rectifier from the dynamo. Thanks all!
     
  16. LDC3

    Active Member

    Apr 27, 2013
    920
    160
    I'm surprised that you all say he needs a larger power supply. What is wrong with a voltage doubler to supply the regulator? Of course he will need twice the current, but he didn't say that would be a problem.
     
  17. DerStrom8

    Well-Known Member

    Feb 20, 2011
    2,428
    1,328
    A voltage doubler requires an AC input, he has DC. Creating a doubler for direct current would require a lot more circuitry and wold be more difficult than just getting a larger power supply.
     
  18. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Why boost your voltage to 5V? The ATMEGA can operate down to 1.8V. You might as well use a lower voltage, and avoid more losses in your design.

    Doing it with a boost would mean losses at the conversion, and more losses in larger resistors used to current limit your LEDs, assuming you aren't using constant current drivers.

    Looking into bridge rectifiers will give you all you need to know....

    http://en.m.wikipedia.org/wiki/Ripple_(electrical)
     
  19. LDC3

    Active Member

    Apr 27, 2013
    920
    160
    He does have AC at 6 V. That is where he is getting the power from.
     
  20. DerStrom8

    Well-Known Member

    Feb 20, 2011
    2,428
    1,328
    Oops, misread that part. Full-wave rectification will probably fix the problem completely.
     
Loading...