Shop OBEX P1 Docs P2 Docs Learn Events
What can cause a propeller chip to freeze and stop working until reset? — Parallax Forums

What can cause a propeller chip to freeze and stop working until reset?

MahonroyMahonroy Posts: 175
edited 2014-12-10 13:52 in Propeller 1
Hey guys,
What hardware related problem can cause a propeller chip to freeze and stop working until the reset pin is pulled low, or the power is cycled?

I was having some interference problems causing my prop chip to reset, and I solved this by making a RC low pass filter across the reset pin - problem solved.

But now I have a separate interference problem (caused by a spark nearby in the room). This causes the propeller chip to stop working until the power is cycled, or until I reset the chip by touching a ground to the reset pin. This is not code related either. I was debugging this by having a separate cog do nothing other than output a counter variable to the screen. As soon as the spark occurs, the counter variable freezes to the screen, and the device does not reboot on its own.

I am using the 0.1uF decoupling capacitors across the VDD pins of the prop chip, and I experimented with using 0.01uF ones instead (nothing helped).

Any ideas? Thanks again guys for all your help.

Comments

  • Clock LoopClock Loop Posts: 2,069
    edited 2014-11-09 19:46
    Tie all legs of the prop to either ground or +3.3v using 1k resistors(or what values work for your pinout).

    Verify bypass caps are very close to prop power pins, add more, of different values.

    Put prop in metal box. (cardboard box wrapped with foil inside and out.) (faraday cage)

    Use opto isolation when using long wires and a prop.

    Use shorter traces/wires on the props crystal. (verify proper crystal capacitance is in use)

    Turn off PLL if you do not need it.
  • MahonroyMahonroy Posts: 175
    edited 2014-11-09 21:36
    Thanks for the reply! I have a couple of questions:

    1. You are referring to the unused I/O pins of the propeller right? Do I want 1 resistor per I/O pin?

    2. How do you accommodate pins 30 and 31? I have these pins running to a header so I can flash the EEPROMS...but otherwise they are open.

    3. I attached 2 images of the box that the board is mounted in. Its aluminum. Do you think its possible for the EMF to be entering through the cutouts in the end-plates (where the screen, buttons, and RJ45 jacks are mounted). Do you think I need to make a shielding plate that goes behind the end plate mounted components that only their wires can pass through?

    4. Do I need to use capacitors on the crystal? I currently do not have any on it, and if so what value? I'm using the standard 5Mhz surface mount version.

    5. Do I need decoupling capacitors on every IC that I am using on the board? (I am using ADC, DAC, opto-coupler, op-amp, and EEPROM). I already have .1uF capacitors on the 3.3 pins of the propeller chip.

    6. I have never heard of PLL before... I started googling it, but have never used it. Is this disabled by default?
    1024 x 576 - 143K
    640 x 360 - 73K
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-11-10 00:10
    Mahonroy wrote: »
    Thanks for the reply! I have a couple of questions:

    1. You are referring to the unused I/O pins of the propeller right? Do I want 1 resistor per I/O pin?

    2. How do you accommodate pins 30 and 31? I have these pins running to a header so I can flash the EEPROMS...but otherwise they are open.

    3. I attached 2 images of the box that the board is mounted in. Its aluminum. Do you think its possible for the EMF to be entering through the cutouts in the end-plates (where the screen, buttons, and RJ45 jacks are mounted). Do you think I need to make a shielding plate that goes behind the end plate mounted components that only their wires can pass through?

    4. Do I need to use capacitors on the crystal? I currently do not have any on it, and if so what value? I'm using the standard 5Mhz surface mount version.

    5. Do I need decoupling capacitors on every IC that I am using on the board? (I am using ADC, DAC, opto-coupler, op-amp, and EEPROM). I already have .1uF capacitors on the 3.3 pins of the propeller chip.

    6. I have never heard of PLL before... I started googling it, but have never used it. Is this disabled by default?

    The photos aren't very clear or detailed, perhaps you could try taking shots just of the board and front panel from different angles and in focus. However there doesn't seem to be any proper connection from the front panel to the box itself, since it's aluminium there is always an oxide on the surface and despite the screws this is not guaranteed to give you that EMI tight shielding you would need. Anyway I hear that you have P30,31 floating as are also other inputs? Well the unused ones are easily fixed just by making them outputs, that simple, but inputs should never ever be left floating on any chip, make sure they have a pullup or pulldown, whichever is appropriate. I always like to pullup the transmit line as well as the receive line because during reset and until software has initialized that line it is floating and all kinds of garbage can spew back over the terminal or programming port. Although you could tie all unused inputs together to the one pullup the problem is that they are only inputs as long as they are not outputs, which they could be at any time there is a glitch or software says so.

    The PLL is that part that takes that 5MHz and converts it up and back down again to 80MHz and it tends to be the most sensitive to damage from "spikes", although those spikes are normally the bad power ground through the Prop ground routing kind.

    The crystal area needs special attention and if you are using the "standard" (why oh why) SMD version they need extra special attention for EMI even from the Prop lines themselves. Ground planes and guard rings. Plenty of direction on this has been given before but you have already made your board so it's a bit late to do much about it now.

    Your ADC should at the very least have a decoupler of it's own but the effectiveness of any decoupler is only as good as the PCB and routing.
  • MahonroyMahonroy Posts: 175
    edited 2014-11-10 08:09
    I attached another photo of the front, and a photo of the board. This was just a prototype board I made for testing, so I have no problem making design changes to it and making another one.

    If you look at the first set of photos, there is a black wire that is bolted to the boards ground, and this is ran up to the front panel and attached to screw that is holding the screen in place. The screw makes good contact with the faceplate since it has the blue anodization machined away and is making actual contact against the aluminum. I wonder if I could use a tad of dialetric grease for good measure? 4 Screws go through the faceplate into the main case, and it *seems to be making a decent connection through the entire case.

    I am going to experiment today by trying to build a shield that goes over the panel mounted components, incase EMF is getting through the faceplate/endplate holes.

    I will tie all un-used pins together, and run them through a 1K resistor to ground. I will take pin 30 and 31, and have each of them get a 10K pullup to the 3.3v line.

    What do you recommend for the crystal and its orientation? I searched around some, but could only find info on people wanting to run higher frequency chips. If you look at the new photo of the board, you can see how I orientated the crystal at the bottom.

    I will also add a 0.1uF decoupler capacitor to the ADC.
    1024 x 576 - 183K
    1024 x 768 - 113K
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-11-11 14:29
    Mahonroy wrote: »
    I attached another photo of the front, and a photo of the board. This was just a prototype board I made for testing, so I have no problem making design changes to it and making another one.

    If you look at the first set of photos, there is a black wire that is bolted to the boards ground, and this is ran up to the front panel and attached to screw that is holding the screen in place. The screw makes good contact with the faceplate since it has the blue anodization machined away and is making actual contact against the aluminum. I wonder if I could use a tad of dialetric grease for good measure? 4 Screws go through the faceplate into the main case, and it *seems to be making a decent connection through the entire case.

    I am going to experiment today by trying to build a shield that goes over the panel mounted components, incase EMF is getting through the faceplate/endplate holes.

    I will tie all un-used pins together, and run them through a 1K resistor to ground. I will take pin 30 and 31, and have each of them get a 10K pullup to the 3.3v line.

    What do you recommend for the crystal and its orientation? I searched around some, but could only find info on people wanting to run higher frequency chips. If you look at the new photo of the board, you can see how I orientated the crystal at the bottom.

    I will also add a 0.1uF decoupler capacitor to the ADC.

    Your project looks good, well done. The HC49 crystal looks fine in this instance as you don't have the problem with I/O lines and lack of shielding but cheap and tiny crystals are plentiful these days although I use 10MHz in all projects without any problems.

    The thing about big DIP packs though is that the chip is still the same chip right smack bang in the center but the lead frame is a point of EMI. The lead frame includes the metal for the pins right down to the edge of the chip where it's wire bonded across. That's why the supply pins and other important signals are closest to the chip. But you have all this in a shielded case and as you mentioned you are looking at shielding the openings too although the actual connections are still vulnerable.

    So I guess you need to ascertain in what manner the Prop is crashing, whether that is the whole chip, or just a cog, which points more to software. So get one of those cogs running and flashing a status LED which is always a good thing to have in any system, otherwise how can you tell it itself is working sometimes? Havng a status LED on the SCL line is handy because it even tells you that it is booting normally even before you can run any software etc.
  • MahonroyMahonroy Posts: 175
    edited 2014-11-26 08:05
    I was able to resolve this issue.

    The problem was that the interference was coming through the wall wart. The further away the wall wart plug was from the interference, the more likely it was to not lock up. I placed a filtering capacitor across the power input as soon as the power went inside the box and the problem is gone! I can now place this box, as well as the wall wart, right next to the spark and it will not malfunction. The only way I could get it to malfunction was to wrap the wall wart wires around the cable that generates the spark... so I think I can safely say that its fixed within reason.
    I also went ahead and fixed my other circuit problems as well (e.g. grounded the box better, tied down un-used pins, added decoupling capacitors to every IC). I already had decoupling capacitors right next to the propeller chip for power, short lines running from the crystal, and had a RC filter + pull up resistor across the reset pin, so I think between all of the above, you can be pretty safe from EMI/EMF.

    Thanks for the help!
  • MahonroyMahonroy Posts: 175
    edited 2014-12-08 16:15
    So periodically I still get the propeller chip to lock up, and I am wondering if there are some more things I can add to make this more robust?

    The 0.0047 uF capacitor is supposedly what is used to counter this specific kind of interference. I am wondering if I should add some more capacitors to the power input (different capacitance... so I can filter more of a wide range of interference)? For example, should I shoot for 300% above, and 300% below? E.g. Should I add in a 0.014 uF capacitor and a 0.0015 capacitor to go along with my 0.0047 capacitor that's currently in there? Is there a more appropriate number other than 300% for this?
  • tonyp12tonyp12 Posts: 1,951
    edited 2014-12-08 16:51
    What power supply are you using?, does it need a minimum current draw to stay active/regulated?

    Do you have a scan of the pcb trace etching?, are you avoiding any Daisy chain of power traces and gnd?

    As to not starve the MCU of power at any time, run its power source through a schottky-diode (or high value uH power inductor) and then a 100uF capacitor for backup power while main circuit suffer brown-outs.
  • MahonroyMahonroy Posts: 175
    edited 2014-12-08 17:10
    tonyp12 wrote: »
    What power supply are you using?, does it need a minimum current draw to stay active?

    Do you have a scan of the pcb trace etching?, are you avoiding any Daisy chain of power traces and gnd?

    As to not starve the MCU of power at any time, run its power source through a schottky-diode or high value uH power inductor and then a 100uF capacitor for backup power while main circuit suffer brown-outs.

    I am using a +15v 700mA wall wort. This goes into a +5 switching voltage regulator, here is the link:
    http://www.mouser.com/ProductDetail/RECOM/R-78E50-05/?qs=%2fha2pyFadujvXZGDjedzLulC%252bswgmkLNQmyR7iLVlIGE2dQHyGzfGg%3d%3d

    I attached a diagram showing the power (the only thing missing from the diagram is the 0.0047 uF capacitor which is attached to the +15v line). The FB symbol is a Ferribe Bead and the FDLL4148 is a diode, here is the link to that one:
    http://www.mouser.com/ProductDetail/Fairchild-Semiconductor/FDLL4148/?qs=sGAEpiMZZMtoHjESLttvkoBU6cp6%252bZs9wQI0Ie78FMg%3d
    1024 x 307 - 41K
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-12-08 17:17
    Looking at the photos I'm wondering where the heck the 3.3V regulator is situated and what type it might be, I always like to keep it tight with the CPU. But looking at those cables that run from the back of the board all the way to the front is a tut-tut as you also have your relays sitting right beside them.

    Anyway, a lot of this is just guessing for us because although you've shared a couple of photos we just don't have any idea about the circuit etc. Personally I think that if you are worried about someone copying your circuit then you shouldn't be because anyone who wants to compete will do it anyway and their way.
  • MahonroyMahonroy Posts: 175
    edited 2014-12-08 23:15
    Here is the 3.3V regulator that I'm using:
    http://www.mouser.com/ProductDetail/Diodes-Incorporated/AZ1117D-33TRE1/?qs=%2fha2pyFaduhVsYvw8V7yKDVonnmFlWxloYdZVlYmAhphETUXqM7LuCqNMsjCu5K%2f

    Do you think there might be a better part to be using?

    If you look at the photo above... there are 4 pin headers (green) towards the top of the board. The 3.3V regulator is mounted right underneath those headers (slightly more to the right though). Its surface mount.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-12-08 23:52
    Mahonroy wrote: »
    Here is the 3.3V regulator that I'm using:
    http://www.mouser.com/ProductDetail/Diodes-Incorporated/AZ1117D-33TRE1/?qs=%2fha2pyFaduhVsYvw8V7yKDVonnmFlWxloYdZVlYmAhphETUXqM7LuCqNMsjCu5K%2f

    Do you think there might be a better part to be using?

    If you look at the photo above... there are 4 pin headers (green) towards the top of the board. The 3.3V regulator is mounted right underneath those headers (slightly more to the right though). Its surface mount.

    So that's it on the far end of the board from the CPU? It's always best to use tantalums for these LDOs and recommended to keep them close to the regulator to prevent instabilities as they aren't as fast as standard regs. I prefer to use small LDOs that only require 1uF ceramic and then maybe I might use more than one. The particular one you chose has a very poor dropout of around 1V although this doesn't seem to be a problem in conjunction with the 5V switcher. IMO electrolytics are fine for 100uF and up but for PSUs with smaller values you need caps that have a lower ESR and inductance. In fact looking at the datasheet on page 11 under ripple rejection it sets the condition with a 22uF tantalum. I normally just use MCP1700 devices (mostly SOT-89) with 1uF ceramics, much cheaper and more compact, faster transient response etc. Dropout is max of 178mV and max current is 250ma but you never need anything close to that normally otherwise throw in another reg for whatever's hogging it.

    Here's a shot of a PCB with a MCP1700 + ceramics next to a 5V switcher module (background) and it's proximity to the Prop.
    LDOREG.png
    491 x 505 - 391K
  • ErNaErNa Posts: 1,752
    edited 2014-12-09 01:46
    Is the shielding box insulated from the circuit or is there a connection? (galvanic or by capacitor)
  • MahonroyMahonroy Posts: 175
    edited 2014-12-09 08:56
    So that's it on the far end of the board from the CPU? It's always best to use tantalums for these LDOs and recommended to keep them close to the regulator to prevent instabilities as they aren't as fast as standard regs. I prefer to use small LDOs that only require 1uF ceramic and then maybe I might use more than one. The particular one you chose has a very poor dropout of around 1V although this doesn't seem to be a problem in conjunction with the 5V switcher. IMO electrolytics are fine for 100uF and up but for PSUs with smaller values you need caps that have a lower ESR and inductance. In fact looking at the datasheet on page 11 under ripple rejection it sets the condition with a 22uF tantalum. I normally just use MCP1700 devices (mostly SOT-89) with 1uF ceramics, much cheaper and more compact, faster transient response etc. Dropout is max of 178mV and max current is 250ma but you never need anything close to that normally otherwise throw in another reg for whatever's hogging it.

    Here's a shot of a PCB with a MCP1700 + ceramics next to a 5V switcher module (background) and it's proximity to the Prop.
    LDOREG.png

    Ok great, I will happily try out a new regulator. I found this:
    http://www.mouser.com/ProductDetail/Microchip-Technology/MCP1700T-3302E-TT/?qs=sGAEpiMZZMsGz1a6aV8DcOAsZlYjMPgHQ77X2jgUeNU%3d
    And just to be clear... you are saying I should go with a 1uF capacitor (ceramic or tantalum) on the input and output of this regulator? Should I also decouple this regulator with the 0.0047 uF capacitor I mentioned earlier?
    ErNa wrote: »
    Is the shielding box insulated from the circuit or is there a connection? (galvanic or by capacitor)

    I have a ground wire attached to the front face plate and to the rear face plate. I have these ground wires connect to the ground of the circuit board. 8 Screws are used to connect the face plates to the main body of the box, so it should be making a decent connection.
  • tonyp12tonyp12 Posts: 1,951
    edited 2014-12-09 09:22
    There is probably nothing wrong with the LDO you have,
    all data sheets say what (minimum) caps is recommended and many are happy with 4.7uF ceramic caps on both input and output.

    But as a beginner you are probably doing a handful of pcb design flaws. (electricity flows just like water in pipes)
    1: If device uses relay or motors, run separate thin (0.6mm) power and gnd traces from the barrel connector to the 3.3v LDO/mcu-power-net
    2: Don't share ground plane with the noisy part, draw keep-out-lines if you use a single copper pour.
    3: Make sure mcu is never short on power, a diode,inductor or even a 20ohm resistor (to stop/reduce backflow) and then a larger cap can supply mS of power when needed.
    4: If auto-reset is a must, use a LDO with PG (power good) and tie PG to MCU-reset example: http://www.mouser.com/ProductDetail/ON-Semiconductor/NCP752BSN33T1G/?qs=sGAEpiMZZMsGz1a6aV8DcOCDNdiWGbmRhNR9l2I58oU%3d
    or http://www.mouser.com/ProductDetail/Texas-Instruments/TPS76633DR/?qs=sGAEpiMZZMsGz1a6aV8DcPXeWoVS0Fnz54VPBawWBH4%3d
  • ErNaErNa Posts: 1,752
    edited 2014-12-09 12:29
    In this case it might help to see the schematic. How are the relays driven, is there a freewheeling diode? It is somehow like a puzzle, so everyone is keen to find out, what's going on.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-12-09 12:44
    Mahonroy wrote: »
    Ok great, I will happily try out a new regulator. I found this:
    http://www.mouser.com/ProductDetail/Microchip-Technology/MCP1700T-3302E-TT/?qs=sGAEpiMZZMsGz1a6aV8DcOAsZlYjMPgHQ77X2jgUeNU%3d
    And just to be clear... you are saying I should go with a 1uF capacitor (ceramic or tantalum) on the input and output of this regulator? Should I also decouple this regulator with the 0.0047 uF capacitor I mentioned earlier?



    I have a ground wire attached to the front face plate and to the rear face plate. I have these ground wires connect to the ground of the circuit board. 8 Screws are used to connect the face plates to the main body of the box, so it should be making a decent connection.

    Just to be clear, I'm talking about two related things, your design, and design choices. For instance, the choice of regulator you used, what was it based on and did you compare regulators and characteristics?

    I'm not sure if it will help now to change that part as it's the pcb layout that really needs to be addressed though.

    However, the thing is we are just trying to help you work out how to fix your existing problem but as we have said it's a guessing game. You dole out a clue or two and let us guess. That's normally called a game. Why not put your cards on the table and show us your hand. This goes for the software too as it is all too easy to blame the hardware when software is all too often "naive" in that it expects the real world to go perfectly, it doesn't. So your software needs to check and verify signals, handle timeouts etc, extricate itself from lockup conditions, report debug information and how many times it's been reset etc,.
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-12-09 14:05
    You have been getting good advice.
    Here are a few things to add/reinforce...

    Better to make unused inputs as outputs. Then you can leave them floating, and you have the possibility of using them later, and uses less parts.
    Yes, tie P30 & P31 via 10K pullups. I also tie Reset via a 10K pullup on most projects - I don't use an RC circuit although some have found this useful.

    Try a bulk capacitor (10uF Tantalum is a good choice) close to the props power/ground pins.
    Are your 3V3 and GND pins to both sides of the prop short. I mean here, do they go directly across under the prop chip? They should not go around the outside of the chip.
    If not, put joining wires across the VCC pins and also the GND pins. Is BOE tied low?

    Your relays could also be a source of interference. We need to see the circuit and pcb sections for power, snubber diodes, etc.

    BTW your ADC chips are especially going to require good decoupling and bulk capacitance too.

    The xtal should be ~18-20pF. Peter & I prefer to use HC49US (thru hole) unless using the miniature smt parts. They take less space and are easier to provide a guard ring ground.
  • MahonroyMahonroy Posts: 175
    edited 2014-12-09 14:10
    Thanks again for all of the help. I will provide a good schematic soon, I am just making some revisions to it.
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-12-09 14:18
    Forgot..

    You have way too much capacitance between those regulators.

    Remove C1, C11. The 5V switcher has internal caps. C3 (4.7uF) is fine - a 10uF Tantalum would be better, and a 0.1uF X7R across it would be nice.

    Remove C2. Again C15 as 10uF Tantalum and 0.1uF X7R would be better.

    Remove C10. C6 needs to be higher voltage 25V or 35V as your powerpack is likely to output much higher than the specified value (presuming its unregulated). C6 = 100-470uF should be fine unless your relays are drawing a lot of power. Remember, we don't know what the relays are switching on the secondary side!! C14 would be better as 47uF 35V tantalum and 0.1uF X7R across it.

    D3 is 1N4148 equivalent and is a signal diode. This should be a power diode like 1N4001-1N4004 or smt equivalent.
  • MahonroyMahonroy Posts: 175
    edited 2014-12-09 21:50
    Cluso99 wrote: »
    Forgot..

    You have way too much capacitance between those regulators.

    Remove C1, C11. The 5V switcher has internal caps. C3 (4.7uF) is fine - a 10uF Tantalum would be better, and a 0.1uF X7R across it would be nice.

    Remove C2. Again C15 as 10uF Tantalum and 0.1uF X7R would be better.

    Remove C10. C6 needs to be higher voltage 25V or 35V as your powerpack is likely to output much higher than the specified value (presuming its unregulated). C6 = 100-470uF should be fine unless your relays are drawing a lot of power. Remember, we don't know what the relays are switching on the secondary side!! C14 would be better as 47uF 35V tantalum and 0.1uF X7R across it.

    D3 is 1N4148 equivalent and is a signal diode. This should be a power diode like 1N4001-1N4004 or smt equivalent.

    Yeah I had all those capacitors because I was originally using a 4.3 volt brown out detector... when the device lost power, it would save all of the settings to the eeprom before completely shutting down. I just recently scrapped it, so I will be getting rid of some of the extra capacitance.
    Do you use the X7R capacitors in parallel just like how I have the others wired up? Does it matter if I use tantalum's or not? I've been reading mixed things about using them or not.

    I also came across this regulator that looked interesting:
    http://www.pinkfishmedia.net/forum/showthread.php?t=36174
    I'm trying to make sense of all that is going on, and if it (or part of it) might be useful.

    Thanks for the tip on the diode, I will definitely switch it out.

    Can a Zener Diode play a role with any of this by the way? Would it make a good filter along with the ferrite bead and capacitors?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-12-09 22:10
    Mahonroy wrote: »
    Yeah I had all those capacitors because I was originally using a 4.3 volt brown out detector... when the device lost power, it would save all of the settings to the eeprom before completely shutting down. I just recently scrapped it, so I will be getting rid of some of the extra capacitance.
    Do you use the X7R capacitors in parallel just like how I have the others wired up? Does it matter if I use tantalum's or not? I've been reading mixed things about using them or not.

    I also came across this regulator that looked interesting:
    http://www.pinkfishmedia.net/forum/showthread.php?t=36174
    I'm trying to make sense of all that is going on, and if it (or part of it) might be useful.

    Thanks for the tip on the diode, I will definitely switch it out.

    Can a Zener Diode play a role with any of this by the way? Would it make a good filter along with the ferrite bead and capacitors?

    If you are going to do a brown-out detect and you have access to the actual supply voltage then this is always where you should connect to. There is way more headroom when you detect 9V on a 12V supply that is still going to be regulating for a lot longer than the 5V that is already dropping badly although I have already shared my thoughts on power-fail detect.

    Forget about that regulator link, it ain't what you want, it was built for a specific audio need, and the ones I mentioned are more than capable. Are we both trying to guess what filter magic a zener possesses? Your 1N4148 is really a signal diode but they are general-purpose and able to handle the small amount of current of your supply although as Cluso mentioned, just use a power diode.

    You will always read conflicting reports about everything, which is normal, but unless you have some knowledge you won't know if it does or doesn't really apply to the way you would use tantalums. Tantalums are specified for your regulator, use them.

    Ferrite beads will only be good for the really high frequencies, not the spikes. Run a separate cable from the battery and the simple diode cap filter and you should be right.
  • MahonroyMahonroy Posts: 175
    edited 2014-12-10 08:50
    Run a separate cable from the battery and the simple diode cap filter and you should be right.
    What do you mean by a separate cable from the battery?
  • tonyp12tonyp12 Posts: 1,951
    edited 2014-12-10 09:41
    If you need 1second of head start to know that power is too low or gone, when you need a schottky diode and LARGE cap to power the MCU and eeprom
    The MCU then would use PG from a LDO or a resistor voltage divider to a mcu-input pin to monitor the voltage that is coming in on a location before the Diode.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-12-10 13:52
    Mahonroy wrote: »
    What do you mean by a separate cable from the battery?
    If the power for the logic is derived directly from the battery via its own cable then it is less likely to suffer the voltage drops and noise that will definitely be present on the cable powering the motors. Since the cable powering the logic does not carry much current especially since you are using a 5V switcher, you can use a lighter gauge cable, even a shielded cable. Remember if your logic draws say 150ma at 5V then this means that it is drawing about half of that from the 12V supply because of the switcher. There is also less reliance on the diode+cap filter as the battery voltage itself will be relatively stable.
Sign In or Register to comment.