Power only feed to a USB device in lieu of a computer connection
A while ago I did this write up on how I had replaced the power source on my Tormach digital height gauge so that it could run from the data cable connected to the PCNC440 mill controller computer. This removed the need of constantly having to fit new batteries.
This modification has worked very well … except when I want to use the height gauge off line when the PathPilot computer isn’t switched on. The level of frustration over the downside impact of this well intentioned modification was starting to irritate.
I had a male and female USB socket in stock along with a 4 pole 3 way rotary switch and a few AMS1117 low drop out 5V regulators. The rotary switch was one of those where you can move a selector pin to make it a 4 pole 2 way. A quick sketch and I think the problem is solved.
The logic is quite simple. Note that the colours used are just to make the diagram more easily understood and the colours chosen have no bearing on normal USB cabling colours.
In computer mode the wiring acts as a pass through connection for normal USB working. The computer is connected to the USB Male and the height gauge to the USB Female.
In ‘local’ mode the USB connections from the computer are all disconnected by the switch and power to the height gauge is provided instead by the 9V battery via the AMS1117 5V regulator and the isolating diode. Note the diode needs to be a low forward voltage device such as Schottky diode. It is not super critical as the regulator I fitted to the height gauge electronics box is a low voltage drop regulator. In total the current drawn in ‘local’ mode is around 10mA so the 9V battery will last a long time …. providing I don’t forget to switch it off (i.e. that is back to ‘computer’ mode). Which probably means I should fit a LED to the output of the AMS1117 to show the device is live on battery……
I built the device as a bird’s nest and 3D printed an enclosure. One less workshop frustration (hopefully).
One other thing to mention. The original write up detailed adding a 3V3 AMS1117 low drop out regulator to power the height gauge. See the link below.
If it is cold in the workshop the display on the height gauge can be a little dim to read. I have boosted the contrast by ‘jacking up’ the AMS1117 in the height gauge electronics box by adding a single Schottky low drop diode in the ground lead of the regulator. This increases the output voltage by the amount of the forward drop of the diode. To be clinical you should really add a tantalum capacitor across the diode to improve the stability of this modification.
Links to similar or related post are listed below : –
- Tormach Power Drawbar piston service
- Notepad ++ for GCode Editing
- Local power USB switching circuit
- Tormach PCNC440 X Axis limit switch repair
- Experiences CNC machining Aluminium Composite Material (ACM)
- Enclosure finally added to my Tormach PCNC440
- CNC Work Reference Centring using Mushrooms
- Clough42 Electronic Leadscrew Project Implementation Notes
- Floating pressure foot for the CNCEST3040T mini milling machine
- Probes and Haimer Taster Modification
- Tormach Power Drawbar piston service
- Notepad ++ for GCode Editing
- Local power USB switching circuit
- Tormach PCNC440 X Axis limit switch repair
- Experiences CNC machining Aluminium Composite Material (ACM)
- Enclosure finally added to my Tormach PCNC440
- CNC Work Reference Centring using Mushrooms
- Clough42 Electronic Leadscrew Project Implementation Notes
- Floating pressure foot for the CNCEST3040T mini milling machine
- Probes and Haimer Taster Modification