Re: [Emc-users] Watchdog Sizing

2010-12-08 Thread John Kasunich
On 4 December 2010 00:46, Kirk Wallace kwall...@wallacecompany.com
wrote:
 
 I'm working on using an ATtiny to watch EMC2's charge pump.

Why not use a charge pump circuit to watch the charge pump signal?

That is what it was designed for, and is probably the most fail-safe
solution.  The timeout period is set by the capacitors and resistors
you choose, and can't get accidentally changed or disabled.

A charge pump circuit consists of two diodes, one small capacitor
(a few hundred pF or a few nF), one medium capacitor (a few tens
of nF), and a resistor.  Also needed is something to look at its
output and turn off the dangerous stuff if the output drops too low.
That can be as simple as a transistor driving a relay coil, or you
could use a schmidt trigger input logic gate followed by whatever
you need to drive.

No microcontroller, no programming, no configuration, no bits.
Analog lives!

John Kasunich

-- 
  John Kasunich
  jmkasun...@fastmail.fm


--
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-08 Thread Roland Jollivet
I was wondering, can a fault ever occur with EMC where the frequency of the
charge pump frequency increases?? This would keep the charge pump detector
'up', but a uP would detect an error condition.

Regards
Roland


On 8 December 2010 20:53, John Kasunich jmkasun...@fastmail.fm wrote:

 On 4 December 2010 00:46, Kirk Wallace kwall...@wallacecompany.com
 wrote:
 
  I'm working on using an ATtiny to watch EMC2's charge pump.

 Why not use a charge pump circuit to watch the charge pump signal?

 That is what it was designed for, and is probably the most fail-safe
 solution.  The timeout period is set by the capacitors and resistors
 you choose, and can't get accidentally changed or disabled.

 A charge pump circuit consists of two diodes, one small capacitor
 (a few hundred pF or a few nF), one medium capacitor (a few tens
 of nF), and a resistor.  Also needed is something to look at its
 output and turn off the dangerous stuff if the output drops too low.
 That can be as simple as a transistor driving a relay coil, or you
 could use a schmidt trigger input logic gate followed by whatever
 you need to drive.

 No microcontroller, no programming, no configuration, no bits.
 Analog lives!

 John Kasunich

 --
  John Kasunich
  jmkasun...@fastmail.fm



 --
 This SF Dev2Dev email is sponsored by:

 WikiLeaks The End of the Free Internet
 http://p.sf.net/sfu/therealnews-com
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users

--
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-08 Thread sam sokolik
actually - really?  we could get it - just paying for your time?

thanks
sam

On 12/8/2010 1:25 PM, Roland Jollivet wrote:
 I was wondering, can a fault ever occur with EMC where the frequency of the
 charge pump frequency increases?? This would keep the charge pump detector
 'up', but a uP would detect an error condition.

 Regards
 Roland


 On 8 December 2010 20:53, John Kasunichjmkasun...@fastmail.fm  wrote:

 On 4 December 2010 00:46, Kirk Wallacekwall...@wallacecompany.com
 wrote:
 I'm working on using an ATtiny to watch EMC2's charge pump.
 Why not use a charge pump circuit to watch the charge pump signal?

 That is what it was designed for, and is probably the most fail-safe
 solution.  The timeout period is set by the capacitors and resistors
 you choose, and can't get accidentally changed or disabled.

 A charge pump circuit consists of two diodes, one small capacitor
 (a few hundred pF or a few nF), one medium capacitor (a few tens
 of nF), and a resistor.  Also needed is something to look at its
 output and turn off the dangerous stuff if the output drops too low.
 That can be as simple as a transistor driving a relay coil, or you
 could use a schmidt trigger input logic gate followed by whatever
 you need to drive.

 No microcontroller, no programming, no configuration, no bits.
 Analog lives!

 John Kasunich

 --
   John Kasunich
   jmkasun...@fastmail.fm



 --
 This SF Dev2Dev email is sponsored by:

 WikiLeaks The End of the Free Internet
 http://p.sf.net/sfu/therealnews-com
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users

 --
 This SF Dev2Dev email is sponsored by:

 WikiLeaks The End of the Free Internet
 http://p.sf.net/sfu/therealnews-com
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


--
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-08 Thread Stephen Wille Padnos
Roland Jollivet wrote:
 I was wondering, can a fault ever occur with EMC where the frequency of the
 charge pump frequency increases?? This would keep the charge pump detector
 'up', but a uP would detect an error condition.

It seems unlikely.

The most likely effect of a software problem will be a crash.  This 
would most likely cause pulses to stop, not to speed up.

There is now a watchdog HAL component, which can monitor heartbeats from 
other modules (not that any other modules currently output such a 
heartbeat), and which will disable its output if any heartbeat stops.  
This would cause situations where some userspace modules die, but the 
realtime kernel keeps running, to still cause a fault.  (As it is, if RT 
is running, the heartbeat will be output, regardless of whether e.g. the 
GUI has crashed)

- Steve

--
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-08 Thread Slavko Kocjancic



S, Roland Jollivet piše:
 I was wondering, can a fault ever occur with EMC where the frequency of the
 charge pump frequency increases?? This would keep the charge pump detector
 'up', but a uP would detect an error condition.

 Regards
 Roland


NE567 can solve that too...


