Having multiple powering option available.

Discussion in 'General Electronics Chat' started by Sam Matthews, May 9, 2016.

  1. Sam Matthews

    Thread Starter Member

    Jan 16, 2016
    178
    3
    I'm designing a sensor board that contains several sensors, all of which are drawing more current that can be provided by USB connection to a PC. I would like the board to draw power from an external dc power source while connected to the PC through serial/ISP uploading. However, if i only have the serial/ISP connection made on the board i would like to power just the MCU and the RF radio so i can upload code to the MCU with basic debugging monitoring. But i would like to have the external power option there to enable me to debug the whole of the sensor array in the serial monitor on my PC.

    The power option for this module while in permanent statue is AC 240v, stepped down to 5v on board.

    My first initial thoughts were to have a jumper separating the power line in such a way that it isolates the MCU and RF radio away from the sensors, disconnect the jumper (creating a break), connect the upload method, upload code, remove connection to PC, remove jumper and install back to 240VAC power.

    What would you guys suggest i use for a solution to this?
     
  2. dl324

    Distinguished Member

    Mar 30, 2015
    3,242
    619
    Technically when you design a USB device, it needs to operate in a low power mode until it negotiates with the host for more power. If the request is denied, the USB device is required to operate in low power mode.

    If your device is not USB compliant, you can use a power connector that will interrupt power USB power to the MCU and radio and connect it to the external power source. If you take this route, you need to provide circuitry to prevent powering the sensor circuitry from inputs connected to the MCU when powered from USB; for example, by using tri-state logic to interface to the MCU.
     
  3. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,769
    969
    Jumper or a switch..
    or a switched jack that automatically connects the sensors when a plug is in it.. remove it and sensor supply is removed from the sensors.
     
  4. Sam Matthews

    Thread Starter Member

    Jan 16, 2016
    178
    3
    I'm tempted to go with a sliding switch, the automatic jack would be nice however i'm looking to have the power hard wired in with screw terminals unfortunately.
     
  5. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,520
    1,247
    Two Shottkey diodes might be able to do the switching automatically, depending on the schematic of your circuit.

    ak
     
  6. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,769
    969
    But the sensors will still try to draw from USB power which is the problem here..
     
  7. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,520
    1,247
    That is not the problem stated in post #1.
    ISP power > diode anode > diode cathode > MCU and RF < diode cathode < diode anode < system power and all other circuits.

    The stated problem is powering only the MCU and RF from the ISP input when the system power is off. To do this, the MCU and RF are powered by two diode-OR power sources. The diodes prevent cross powering in either direction. If both ISP and system power are on at the same time, their individual voltages will determine which one powers the MCU and RF, and system power runs everything else.

    ak
     
    Sam Matthews likes this.
  8. Sam Matthews

    Thread Starter Member

    Jan 16, 2016
    178
    3
    I'm not sure i explained correctly. The 4 connections are proposed to be the following;

    1. FTDI Serial Header, input of 3.3V, power only MCU and Radio.
    2. ISP Header, input of 3.3V, power only MCU and Radio.
    3. USB Connector, input of 5V (NO DATA CONNECTION, just power from USB wall adapter), power all of the board.
    4. 240VAC converted on board to 5VDC, power all of the board.

    The use will be 1 of any of those. I also would want it to be able to do either of the upload methods (FTDI/Serial and ISP) and then the rest of the board be powered through the USB wall connection. This would allow me to have it plugged into the PC and debug the whole of the sensor array if needed.
     
  9. Sam Matthews

    Thread Starter Member

    Jan 16, 2016
    178
    3
    Perfect solution, i think. Please refer to my new post above and let me know if this solution would still apply. I think it will do though.

    Thank you!
    Sam.
     
  10. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,520
    1,247
    3 or 4 diodes instead of 2, depending on the construction of the DC input jack. If it is a switching jack, then it can override the USB input without a diode. Then, starting at the MCU/RF section, it is 1 diode to the board 5 V and one diode to each of the 3,3 V inputs. Note, the MCU will see 1.0 or 3.1 V, not 3.3. If this is a problem, then your options are a) switches; b) messy FET driver circuits.

    ak
     
Loading...