| Electronics > Projects, Designs, and Technical Stuff |
| Noob question isolating homemade programmer |
| << < (5/6) > >> |
| David Hess:
--- Quote from: Ian.M on March 08, 2020, 06:55:45 pm ---Yes. That's why I was advocating 50mA polyfuses in all signal lines, with Schottky clamps on the programmer side and another appropriately rated polyfuse in the Vcc line. You CAN'T prevent idiocy, and when you attempt to prevent the resulting damage, the world invariably comes up with a better idiot, that does something so stupid no-one anticipated it. The best one can hope for is to prevent damage as often as reasonably practical, and when you can't, limit the cost of the damage. --- End quote --- I would not trust polyfuses to protect from catastrophic damage because they are so slow. On the other hand, I did not recommend anything better because protection circuits quickly get complicated to protect against reverse voltage which is a definite possibility in this case. Something like a ATE (automatic test equipment) pin driver with programmed current and voltage limits would be suitable for the I/O and power pins, but such circuits are not trivial. Slow ones look like linear class-AB buffers with current limits and some operational amplifiers are suitable but fast ones could use diode bridges as bidirectional current limiters. Their design is a fascinating problem. |
| Ian.M:
--- Quote from: David Hess on March 09, 2020, 02:35:38 am ---I would not trust polyfuses to protect from catastrophic damage because they are so slow. On the other hand, I did not recommend anything better because protection circuits quickly get complicated to protect against reverse voltage which is a definite possibility in this case. --- End quote --- Yes, with polyfuses, there's a high risk of blown buffers and shorted clamping diodes. but both the programmer and the target should be repairable - i.e. no traces burnt off the board, and with luck, if the clamping diodes did their job long enough, and the idiocy didn't stuff -5V from the reversed Vcc onto a target signal line the target MCU and memory chip have a fair chance to survive. --- Quote ---Something like a ATE (automatic test equipment) pin driver with programmed current and voltage limits would be suitable for the I/O and power pins, but such circuits are not trivial. Slow ones look like linear class-AB buffers with current limits and some operational amplifiers are suitable but fast ones could use diode bridges as bidirectional current limiters. Their design is a fascinating problem. --- End quote --- Its hard to justify spending big $$$ on protecting a $3 USD Arduino clone . . . |
| Fixed_Until_Broken:
Ok well I got the transistors on and updated the sketch and it works. I decided do one on ground also just because after a test of powering the target board with the clip on, the arduino turned on or off the target couldn't read its own eeprom. Chip select/Slave select is the issue if I take the wire off the chip select pin the target can then read its own eeprom. I didn't thing this would be an issue. shouldn't the arduino not be able to pull CS high or low if ground and VCC are not hooked in. Just to be clear its still an issue even though I did both VCC and ground |
| Nominal Animal:
I really like the idea of using an NPDT switch (a rotary switch maybe, or a set of small signal relays?), with the "OFF" position having a big resistor for each target chip pin to local ground, say 1MOhm or so each; and maybe opamps for VCC and GND pins on the target chip, with each pin having a diode and a resistor to VCC and another pair to GND, to detect if the target chip is already powered. The resistors would dissipate any charges or current already flowing to the chip. The opamps would be used to detect if the target chip is already powered; the unusual resistors with the diodes would limit the current in that case, and the diodes would clamp the voltages to the rails so nothing should really break. (I would only do the opamps if the programming clamp is used in circuit; I wouldn't bother if a socket is used, where the solitary chip is dropped into for programming.) Based on how I have blown up ICs before, I believe the resistors alone would cover the majority of my goofs, and the opamps would catch almost all the rest if there is a possibility of a capacitor or battery powering the chip (without me realising it) when the programmer is connected. Yes, I would still blow up one every now and then by accident, but I don't see the need for trying to idiot-proof any further than that. |
| Ian.M:
--- Quote from: Fixed_Until_Broken on March 09, 2020, 03:55:27 am ---Ok well I got the transistors on and updated the sketch and it works. I decided do one on ground also just because after a test of powering the target board with the clip on, the arduino turned on or off the target couldn't read its own eeprom. Chip select/Slave select is the issue if I take the wire off the chip select pin the target can then read its own eeprom. I didn't thing this would be an issue. shouldn't the arduino not be able to pull CS high or low if ground and VCC are not hooked in. Just to be clear its still an issue even though I did both VCC and ground --- End quote --- There's all sorts of sneak paths that could provide a ground return between the target and the Arduino. Adding a USB isolator will eliminate some of the possibilities, but the SPI signal lines can still be a major issue. See https://www.eevblog.com/2015/12/18/eevblog-831-power-a-micro-with-no-power-pin/ for an idea of what you are up against. Try leaving ground and the SPI signals connected, and the Arduino powered but hold the Arduino in reset by grounding its RESET pin. That should keep its I/O pins tristated so it doesn't affect the target SPI signals. If that works, modify your sketch to set all the SPI lines as inputs when it disconnects from the target. The Arduino will need to remain powered. |
| Navigation |
| Message Index |
| Next page |
| Previous page |