--
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-08 Thread Kirk Wallace
On Wed, 2010-12-08 at 13:53 -0500, John Kasunich wrote:
 On 4 December 2010 00:46, Kirk Wallace kwall...@wallacecompany.com
 wrote:
  
  I'm working on using an ATtiny to watch EMC2's charge pump.
 
 Why not use a charge pump circuit to watch the charge pump signal?
 
 That is what it was designed for, and is probably the most fail-safe
 solution.  The timeout period is set by the capacitors and resistors
 you choose, and can't get accidentally changed or disabled.
 
 A charge pump circuit consists of two diodes, one small capacitor
 (a few hundred pF or a few nF), one medium capacitor (a few tens
 of nF), and a resistor.  Also needed is something to look at its
 output and turn off the dangerous stuff if the output drops too low.
 That can be as simple as a transistor driving a relay coil, or you
 could use a schmidt trigger input logic gate followed by whatever
 you need to drive.

This is what I have from the last time I played with the above type of
circuit (sourced by JK?):
http://www.wallacecompany.com/machine_shop/Shizuoka/watchdog-1b.png 

It worked on my breadboard but didn't work when I transferred it to a
PCB. Other things came up and I didn't get back to fixing it.

 No microcontroller, no programming, no configuration, no bits.
 Analog lives!
 
 John Kasunich

The analog method is probably more practical, but the digital solution
may be viable too. It may be possible to do this with very few
components (Vregulator, cap or two, ATtiny2313), at the same cost and
have more flexibility (wide charge pump frequency range, learning mode,
different fault responses, complex WD signal). I'm still playing with
it, and for me the programming hurdle is pretty high, so who knows what
the result might be.

For someone needing a one-off circuit for a particular machine, the
analog circuit above is probably the quickest solution. Especially, if
there were(was?) a widget or cloud app that one could use to calculate
the part values and model performance (Spice? but that is another
unfilled time sink).

-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-08 Thread John Kasunich


On Wed, 08 Dec 2010 12:15 -0800, Kirk Wallace
kwall...@wallacecompany.com wrote:

 This is what I have from the last time I played with the above type of
 circuit (sourced by JK?):
 http://www.wallacecompany.com/machine_shop/Shizuoka/watchdog-1b.png 
 
 It worked on my breadboard but didn't work when I transferred it to a
 PCB. Other things came up and I didn't get back to fixing it.

A few things come to mind looking at that circuit.

1) Using a schmidt input gate (the 74LS14) is good, but I would use a
CMOS input gate like a 74HC14.  That way the loading on the pump can
be ignored, and you can use much larger resistors and smaller caps.

2) The caps seem very large.  When I see microfarads, I think electro-
lytics, which have sloppy tolerances, high leakage current, and are
polarized.  This is the kind of circuit that wants to use film or
ceramic caps.  I would design it with the output cap (C3) as 0.1uF
or maybe 1uF if I had that value laying around in ceramic or film.

3) The pump caps (C1 and C2) should be 10 to 100 times smaller than
the output cap.  You don't want a single pulse on the input to be 
able to transfer a significant amount of charge to the output - it
should take many pulses to charge the output.

4) The time constant of the load resistor (R5) and the output cap
(C3) is what determines how long it will take to drop out after
the input stops pulsing.  It should be much longer than the input
period, but short enough to be safe.  For a 1kHz input, I'd probably
aim for 100mS.  With a 0.1uF output cap, that is a 1 meg R5... hence
the desire for a CMOS input.

5) I worry a bit about the extra stage.  The classic charge pump
circuit has only two diodes and one pump cap.  Imagine the circuit
as drawn, with IC1C and C2 removed, and D3 shorted.  That version
produces an output voltage that is always a little less than the
output swing of IC1F minus two diode drops, which ensures that the
input to IC1A is always lower than it's power supply rail.  The
version shown, with three diodes and two pump caps, can produce
an output that approaches twice the IC1 output swing minus three
diode drops.  That exceeds the input rating of IC1A.  The above
statements are based on CMOS logic, where output swings are nearly
rail-to-rail, and inputs are high impedance.  With the LS family
logic, you probably get a lot less output but the circuit is much
harder to analyze in detail.

 The analog method is probably more practical, but the digital
 solution may be viable too.

Of course there are many ways to solve the problem.

 It may be possible to do this with very few
 components (Vregulator, cap or two, ATtiny2313), at the same cost and
 have more flexibility (wide charge pump frequency range, learning mode,
 different fault responses, complex WD signal).

The parts count may be similar, but the complexity is not.  All of
those features add complexity.  The more complex something is, the
more likely it is to contain un-anticipated failure modes, or just
plain outright bugs.  ANY software or firmware dramatically
increases the complexity.

 I'm still playing with
 it, and for me the programming hurdle is pretty high, so who knows what
 the result might be.
 
 For someone needing a one-off circuit for a particular machine, the
 analog circuit above is probably the quickest solution. Especially, if
 there were(was?) a widget or cloud app that one could use to calculate
 the part values and model performance (Spice? but that is another
 unfilled time sink).

It isn't that complicated.  A 0.1uF output cap (C3) will work for
the frequencies and delays we are interested in with EMC.  Choose
the output time constant and pick the R5 accordingly: R5 = T / C3.
The pump cap(s) C1 (and C2, if using the two stage design) should
be no more than 1/10 of C3, so 0.01uF (10nF) maximum.  If you make
them too small, you won't get enough output voltage.  I'd probably
start with 1nF, and increase if needed.  The higher the charge pump
frequency in relation to the output time constant, the smaller the
pump caps can be.  If you are pumping at 1kHz and the output time
constant is 100mS, 1nF might be too small.  If pumping at 10kHz,
it should work fine.

