Thread Tools
This thread is privately moderated by Jack Crossfire, who may elect to delete unwanted replies.
Mar 01, 2017, 01:30 AM
Registered User
Jack Crossfire's Avatar
Thread OP
Discussion

Programmable fuse out of a 3DR current sensor


Instead of hacking the Mastech to detect its current limiting LED, it was decided to make a standalone fuse which was fully programmable from a serial terminal. It was finally a use for the ancient 3DR current sensor. Merely plug the fuse into a USB port & it provides its own console interface. It requires 5V from the serial dongle. The load & power for the load are on a separate circuit from the fuse.

It was the 1st programming of an 8 bit PIC in C, with the official MPLAB. It was also the 1st use of a C program on a point to point soldered, through hole chip. All those years of assembly language with the free gputils & nedit weren't worth it. MPLAB on even a Mac is lightyears faster. It has all the navigation & autocompletion functions of other IDE's. It has handy displays of memory usage. The compilation & flashing is automatic. The crippled features of the commercial compiler don't matter. Many commercial products are made with unpaid versions of the compiler.

The fuse program used 80% of the PIC's 4k of ROM & 20% of its 256 bytes of RAM, but probably a lot more of its stack. It needed a few 32 bit operations to handle current & time conversions. It needed routines for persistent settings & a menu interface. It wasn't a huge amount bigger than an assembly language program.


The original idea was to have just a bag of analog comparators & RC timers. After LTSpice proved that to be very complex, it moved to a microcontroller with LEDs & a pot to set the fuse limit. There would be a table of pot voltages corresponding to current limits. When the parameters grew to a variable time delay & 2 limits, the design changed to a pure serial terminal interface implemented entirely on the microcontroller. Despite the need to be near a computer & to open a 2nd serial terminal, it's the most flexible interface.


The trick with the fuse was allowing a programmable delay. Current exceeding the limit can run long enough to power a motor movement before it blows the fuse. A 2nd limit is a hard limit that instantly blows the fuse. All the commercial power supplies have only a hard limit which instantly blows the fuse. Although the software has a limit to the limit of 15A, the Mastech only goes to 10.7A, so there was no way to test it. The fuse was only tested up to a 10A limit.


The maximum current detectable by the fuse is limited by the LM324's saturation voltage. The 3DR current sensor has a very low output voltage for current below 15A, so the fuse needs an LM324 to boost the 3DR's output. It was predicted to saturate at 15.4A. If the fuse is set to 15A, the LM324 may saturate below that & never blow. The fuse MOSFET may also overheat over 10A & fail closed. It gets smoking hot at 10A.


Another problem is the 3DR current sensor uses the load power to power its own op-amp. If the load voltage drops below 2V, the 3DR current sensor reports nonsense current values. Fortunately, the nonsense current values escape towards infinity as the load voltage drops, so the fuse blows for all loads below 2V.
Last edited by Jack Crossfire; Mar 02, 2017 at 10:57 PM.
Sign up now
to remove ads between posts


Quick Reply
Message:
Thread Tools