Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Suggestions on how I might hardware detect a 10 Micron controller is on/off


Tonk

Recommended Posts

Hi,

 

I'm hooking up a UPS to automate the shut down of my 10 Micron mount computer when a power failure occurs (remote solar powered obsv. so quite likely). The UPS board I'm using uses a USB connector to sense the presence/absence of 5 volts. This way it detects if the computer the UPS is protecting is booted (sees +5 volts via USB) or shutdown via user/OS (0 volts on USB). It needs this feedback to ensure that a conflicting computer reboot or shutdown signal is not sent - for example on a power failure occurring sometime after the user has already shut down the computer via the OS.

I have a Mini-Box OpenUPS2 board working perfectly with an Intel NUC - the UPS feeds 19 volts  to the NUC power socket, the UPS USB cable is connected to a NUC USB 2.0 socket and finally the UPS power switch line is connected to the power switch header on the NUC motherboard to hardware simulate pressing the main power on/off button on the NUC.

Right - now for the 10 Micron controller (embedded Linux system). It has a jack socket to turn the mount controller on/off - just requires the two contacts to be shorted and opened again to create the boot/shut down command. The OpenUPS2 board also has a header to connect a relay to control motherboard on/off - so job done we have a way to get the OpenUPS2 to turn the 10Micron on/off via a relay. However one BIG problem - the OpenUPS2 will only do this if it can get the correct 5 volts feed back to monitor the 10Microm controller state. The 10Micron does not have a USB socket to use here so I have to be creative in trying to find the true booted/shutdown state ...

1) I've selected a 5 volt Buck converter which also has an enable pin: shorted to ground = disabled for 0 volts output; and open = enabled for  5 volts output. I can use this 5 volt Buck connected to the OpenUPS 24 volts output (set for 10Micron) to generate the needed 5 volts. However I need a bit of "and" logic - 5 volts get back to the OpenUPS2 ONLY IF the OpenUPS2 output is on AND the 10 Micron is booted.

The problem I have is to find a non invasive way to "read" the 10 Micron state. What we have is

A ) An RS232 socket that is not used by me. Nothing here that would be useful (unless someone knows different)

B ) A status LED - its on and shining when booted - dark when shut down - this looks perfect!

C) An AUX 4 pin socket which is not documented - fat chance anything usable here


So any suggestions how I might sense the LED (optically) and whatever is sensing the LED control something that has a very low resistance when dark and a high resistance when the LED is shining (could be a resistive device, or relay switch, or ...?).

 

Tough one but any help would really be appreciated - remember I don't want to void the 10Micron warrantee by opening up the controller and hacking internals -
 

 

Link to comment
Share on other sites

Not sure if it's relevant but I noticed that some power is supplied to the 10Micron before the momentary on / off switch is pressed to light the LED.

If you peer into the socket holes you can see a red glow and the GPS sensor lights up as soon as the power connector is inserted before switching on.

Dave

Also some posts on the 10Micron forum about fatal results if you have a power cut / reconnect without the proper shutdown procedure

Link to comment
Share on other sites

"Also some posts on the 10Micron forum about fatal results if you have a power cut / reconnect without the proper shutdown procedure "

 

Hi Dave - yes - this is exactly why I'm adding a UPS to the setup.

Plus I've already proven that yanking the power on an Intel NUC can result in an unbootable computer - which is OK while in test at home as I can reload everything from a DVD but once out up a mountain in Spain not a cheap option anymore. Anyway the NUC is sorted - I've been running power loss simulations for a week with the OpenUPS2 and NUC and its not batted an eye lid. Startup and emergency shutdowns are solid. Even when the NUC takes longer than the timeout I've allocated for shutdown (90 seconds) Windows is seeing the OpenUPS2 as a valid battery source  (via the USB link and standard Windows power/battery drivers) and gets a signal to hibernates the CPU - so reboots are either from scratch (99% of the time) and very occasionally a Windows resume. 

Right - back to the 10Micron. Yes the GPS port is continuously powered regardless of the boot state of the CPU (and of the front panel LED that indicates only CPU boot state). The GPS device is powered as long as 24 volts is present on the power socket. Its definitely the boot state of the CPU that needs to be made known to the OpenUPS2 board so it can get its startup/shutdown signaling in the right phase at all times. I also have my rig wired so software on the NUC can also operate a separate USB relay to also stop/start the 10Micron so the UPS really does need to know the 10Micron state given its shared control.

OK so I cant hack the 10Micron controller, but I can fiddle with the 5 volt Buck converter board if needed (its £5 so any error is not a disaster). My loose thoughts are that I should be able to use a photo transistor to sense the 10Micron LED but I have to arrange things so this can drive the 5 volt Buck board "enable" pin in the right way - i.e. LED on -> enable pin high (it has an internal  pull up resistor so "high" means not shorting enable pin to ground); LED off - enable pin low (shorted to ground). I just need to come up with a small circuit to do this - problem now is what powers this circuit? The input voltage to the buck board is 24 volts. I suppose I could use a second buck board to power the LED sensor - just seems like overkill!. On second thoughts maybe that's the answer - buck board #1 powers a LED sensor circuit that turns on/off buck board #2 (via relay?) that feeds +5 volts to UPS USB port to match the state of the 10Micron CPU. 