I guess in the end it depends on what you are familiar with.  I
can design the analog circuit in a few minutes, build a perfboard
version in 20 minutes, and test it within an hour of starting.
It would take me several times that long to get a microcontroller
development system running to the point of being able to write
and execute even the simplest program.  Other people probably have
the exact opposite situation.

John
-- 
  John Kasunich
  jmkasun...@fastmail.fm


--
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net

Re: [Emc-users] Watchdog Sizing

2010-12-08 Thread Kirk Wallace
On Wed, 2010-12-08 at 15:53 -0500, John Kasunich wrote:
... snip
 It isn't that complicated.  A 0.1uF output cap (C3) will work for
 the frequencies and delays we are interested in with EMC.  Choose
 the output time constant and pick the R5 accordingly: R5 = T / C3.
... snip

Thank you John. I really appreciate the time you take to help. Using
your information above, I redrew the schematic, which I'll revise as I
go. It's at the bottom of the page here:
http://www.wallacecompany.com/machine_shop/Shizuoka/ 

-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-08 Thread Erik Christiansen
On Wed, Dec 08, 2010 at 07:00:27PM -0800, Kirk Wallace wrote:
 
 Thank you John. I really appreciate the time you take to help. Using
 your information above, I redrew the schematic, which I'll revise as I
 go. It's at the bottom of the page here:
 http://www.wallacecompany.com/machine_shop/Shizuoka/ 

Kirk, apropos the comment there that it's not quite clear how the charge
pump works, does it help at all, just for a more physical visualisation,
to imagine C1 as a liquid pump's cylinder, with the top plate being the
piston, driven up and down by IC1A, and D1  D2 as fluid non-return
valves? C2 is the reservoir into which this pump is pumping positive
charge [1]. If C1 isn't driven up and down, charge isn't going to flow
out of ground to C2, and its charge decays through R2.

The only change I'd make to the circuit is to connect R1 to +5v, so that
the default state of IC1A output is low. That is because a capacitor is
more likely than not to go short circuit in the rare event that it
fails. That would give a false OK, in the absence of input. (It'll
work fine as-is if there's no component failure.)

Dunno if my attempt to paint a picture really ended up less laboured,
and more descriptive that going through it in purely electronic terms,
but we can always do that if this attempt isn't as clear as it should
be.

Erik

[1] While it's electrons going the other way really, it's more
convenient to discuss positive charge when talking about
accumulating a positive voltage.

--
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-08 Thread Slavko Kocjancic
S, Erik Christiansen piše:
 On Wed, Dec 08, 2010 at 07:00:27PM -0800, Kirk Wallace wrote:
 Thank you John. I really appreciate the time you take to help. Using
 your information above, I redrew the schematic, which I'll revise as I
 go. It's at the bottom of the page here:
 http://www.wallacecompany.com/machine_shop/Shizuoka/
 Kirk, apropos the comment there that it's not quite clear how the charge
 pump works, does it help at all, just for a more physical visualisation,
 to imagine C1 as a liquid pump's cylinder, with the top plate being the
 piston, driven up and down by IC1A, and D1  D2 as fluid non-return
 valves? C2 is the reservoir into which this pump is pumping positive
 charge [1]. If C1 isn't driven up and down, charge isn't going to flow
 out of ground to C2, and its charge decays through R2.

 The only change I'd make to the circuit is to connect R1 to +5v, so that
 the default state of IC1A output is low. That is because a capacitor is
 more likely than not to go short circuit in the rare event that it
 fails. That would give a false OK, in the absence of input. (It'll
 work fine as-is if there's no component failure.)

 Dunno if my attempt to paint a picture really ended up less laboured,
 and more descriptive that going through it in purely electronic terms,
 but we can always do that if this attempt isn't as clear as it should
 be.

 Erik
Maybe you have just too little current in output. So just route unused 
gates paralel to last one. (pins 1,3,5,9 together and pins 2,4,6,8 together)

--
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-06 Thread Roland Jollivet
If the pulse from EMC or any other program is consistent, then your circuit
only needs one little tactile switch. If you press this switch, the micro
will go into learn mode and time the interval between pulses from EMC. If
can now add a +/- 10% or whatever margin and flag the alarm outside that.

Regards
Roland


On 4 December 2010 00:46, Kirk Wallace kwall...@wallacecompany.com wrote:

 I'm working on using an ATtiny to watch EMC2's charge pump. The plan is
 to have a count down that gets reset by a charge pump edge. If the
 counter reaches 0, then an alarm pin gets set. The counter reset value
 determines how long the charge pump has to do a reset. I can write code
 with the appropriate value, but if I wanted to make the watchdog watcher
 generic, I should have a way for a user to make the setting on the fly.
 My problem is that I can do this with a dip switch, potentiometer,
 serial or SPI link, or some other way I haven't thought of yet. Does
 anyone have any thoughts on what would be a good way to do this? The
 primary purpose for the watcher is to keep the motor drivers powered
 down until the PC boots and EMC2 is running.
 --
 Kirk Wallace
 http://www.wallacecompany.com/machine_shop/
 http://www.wallacecompany.com/E45/index.html
 California, USA



 --
 Oracle to DB2 Conversion Guide: New IBM DB2 features make compatibility
 easy.
 Learn about native support for PL/SQL, new data types, scalar functions,
 improved concurrency, built-in packages, OCI, SQL*Plus, data movement
 tools,
 best practices and more - all designed to run applications on both DB2 and
 Oracle platforms. http://p.sf.net/sfu/oracle-sfdev2dev
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users

--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-05 Thread Slavko Kocjancic
S, Erik Christiansen piše:
 On Sat, Dec 04, 2010 at 09:04:54AM -0800, Kirk Wallace wrote:
 Then I got to thinking about what Slavko mentioned previously,
 about this is a safety device and I should think in terms of how it
 could fail.
 So long as the microcontroller's on-board watchdog is enabled, you have
 a watchdog watchdog to provide recovery from a soft error.

 When driving a critical output, you can add a pull-[up|down] resistor, to
 maintain the desired default state during power-up and any reset applied
 by the on-board watchdog.

 Erik
That's funn... If you already have watchdog (hardware) to keep ATtiny 
RESET good why do you need that MCU at all?!? Seems nonsense for me.

I don't hate MCU's. I use it a lot. But in places where they (I think) 
are needed. And Watchdog of that kind is surely not good idea.

But someone on forum say's something about PLL. That can be good idea 
too. There are some tondecoder PLL's like NE567. Cheap 8 pin DIL chip 
and two resistor's and one cap can solve that problem perfectly. You 
just need to do software chargepump at servo rate (1ms for example) and 
got 500Hz output for PLL. That's seems ideal too for me. Can't triger on 
wrong pulses and react fast.

Slavko.

--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-05 Thread Kirk Wallace
On Sun, 2010-12-05 at 09:44 +0200, Slavko Kocjancic wrote:
... snip
 That's funn... If you already have watchdog (hardware) to keep ATtiny 
 RESET good why do you need that MCU at all?!? Seems nonsense for me.

I think because the MCU is used to validate EMC2 before powering up the
dangerous bits of the machine. The MCU's internal watchdog validates the
MCU itself(?), which is a separate function. I need to read the MCU
manual to see what features come with the using the watchdog. I suppose
EMC2 could be used to validate the MCU, but things are getting
complicated.

 I don't hate MCU's. I use it a lot. But in places where they (I think) 
 are needed. And Watchdog of that kind is surely not good idea.
 But someone on forum say's something about PLL. That can be good idea 
 too. There are some tondecoder PLL's like NE567. Cheap 8 pin DIL chip 
 and two resistor's and one cap can solve that problem perfectly. You 
 just need to do software chargepump at servo rate (1ms for example) and 
 got 500Hz output for PLL. That's seems ideal too for me. Can't triger on 
 wrong pulses and react fast.
 
 Slavko.

The reason I am leaning toward the ATtiny is that I have a guess in how
to make it work and the parts cost and count is the same or less than
other methods I've looked at. Most methods have merit. If I take the
time to learn how an NE567 works (likely), I may go with that. It would
save me having to figure out the software. Ideally, I suppose I should
build and test a few different designs, which would most likely result
in more changes.
-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-05 Thread Erik Christiansen
On Sun, Dec 05, 2010 at 01:40:58AM -0800, Kirk Wallace wrote:
 On Sun, 2010-12-05 at 09:44 +0200, Slavko Kocjancic wrote:
 ... snip
  That's funn... If you already have watchdog (hardware) to keep ATtiny 
  RESET good why do you need that MCU at all?!? Seems nonsense for me.
 
 I think because the MCU is used to validate EMC2 before powering up the
 dangerous bits of the machine. The MCU's internal watchdog validates the
 MCU itself(?), which is a separate function. I need to read the MCU
 manual to see what features come with the using the watchdog. I suppose
 EMC2 could be used to validate the MCU, but things are getting
 complicated.

Hmmm, its seems Slavko read right past microcontroller's on-board
watchdog in my post. :-)

Yes, the ATtiny's watchdog is on-chip, so the quandary doesn't arise.
I wouldn't trust a microcontroller in any critical role, without a
hardware supervisor. On an AVR, it has it's own clock, so even if the CPU
clock dies, the watchdog reset will tri-state port pins.

That is why a pull-[up|down] to a safe state is helpful on a port pin.
It takes over in reset scenarios.

The watchdog improves the reliability of the microcontroller by
providing recovery from soft errors, whether caused by extreme
transients or alpha particles.

However, the ATtiny's watchdog is best enabled only after its program
has been debugged. ;-)

Erik


--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-05 Thread Slavko Kocjancic
S, Erik Christiansen piše:
 On Sun, Dec 05, 2010 at 01:40:58AM -0800, Kirk Wallace wrote:
 On Sun, 2010-12-05 at 09:44 +0200, Slavko Kocjancic wrote:
 ... snip
 That's funn... If you already have watchdog (hardware) to keep ATtiny
 RESET good why do you need that MCU at all?!? Seems nonsense for me.
 I think because the MCU is used to validate EMC2 before powering up the
 dangerous bits of the machine. The MCU's internal watchdog validates the
 MCU itself(?), which is a separate function. I need to read the MCU
 manual to see what features come with the using the watchdog. I suppose
 EMC2 could be used to validate the MCU, but things are getting
 complicated.
 Hmmm, its seems Slavko read right past microcontroller's on-board
 watchdog in my post. :-)

 Yes, the ATtiny's watchdog is on-chip, so the quandary doesn't arise.
 I wouldn't trust a microcontroller in any critical role, without a
 hardware supervisor. On an AVR, it has it's own clock, so even if the CPU
 clock dies, the watchdog reset will tri-state port pins.

 That is why a pull-[up|down] to a safe state is helpful on a port pin.
 It takes over in reset scenarios.

 The watchdog improves the reliability of the microcontroller by
 providing recovery from soft errors, whether caused by extreme
 transients or alpha particles.

 However, the ATtiny's watchdog is best enabled only after its program
 has been debugged. ;-)

 Erik