Link to comment
Share on other sites

Pretty clueless when it comes to this sort of stuff myself, I did build a little circuit with a photo transitor a few years ago to control some 12 volt garden lights to come on at dusk but nothing mission critical.

So you plan to enclose the LED in some way and then sense whether it's on or off.

How are you actually connecting to the mount ? I'm using the WLAN option this communicates back to the virtual hand controller on screen but don't know if it communicates anything useful to you.

Dave

Link to comment
Share on other sites

"How are you actually connecting to the mount ?"

 

Ah - right - for the UPS control this is via the "ext switch" jack. This is the 10Micron designed means to remotely turn on/off the mount. They expect you to have a computer controlled relay to operate this. In my case the "ext switch" line is controlled by 1) The NUC (Windows) computer via a KMTronic USB controlled relay (so me in the UK can turn on off mount) and 2) The OpenUPS2 board via its relay control (this turns the mount on when solar source mains power turns on - and turns the mount off (if not already off) if the mains power fails or is scheduled to be off (obsv policy will be off during most of daylight hours for solar battery recharging). So both these relays are wired in parallel across the "ext. switch" plug pins.

 

"So you plan to enclose the LED in some way and then sense whether it's on or off. "

 

At this stage of thinking = yes


The only other source of on/off state would be to intercept/tap/sense power to the hand pad. That to is turned on/off in synch with the front panel LED. If I can work out which pins (there are lots) are ground and +vcc then I could create an adapter plug. The adapter plugs into the mount box and the hand pad plug into the adapter. In the adapter I could tap the ground and +vcc pins to sense the on/off state. So the problem to overcome here is a safe discovery of the right pins ....

 

Link to comment
Share on other sites

  • 2 weeks later...

I've gone the "LED detection" route and now have the USB monitor circuit working to allow the UPS to know if the 10Micron box is off or on.

I'm using a SFH-300 phototransistor which has a peak spectral sensitivity @ 850nm (near IR region) but still has 80% sensitivity in the red LED region (@ ~700nm) - ideal for red LED detection. Sensitivity with this transistor is low for green and near 5% in the blue region. 

The circuit is pretty simple. I've using a 5v 5A Buck convertor (Pololu) as the 5v source for both the photodetector and to feed the USB 5v line to the UPS monitor input via a relay switch.

The photo switch is made from a 10K resistor connected between 5V and the phototransistor collector. The phototransistor emitter is connected to ground. The phototransistor collector is also connected to the relay module on/off pin (the other relay module pins are 5V and ground plus the on/off pin is high for relay on). When the relay is off then 5V is present on the USB monitor cable connected to the UPS box.

I've arranged it so that when the 10Micron control box LED is on, then the photo switch drives the relay off by taking the relay control pin low. This just saves a little on the consumed power as the relay coil itself consumes 75mA when on whereas the photo switch circuit only consumes 0.48mA to drive the relay off.  Given that most of the time that the telescope rig power is on, so will be the mount controller, then it is useful to have the relay switched off and use the NC relay contacts to route the 5V to the USB monitor cable.

 

The mechanics are: 8mm diameter x 10mm aluminium tubing tapped with 2 grub screws to clamp onto the protruding plastic facia LED holder on the 10Micron control box. The phototransistor is held inside a smaller diameter aluminium tube section that slips inside the larger one. I tapped an inside thread onto the inner aluminium tube to have it in turn cut a thread into the phototransistor plastic edge to make the whole lot secure. The 10K resistor is also soldered to the collector wire inside this tube holder, all potted, and a 3 lead cable provides 5v, ground and relay control line back to the UPS.   

 

5V Buck (step down) converter - http://www.hobbytronics.co.uk/batteries/d24v50f5-5v-step-down-regulator
Relay - http://www.hobbytronics.co.uk/electronic-components/switches-relays/5v-relay-module
Phototransistor - http://www.maplin.co.uk/p/850nm-phototransistor-np64u   - spec sheet - http://www.osram-os.com/Graphics/XPic2/00101785_0.pdf

Link to comment
Share on other sites

  • 9 months later...

Hi...i am a new user here. As per my knowledge the only other source of on/off state would be to intercept/tap/sense power to the hand pad. That to is turned on/off in synch with the front panel LED. If I can work out which pins  are ground and +vcc then I could create an adapter plug. The adapter plugs into the mount box and the hand pad plug into the adapter. In the adapter I could tap the ground and +vcc pins to sense the on/off state. So the problem to overcome here is a safe discovery of the right pins .

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.