I use that MCU's And can tell you that Watchdog on tiny controlers are 
good one. But have problems. The mcu itself MUST be started correctly 
(reseted) and after that watchdog work correctly. But when big machine 
starts (with a lot of solenoids) the proper reset is wery hard to 
realize! And belive me that if you think in a way that unproper reset 
may casuse injury then just stay off that.

Slavko.


--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-04 Thread Slavko Kocjancic
Just my 2 cents...

For watchdog thing I think the ATtiny is just overkill. That kind of
operation can be done with simple 555 timer or even few diodes and
transistor.

Don't get me wrong. The ATtiny (15L) for example can do that job but as
safety device the any micro isn't good way. And if system hang who says that
it can't set wrong configuration and disable watchdog? Just do that without
micro and use micro for other complicated thing..


2010/12/4 Kirk Wallace kwall...@wallacecompany.com

 On Sat, 2010-12-04 at 09:55 +0800, Jim Coleman wrote:
  I like the idea of a dip switch or solder bridges if one doesn't plan on
  changing the setting alot and wants to save the cost of the dip switch.
  while the pot would be easy to adjust, it's less precise than a truth
 table
  of the dip/bridge positions and the resultant reset timer.
 
  Jim

 Thanks Jim. I agree that it would be nice to have a precise, stable
 input, but I am also trying to avoid any hardware complexity in order to
 avoid an upgrade loop (ATtiny - ATmega - Atom Cube - Nanotube
 Superconducting Buckyball hyper... ). It may also be that one or a few
 presets might be enough. If charge pump is running at 1kHz (based on
 servo thread), it may be acceptable to wait up to a hundred cycles or .1
 seconds to trip an e-stop. If this is the case, .1 seconds might cover
 the range of common watchdog frequencies. Without testing or experience,
 I have a hard time knowing what will work.
 --
 Kirk Wallace
 http://www.wallacecompany.com/machine_shop/
 http://www.wallacecompany.com/E45/index.html
 California, USA



 --
 What happens now with your Lotus Notes apps - do you make another costly
 upgrade, or settle for being marooned without product support? Time to move
 off Lotus Notes and onto the cloud with Force.com, apps are easier to
 build,
 use, and manage than apps on traditional platforms. Sign up for the Lotus
 Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users

--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-04 Thread Erik Christiansen
On Fri, Dec 03, 2010 at 07:54:57PM -0800, Kirk Wallace wrote:
 
 I really had no idea if the memory would be enough. I would have worked
 on it until I went blind in one eye.

Oh, it's enough for what you want to do now. But ISTR a home switch +
index filter, on the other thread. It can do that too, if pins can be
found. But then there's the extra functionality we just have to have,
when we're nearly finished. ;-)

 In looking for something else (small h-bridge) I found this (and
 ordered):
 http://www.sparkfun.com/products/9147 
 
 There is even some code to use as a reference:
 http://www.sparkfun.com/Code/AVR-Stick_v12.zip 

Ah, they use the USB frame timing to calibrate the on-board RC
oscillator.

I saw USB transmit code, but nothing for receive (i.e. for setting
watchdog timing.) Ah, your last site has projects involving USB output.

 http://www.obdev.at/products/vusb/projects.html 

The small H-bridge design I spotted there is another very low power
example, using the L293D. I'd at the very least put some DPAK FETs on a
PCB, instead. I'm not sure I'd trust the shoot-through provisions of one
of those amateur designs. If not using half-bridge drivers with
dead-time, the ATtiny26's timer1 has complementary outputs with
dead-time fixed at one prescaler clock interval.

However, if you want to do motor PID, then a reasonable swag of the 1k
instruction space is eaten. Incidentally, the ATmega8 (used the same
design) is old. The ATmega48 is a scalable replacement.

 I feel a project cascade coming on.

The trouble escalates when you succumb do doing just one more design,
with just one more layout to economise on the shipping from the cheap
PCB places in Asia. :-)

Erik

--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-04 Thread Kenneth Lerman

I would use a single pin for communication to the host with some variant 
of the one-wire protocol used by iButtons.

It is simple, elegant, and relatively insensitive to timing.

Ken

On 12/04/2010 04:30 AM, Erik Christiansen wrote:
 On Fri, Dec 03, 2010 at 07:54:57PM -0800, Kirk Wallace wrote:

 I really had no idea if the memory would be enough. I would have worked
 on it until I went blind in one eye.
  
 Oh, it's enough for what you want to do now. But ISTR a home switch +
 index filter, on the other thread. It can do that too, if pins can be
 found. But then there's the extra functionality we just have to have,
 when we're nearly finished. ;-)


 In looking for something else (small h-bridge) I found this (and
 ordered):
 http://www.sparkfun.com/products/9147

 There is even some code to use as a reference:
 http://www.sparkfun.com/Code/AVR-Stick_v12.zip
  
 Ah, they use the USB frame timing to calibrate the on-board RC
 oscillator.

 I saw USB transmit code, but nothing for receive (i.e. for setting
 watchdog timing.) Ah, your last site has projects involving USB output.


 http://www.obdev.at/products/vusb/projects.html
  
 The small H-bridge design I spotted there is another very low power
 example, using the L293D. I'd at the very least put some DPAK FETs on a
 PCB, instead. I'm not sure I'd trust the shoot-through provisions of one
 of those amateur designs. If not using half-bridge drivers with
 dead-time, the ATtiny26's timer1 has complementary outputs with
 dead-time fixed at one prescaler clock interval.

 However, if you want to do motor PID, then a reasonable swag of the 1k
 instruction space is eaten. Incidentally, the ATmega8 (used the same
 design) is old. The ATmega48 is a scalable replacement.


 I feel a project cascade coming on.
  
 The trouble escalates when you succumb do doing just one more design,
 with just one more layout to economise on the shipping from the cheap
 PCB places in Asia. :-)

 Erik

 --
 What happens now with your Lotus Notes apps - do you make another costly
 upgrade, or settle for being marooned without product support? Time to move
 off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
 use, and manage than apps on traditional platforms. Sign up for the Lotus
 Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-04 Thread Kirk Wallace
On Sat, 2010-12-04 at 20:30 +1100, Erik Christiansen wrote:
... snip
 Oh, it's enough for what you want to do now. But ISTR a home switch +
 index filter, on the other thread. It can do that too, if pins can be
 found. But then there's the extra functionality we just have to have,
 when we're nearly finished. ;-)

I just want to do the watchdog on the AVR. I believe EMC2 should do as
many functions as possible. The AVR should do what ever the PC can't,
such as check PC/EMC2 function. There may be other things too, such as
motion control for tool changers, but I see this more as an EMC2 feature
that is missing.

... snip
 Ah, they use the USB frame timing to calibrate the on-board RC
 oscillator.
 
 I saw USB transmit code, but nothing for receive (i.e. for setting
 watchdog timing.) Ah, your last site has projects involving USB output.
 
  http://www.obdev.at/products/vusb/projects.html 

This is something I need to look into.
-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-04 Thread Kirk Wallace
On Sat, 2010-12-04 at 09:16 -0500, Kenneth Lerman wrote:
 I would use a single pin for communication to the host with some variant 
 of the one-wire protocol used by iButtons.
 
 It is simple, elegant, and relatively insensitive to timing.
 
 Ken

USB is attractive because I can get a cheap AVR board with firmware that
could work on any PC with terminal software (minicom or putty). All that
I am currently looking for is a one time setting of one parameter value,
but the more I think about it, I may only need one of a few presets
which could be handled by two pins and a dip switch, or a trim pot.

I have used SPI for a DAC, but I had to bit-bang it through the parport
and it would only work with my HAL component, which is fine for the
particular application.

One problem is that I made an assumption that I needed to catch the
first late edge of the charge pump, and to be more generic, I needed to
finely tune the countdown value to match whatever charge pump frequency
might be used. If I change the requirement to catching the loss of the
charge pump signal within a reasonable time, the parameter tuning goes
away. Then I got to thinking about what Slavko mentioned previously,
about this is a safety device and I should think in terms of how it
could fail.

Changing track, again, the charge pump signal may not be the best thing
to use, because all it would take is noise on the line to mimic the
pump. I think I should make some sort of data pump component, such as
send out a byte every servo period, then have the watchdog watcher check
for the proper byte. This changes the form of the link between EMC2 and
the watcher, and maybe the parameter setting requirements, or lack
thereof. This reminds me of a previous project I was considering, but
forgot about, which is to use a data stream to fail-safe limit
switches. 

I have more thinking to do, carry on.
-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-04 Thread Peter C. Wallace
 Changing track, again, the charge pump signal may not be the best thing
 to use, because all it would take is noise on the line to mimic the
 pump. I think I should make some sort of data pump component, such as
 send out a byte every servo period, then have the watchdog watcher check
 for the proper byte. This changes the form of the link between EMC2 and
 the watcher, and maybe the parameter setting requirements, or lack
 thereof. This reminds me of a previous project I was considering, but
 forgot about, which is to use a data stream to fail-safe limit
 switches.

 I have more thinking to do, carry on.
 -- 
 Kirk Wallace
 http://www.wallacecompany.com/machine_shop/
 http://www.wallacecompany.com/E45/index.html
 California, USA


Maybe a simple watchdog that avoids the noise trigger issue would be a DPLL 
that locks onto the chargepump signal. Once locked it enables its output and 
stops rate tracking. Any subsequent variation in rate (beyond some margin) 
would trigger a watchdog bite. If run from the servo loop this rate tolerance 
could be quite small so at 1 mS servo thread, the watchdog could bite at 1.1 
ms(and .9 mS). This also does not require any watchdog timeout setting 
jumpers etc.



 --
 What happens now with your Lotus Notes apps - do you make another costly
 upgrade, or settle for being marooned without product support? Time to move
 off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
 use, and manage than apps on traditional platforms. Sign up for the Lotus
 Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
()_() signature to help him gain world domination.


--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-04 Thread Kirk Wallace
On Sat, 2010-12-04 at 09:38 -0800, Peter C. Wallace wrote:
... snip
 Maybe a simple watchdog that avoids the noise trigger issue would be a DPLL 
 that locks onto the chargepump signal. Once locked it enables its output and 
 stops rate tracking. Any subsequent variation in rate (beyond some margin) 
 would trigger a watchdog bite. If run from the servo loop this rate tolerance 
 could be quite small so at 1 mS servo thread, the watchdog could bite at 1.1 
 ms(and .9 mS). This also does not require any watchdog timeout setting 
 jumpers etc.

Brilliant. I could have the ATtiny sample the pump to get a short edge
count and a long edge count, add a cushion, then switch to survey mode
to check that the edges are within the two counts (within an error
rate?). Seems kind of simple now.
-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-04 Thread Erik Christiansen
On Sat, Dec 04, 2010 at 09:04:54AM -0800, Kirk Wallace wrote:
 Then I got to thinking about what Slavko mentioned previously,
 about this is a safety device and I should think in terms of how it
 could fail.

So long as the microcontroller's on-board watchdog is enabled, you have
a watchdog watchdog to provide recovery from a soft error.

When driving a critical output, you can add a pull-[up|down] resistor, to
maintain the desired default state during power-up and any reset applied
by the on-board watchdog.

Erik

--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Watchdog Sizing

2010-12-03 Thread Kirk Wallace
I'm working on using an ATtiny to watch EMC2's charge pump. The plan is
to have a count down that gets reset by a charge pump edge. If the
counter reaches 0, then an alarm pin gets set. The counter reset value
determines how long the charge pump has to do a reset. I can write code
with the appropriate value, but if I wanted to make the watchdog watcher
generic, I should have a way for a user to make the setting on the fly.
My problem is that I can do this with a dip switch, potentiometer,
serial or SPI link, or some other way I haven't thought of yet. Does
anyone have any thoughts on what would be a good way to do this? The
primary purpose for the watcher is to keep the motor drivers powered
down until the PC boots and EMC2 is running.
-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
Oracle to DB2 Conversion Guide: New IBM DB2 features make compatibility easy. 
Learn about native support for PL/SQL, new data types, scalar functions, 
improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, 
best practices and more - all designed to run applications on both DB2 and 
Oracle platforms. http://p.sf.net/sfu/oracle-sfdev2dev
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-03 Thread Erik Christiansen
On Fri, Dec 03, 2010 at 02:46:16PM -0800, Kirk Wallace wrote:
 I'm working on using an ATtiny to watch EMC2's charge pump. The plan is
 to have a count down that gets reset by a charge pump edge. If the
 counter reaches 0, then an alarm pin gets set. The counter reset value
 determines how long the charge pump has to do a reset. I can write code
 with the appropriate value, but if I wanted to make the watchdog watcher
 generic, I should have a way for a user to make the setting on the fly.
 My problem is that I can do this with a dip switch, potentiometer,
 serial or SPI link, or some other way I haven't thought of yet. Does
 anyone have any thoughts on what would be a good way to do this? The
 primary purpose for the watcher is to keep the motor drivers powered
 down until the PC boots and EMC2 is running.

That is an admirable way to design, Kirk. Here are a few thoughts, which
probably don't do more than explore what you're already thinking.

If the device is 14 pin, then a dip switch is feasible, but still eats
pins which would be needed for any ancilliary functions which arise
later in the project. On an 8 pin device, another solution is needed, if
a broad range of timings is to be achieved.

Yes, a potentiometer connected to an A/D uses only one pin. Even if the
A/D is only good to 8 or 9 of the 10 bits, after accounting for errors,
then it's better than 0.4%. Even if the user didn't want a trimpot
(potentially in an environment with metallic particles and coolant mist)
affecting reliability, he could solder in two fixed resistors instead.
(And a filter capacitor on the junction, to reduce any noise
injected from power circuits. If the parallel combination of the
two resistors is over 10k, the capacitor also helps compensate for the
small current drawn by the A/D's S/H capacitance during sampling.)

Alternatively, if sufficient code space remains, to handle user
interfacing, then we the EEPROM could be used, as you're considering
with the serial solutions. If we drive a LED, via a transistor, there's
negligible load on the port pin, with a base resistor of several kOhm,
so we also connect a NO pushbutton switch to ground.

Now, firmware sets the port as input, after reset/power_up. If the
button is pressed at power_up, we go into SET mode, and await release of
the button. Once there, we switch the port pin to output, and blink the
LED once, then again switch to input, and wait 1-2 seconds for the
button to be pressed. In the absence of input, we repeat with another
blink. When there finally is input, we read a software counter we've
incremented between blinks, and take it as a direct value (e.g. ms x 20)
or an index into a short table, if so wide a range of values is needed,
that waiting for incrementing LED blink counts would become tedious.

An enhancement of this could be to first issue long blinks, signifying
tens of timing units, and capture N of them with a button push after the
Nth blink, then repeat with shorter blinks, signifying that we now want
the units, M, such that the whole value = 10*N + M. That more
conveniently covers a broader range of values, but still with a fine
resolution, than linear counting.

OK, that's fiddlier than a potentiometer, but there are compensations.
The LED may be used for other indications after set-up, and the
pushbutton is also available for other user input.

Then there's your serial solutions. Since all users have the EMC2 host
to hand, and probably have a serial port, even if by means of a
USB/serial dongle, then minicom or ckermit could easily be used to input
a value. The input could be echoed, to confirm that it was correctly
received. But that would use a second port pin. If we stay on an ATtiny,
then we need code space for a software UART. (I haven't checked that an
ATtiny's uncalibrated RC oscillator will always be accurate enough for
serial communication, but the first character sent from the PC could be
used for auto-calibration.)

Once a serial link to the EMC2 host exists, is it possible to resist the
temptation to put in a $3 - $4 ATmega, to limit the risk of running out
of code space, once the ancilliary functions stick their grinning faces
over the parapet?

Hmm, what other solutions are there?

Erik

-- 
For humans, honesty is a matter of degree.  Engineers are always honest in
matters of technology and human relationships.  That's why it's a good idea
to keep engineers away from customers, romantic interests, and other people
who can't handle the truth.
(Scott Adams - The Dilbert principle)

--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. 

Re: [Emc-users] Watchdog Sizing

2010-12-03 Thread Jim Coleman
I like the idea of a dip switch or solder bridges if one doesn't plan on
changing the setting alot and wants to save the cost of the dip switch.
while the pot would be easy to adjust, it's less precise than a truth table
of the dip/bridge positions and the resultant reset timer.

Jim

On Sat, Dec 4, 2010 at 6:46 AM, Kirk Wallace kwall...@wallacecompany.comwrote:

 I'm working on using an ATtiny to watch EMC2's charge pump. The plan is
 to have a count down that gets reset by a charge pump edge. If the
 counter reaches 0, then an alarm pin gets set. The counter reset value
 determines how long the charge pump has to do a reset. I can write code
 with the appropriate value, but if I wanted to make the watchdog watcher
 generic, I should have a way for a user to make the setting on the fly.
 My problem is that I can do this with a dip switch, potentiometer,
 serial or SPI link, or some other way I haven't thought of yet. Does
 anyone have any thoughts on what would be a good way to do this? The
 primary purpose for the watcher is to keep the motor drivers powered
 down until the PC boots and EMC2 is running.
 --
 Kirk Wallace
 http://www.wallacecompany.com/machine_shop/
 http://www.wallacecompany.com/E45/index.html
 California, USA



 --
 Oracle to DB2 Conversion Guide: New IBM DB2 features make compatibility
 easy.
 Learn about native support for PL/SQL, new data types, scalar functions,
 improved concurrency, built-in packages, OCI, SQL*Plus, data movement
 tools,
 best practices and more - all designed to run applications on both DB2 and
 Oracle platforms. http://p.sf.net/sfu/oracle-sfdev2dev
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users

--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-03 Thread Kirk Wallace
On Sat, 2010-12-04 at 12:50 +1100, Erik Christiansen wrote:
... snip
 Once a serial link to the EMC2 host exists, is it possible to resist the
 temptation to put in a $3 - $4 ATmega, to limit the risk of running out
 of code space, once the ancilliary functions stick their grinning faces
 over the parapet?

Thanks for your reply Erik.

But shucks, if we're thinking about going to an ATmega ...
http://www.handlewithlinux.com/smallest-linux-pc 
http://www.shimafuji.co.jp/product/semc5701a01.html 

-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-03 Thread Erik Christiansen
On Fri, Dec 03, 2010 at 06:12:52PM -0800, Kirk Wallace wrote:
 
 But shucks, if we're thinking about going to an ATmega ...
 http://www.handlewithlinux.com/smallest-linux-pc 
 http://www.shimafuji.co.jp/product/semc5701a01.html 

Mega-Kewl! (I want a black one, ... anna yellow one. :-)

Seriously though, starting with an ATtiny, then running out of code
space is _so_ frustrating. Thinking as a hardware designer, it's
fair to say A little 'un will do the job, but the benefit of doing
it in firmware is in having design headroom, through adequate codespace.

I'm pretty sure that if I did one with the serial link, I couldn't stop
myself from adding stuff till an ATmega would be good to have. Oh -oh,
checking a datasheet, I am though forced to admit that the ATtiny25
could be substituted with a 45 or even an 85, for 8 kB codespace (4000
instructions). That further forces me to admit that I'm having trouble
resisting thoughts of what else could be stuffed into a nifty little
programmable extension of the EMC2 host.

You're right. An ATtiny is more than adequate, even if(BS)(BS) when we
get carried away. (At least in moderation)

Erik

-- 
Most of us, when all is said and done, like what we like and make up
reasons for it afterwards.  -- Søren F. Petersen

--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Watchdog Sizing

2010-12-03 Thread Kirk Wallace
On Sat, 2010-12-04 at 09:55 +0800, Jim Coleman wrote:
 I like the idea of a dip switch or solder bridges if one doesn't plan on
 changing the setting alot and wants to save the cost of the dip switch.
 while the pot would be easy to adjust, it's less precise than a truth table
 of the dip/bridge positions and the resultant reset timer.
 
 Jim

Thanks Jim. I agree that it would be nice to have a precise, stable
input, but I am also trying to avoid any hardware complexity in order to
avoid an upgrade loop (ATtiny - ATmega - Atom Cube - Nanotube
Superconducting Buckyball hyper... ). It may also be that one or a few
presets might be enough. If charge pump is running at 1kHz (based on
servo thread), it may be acceptable to wait up to a hundred cycles or .1
seconds to trip an e-stop. If this is the case, .1 seconds might cover
the range of common watchdog frequencies. Without testing or experience,
I have a hard time knowing what will work.
-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


--
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users