Feedback and Discussion

You can ask questions, leave feedback, request help, or report bugs at the bottom of this page. Just type your question or comment into the edit box below and we'll get a reply to you ASAP. If you you leave your email address we'll be able to get you a personal response. You can use the buttons on the edit toolbar to format your text or to add code examples. You can use this form for any:

  • Questions
  • Comments
  • Corrections to the documentation
  • Bug reports (first check to see if it's already reported on the IDE Plus Error Messages or the original Mosaic IDE Bugs and Gotchas pages)
  • Requests for technical assistance

If you have any trouble, feel free to Contact Us. Thanks!



Niall, 2017-12-10 16:57

Hi folks,

For a home automation project I'm trying to develop, I was looking at your "Battery Operated Latching Power Switch" for inspiration. My requirement is pretty similar. The major difference is that instead as a momentary switch I must to use a toggle (SPDT) switch. [I'm retro fitting a lightswitch]

- Toggling the switch state (OFF→ ON or NO-OFF) should provide power to the MCU.

- MCU will then do its thing and power off the device.

- If possible the state of the switch would be available in GPIO (although this is not strictly required).

- Once the MCU is off, the system should draw as little current as practically possible.

Could you advise how I might adapt the "Battery Operated Latching Power Switch" circuit to accommodate the above requirements.

Thank-you in advance, Niall

Eric Billingsley, 2017-11-05 09:46

There is a great GPIO library in GO at that should be added to the C and Python set.

Stefan, 2017-09-29 17:08

Hello togehter,

i need to calculate the resistance between two parallel wires in water. Now i tryed to understand your calculation "Cell Constant of Parallel Wire Electrodes".

Unfortunately i dont get how to manage the electric field to eqn 4. You write in the denumerator (a^2+x^2). But i will get for the denumerator sqrt(a^2+x^2). Can you please describe how to get that solution.

Best Regards


ravi, 2017-08-06 18:18

we are using conductivity tiamo 856 model but we mesuring only conductivity then using conductometer mesuring total dissolve solids is it possible or not then possible how

Willaim Bilgus, 2017-06-27 20:39

I built the RasPi shutdown Circuit and coded a shutdown program for it as well for the Raspi 3B

Ziad Ali, 2017-02-21 23:11

I am looking for an OEM solution to our Data Acquisition need or any recommendation that support our need. Please find below the description of Data Acquisition board that will fit our requirements. • 3 Inputs Analog signal(X,Y,Z): Single-Ended inputs sharing common ground, Dynamic Range ±5V programmable to ±1V. • 3 A/D Converter: 14-16 bits sampling rate ˃100KSPS programmable. • GPS: To provide Location and UTC for each A/D samples. • Formatting Interface: To combine GPS Info with decimal reading of the A/D Samples. • RAM: ˃ 1GBytes. • Remote Interface: Any standard interface to receive simple commands, return simple status and down load the RAM in low speed with simple text format. • CPU: To initialize the system and acts for these commands;  Program A/D Dynamic Range and Sampling rate.  Start Measuring  Stop Measuring  Down load RAM  Provide Status

curtis newton, 2017-01-20 02:06


I have build a small board with this circuit and I cant seem to make it work (nothing tunrs on)

as I try to simulate it with different setup, it is always ON on startup or always OFF on startup no matter the position of the on/off switch

did anyone ever tried this circuit before ? is there an existing implementation of it or is it just pure theory ?


Eric B, 2016-08-01 09:51

I am in need of something to control strobe of LED's. I'm looking to start at 50ms on and 150ms off. I need to control 200+ LED's at the same time. I also need it to run off 12v. I also need to control the on and off times independently. Is there anything out there that I might find off the shelf??

Jonathan, 2016-06-08 05:10


Thanks for your circuits and tutorials. I am using the ON/OFF Switch for the Pi 3 and I have a problem with software shutdown. When I press the button, the pi turns back on after it was shutdown. When I press the button longer to force it OFF, it is working and the pi doesn't reboot.

Here is my python script :

import RPi.GPIO as gpio

def loop():


def shutdown(pin):

   gpio.setup(7, gpio.OUT, initial=gpio.LOW)


gpio.setup(7, gpio.IN)

gpio.add_event_detect(7, gpio.FALLING, callback=shutdown, bouncetime=200)


Thanks for your help.

Kyle, 2016-05-05 08:10


i am interested in building a logic circuit to remote start my vehicle but i am not entirely clear with the terminology used describing such circuits. i am a novice with digital circuits, but have had my hands in basic 12v auto alarms, stereos, home audio etc..

i think one of the circuits described on the "latch and toggle circuit" page: ( would be ideal, but my input would be a momentary 12v pulse (i.e. parking light flash then horn chirp) instead of a switch

here it is in layman's terms: when the key fob lock button is pressed once, the parking lights flash for approx .5 sec when pressed repeatedly the horn will chirp. i would like for the light flash circuit to activate a "latching" relay that would send power to another 2 "latching" relays that would successively latch when the next 2 horn chirp pulses get sent. this in turn would kick the engine starter circuit on for 3 seconds with a timer, or when rpms reach 1000 with a counter.. whichever comes first. this in turn would deactivate the start pulse circuit and activate a 5 minute timer that would kill the engine and also a brake light circuit that would kill the engine if the brake pedal was pressed before the key was inserted and turned to "on"

i know they make add on systems, but i would like to do it myself to save some cash and have fun :)

thank you Kyle

Ahmad Hosseinlou, 2016-04-04 02:55

Hi.I can convert voltage to Temperature with simple form use of formula But I have a problem to convert temperature to voltage please suggest formula for solution this problem.thanks

Marielis Rodriguez , 2016-02-15 19:34

Hello I work converting automotive mcu's for importing purposes, and I'm having problems with 9s12… I'm trying to find guidance as to what products are best and how to use them, or how to use the products I already have to achieve the goal wich is to convert cars for example Dodge Ram 2007 from KM to MI

Celso Caldeira Sant'Anna Filho, 2016-01-21 23:53

Hi! In your page There'a diagram to make a switch to Raspberry Pi, I am new to this, and don't understand the schematics, what is the diode used near the button? Do I have to connect the diode, the capacitor and the resistor all together in a single 'leg' of the push button? (I am using a 4 'legs' momentary push button). All 3 capacitor are ceramic? (0.1, 1 and 10uF) I don't have this dual mosfet, can I replace it for 2 tip 122 mosfets? Thanks for the help!

Randall Dwornik, 2016-01-11 14:02

In attempting to change out the battery B1 in your legacy handheld we are having difficulty separating the motherboard from the display board to access the backside of the board, is the header H6 soldered in place on the motherboard?

Jeff Burk, 2015-11-11 16:54

I would like to use the push button latch circuit in Fig 3, but I need it to power up in On condition so that it drives the load immediately. I saw this option in other variations, but I don't know how to do it for Fig 3. Any help is appreciated. Thank you.

K Bhat, 2015-09-10 02:44

Hallo Sir, My professor has given me a task to compare the performance of RTD and Thermocouple. What I did was a simple test by keeping both of them in hot water ranging temperature from 40 to 100 degrees. I get a Temperature curve for Thermocouple but for the RTD have a all resistance values. So I looked by the resistance v/s temperature chart for RTD and obtained the temperature values. Now how do i compare there is atemperature difference of +_0,4 degree of RTD from the Thermocuple. But how do I talk about their sensitivity.

Hoping for some answer from your end K Bhat

Jerome Thoma, 2015-06-14 11:27

In "Controlled Turn-ON and Shutdown of Microcontroller Products" you mention that the circuit works well for input voltages from 5-18V. Will applying 12V not cause problems when shut-down is controlled through a GPIO pin of an MCU (3.3V)? Do I need to add more circuitry to translate signals between the two levels for the control IO lines?

Andrew Robinson, 2015-05-13 02:09

Hi - great pages

I think I have found an error in the Thermistor/Measuring Temperature Equation. You note the 'beta' for the equation should be 393 - I think it should be 3930

Thanks for the resources

Peter Gray, 2015-04-28 04:14


I have a question about your type K type calibration table for converting mV to °C. The last column voltage range says 33.275 to 69.553mV but the NIST maximum for type K is 54.886mV which is 1372°C. The Temperature Range below that says 800 to 1200°C. But 1200°C is only 48.838mV from the NIST type K table. It 'seems' to me the 69.553mV figure is wrong and the temperature range is wrong. All the other columns figures line up with the NIST tables, just not this one. Typo's maybe?

Mathieu, 2015-04-15 22:12

I used the Push On/Hold Off schematic with a high current device (1.5A - 9V). I've experienced some rebound (on-off-on-off) before it shut down completely. I don't have this problem when I shut down a lower powered device. Do you have any idea how to fix this ?

Thanks, Mathieu

Mark Wargo, 2015-03-06 23:55

The link to the "Controlled Turn-ON and Shutdown of Microcontroller Products" page appears to be corrupted ("Firefox has detected that the server is redirecting the request for this address in a way that will never complete"). I assume the content is just a generalized version of what appears on the "Raspberry Pi ON/OFF Power Controller" page, but would still like to see any and all possible guidance. Thanks!

Paul Clifford, 2015-04-03 21:18

Thanks Mark, we've fixed that redirect loop!

Douglas Luis, 2015-01-21 18:17

Does the Wildcard Carrier Module (WCB-5F5R) contribute to the Capacitive Load Factor Limit? If so, what is its Load Factor?

Paul Clifford, 2015-04-03 21:25

The Wildcard Carrier Board hosts Wildcards just as other controllers do, so it has similar limitations with respect to the number of Wildcards it can host. At your prompting I've clarified that the Wildcard Carrier Board mounted on a QED Board has the same drive capability as the PDQ Board or QCard Controller on the page: Wildcard Bus Loading Limits.

Thanks, – Paul

Jang.SJ, 2014-11-29 13:26

Hello, "Battery Operated Latching Power Switch" to questions in the circuit.

In Tina-Ti Software, I may "power sw on" the output voltage drops And "power switch off", if maintained for more than 3 seconds, the output voltage rises. In this case, Is it a matter of interpretation Tina-Ti Software? Or, Is it a matter of Tina-Ti Software settings?

Thank you.

Stephan, 2014-11-27 14:48

Hi Nick,

Thanks for the great example of the "Raspberry Pi ON/OFF Power Controller". I wondered if you have thought about controlling the AC/DC converter as well? It would be great to switch this converter off as well, so that you do not even have the standby losses… Is that possible??

Paul Clifford, 2015-04-03 21:19

It's certainly possible Stephan, but we haven't done it!

Peter Gray, 2014-11-14 01:12

Hi, I've been playing with your thermocouple polynomial equations and have hit an issue. It's probably me but thought I'd ask before I continue with the head banging.

I have re-created your equations in excel for mV to Temp conversion for types K, N & R with no problems. Nice work btw.

However with the inverse equations (Temp to mV) I'm getting big variations. As an example, for the type N with Tcj = 0 degC I get 0.039059469 = approx 1.5 degC. At Tcj = 25 deg C I get 0.527885738 = approx 20 deg C. At Tcj = 50 Deg C I get 1.073021567 = approx 40.5 deg C.

The K is good at 0 and 25 but at 50 is approx 46 deg C.

For Type R at 0 deg C I get -32.5 deg C! At 25 deg C I get 25 deg C. At 50 deg C I get approx 41 deg C.

It's me isn't it?

Peter Gray, 2014-11-14 21:47

Yes it was me. Had to add a few extra sets of () to get the order of operations right. :-D

Paul Clifford, 2014-11-26 17:14

So glad you found it Peter. Yeah, parentheses can make the difference!

Robert, 2014-10-20 04:01


How to isolate (use optoisolator) the GPIO4 (PIN7) from the output of the IRF7319? (for security Raspberry PI).

Best Regards, Robert

Matt, 2014-10-15 08:51

Many thanks for publishing this helpful circuit and its variations.

Using the configuration shown in Fig.7, and with the auto-on option disabled (0.1uF cap wired to input rail), I'm experiencing a problem where the circuit switches on about 90% of the times when unswitched DC power is applied. The on/off button works fine apart from that.

Please can you advise me on why this might be happening, and what to look for? It's affecting a client's prototype design, where quite a few PCBs are impacted by this. They have clearly used the Fig.7 circuit. Replacing the IC results in identical behaviour.

Kind regards, Matt.

Konfu, 2014-08-27 05:57


I find your "Battery Operated Latching Power Switch" very useful.

I now just wonder: is there a way to modify the circuit so that only a long press (maybe 2-3 seconds) of the button will switch the circuit on and another 2-3 seconds button-push will turn it off again? I need to prevent someone from accidentially switching on the circuit. ;-)

Any help would really be appreciated and I guess a valuable add-on to this circuit.

Nick Guerette, 2014-09-30 23:26

Hi Konfu,

It is difficult to introduce a delay in both turn-on and turn-off using the simple dual-MOSFET circuit you referred to. However, adapting one of the circuits based on logic gates under Latch and Toggle Power Circuits, it should be possible to create a delay in both turn-on and turn-off. Try the following circuit:

Circuit schematic of two NAND gates with positive feedback creates a delayed toggle latch.

This is a simple example, and has its limitations, particularly that if the user holds down the button too long, the circuit will switch states again after a shorter delay, possibly causing undesired behavior. However, it's a useful starting point. The circuit above lists surface-mount components, but if you wish to use through-hole components, you may select from the following based on your power supply voltage range:

Robert, 2014-08-17 07:03

I use code from Pi Supply (, It's works, but I have problem with hardware shutdown Raspberry PI after software shutdown. I created code "gpio.setup(7, gpio.OUT, initial=gpio.LOW)"- responsible for hardware shutdown, but I don't know how to put into code from PI Supply and get sequence software shutdown > next hardware shutdown. Please help :)

Robert, 2014-08-17 15:55

Ok, I use this code from site Is it possible to set a time delay switch off hardware shutdown ?. I set runlevel 0 for halt, but it still too fast for shutdown system.

Nick Guerette, 2014-08-26 20:31

Dear Robert,

I am glad you solved the voltage drop problem. I've re-hosted your schematic here (click for full size). forum_2014-08-04t1331_pi_power_sch.jpg The easiest way to delay the hardware shutdown is to increase the size of the 10 μF timing capacitor. For instance, if you increase it to 100 μF, it will take about ten times longer for the power to turn off after the output pin has been set low. There are two side effects to this, however:

  • It will also take ten times as long to force power off by holding down the button.
  • After power is turned off, it will take a comparable amount of time until power may be reliably turned on again, due to the time it will take the larger capacitor to discharge. During this time, pressing the power button may turn the circuit on only briefly, possibly causing undesired behavior.
Robert, 2014-08-27 03:21


To safely software shutdown I used in code: call('umount /boot', shell=True), In next lines: gpio.setmode(gpio.BOARD)gpio.setup(7, gpio.OUT) gpio.output(7, gpio.LOW).

Best Regards, Robert

Robert, 2014-08-11 16:20

Problem with drop the voltage to 4,7V solved, I changed USB cable and GPIO4, I use /boot/cmdline.txt and add config parameter bcm2708.w1_gpio_pin=<GPIO_pin_number>, and release GPIO4 for smart power :)

Robert, 2014-08-04 09:31

I have a problem with your solution when I use it, I drop the voltage to 4,7V. When connecting directly from the DC adapter is OK (5V), maybe its problem becouse I used SMD adapter (SO8 to DIP8) with precision dip socket, below pictures designed PCB:

Is it possible use a different GPIO than GPIO4 ? Do you have some program to use software shutdown ?

Best Regards Robert

Seppo Nurmi, 2014-06-25 08:29


I have High voltage push button toggle switch with inrush current limiter . Dual FET is AUIRF7343Q. N-mosfet feedback is wired from high voltage and zener diode (15V) limits the gate voltage. The problem is that it stays on as long as I press the ON button. What is the problem with it? What is the purpose of R8? Is it needed at all if I remove the inrush control from the circuit (D6, R7, C7)?

Nick Guerette, 2014-07-30 17:36

Dear Seppo,

I've re-hosted your schematic here (click for full size).


I do not see any problem with it; it seems faithful to the example circuit using-high-side-mosfet-switches-at-higher-voltages, except for using another 15V zener diode to limit the voltage to the N-MOSFET gate instead of the regulator output, which I do not see a problem with. I suggest verifying the wiring; as the circuit is designed, if you hold down the power button, the circuit should turn on for a few seconds, then turn off and remain stable in that state until the button is released, at which point the 1 μF capacitor will discharge and it will be possible to turn it on again. If the power output is on only when the button is held down, this suggests a wiring problem somewhere; perhaps the gate and drain of the N-MOSFET are reversed, such that the button is directly controlling the P-MOSFET.

Seppo Nurmi, 2014-07-31 13:42

I'm using printed PCB With no errors on DRC. It works for a while with some modifications. R5 300k –> 100k, R7 100k –> 10k, remove D6 and C7. At the moment the circuit does not work with capacitive loads (forgot the diode next to the feedback resistor R4). Also there's issues with higher voltages. The circuit does not handle 28VDC input voltages. Probably my Design does not filter the voltage peaks well enough in load dump situations.

Robert, 2014-06-23 10:03

Of course for 10 uF use electrolytic capacitor ?

Best Regards Robert

Nick Guerette, 2014-06-23 13:55

Hi Robert: Regarding the Controlled Turn-ON and Shutdown of Microcontroller Products circuit, the 10 μF output filtering timing capacitor may be either ceramic or electrolytic. The other smaller capacitors must be non-polarized ceramic.

Ed Slate, 2014-06-16 09:05

Hi, do you have mechanical drawings for the PDQ board? I was able to locate them for the QCard, but not the PDQ board. Thanks!

Nick Guerette, 2014-06-19 23:37

Hi Ed,

There are basic mechanical drawings of the PDQ Board and Wildcard form factor hidden under the Accessories section:

Robert, 2014-06-16 02:46


1. I would like to make a similar circuit, maybe you know a replacement for the IRF7319 (SMD - Surface Mounted Devices) version DIP (THT - Through-Hole Technology) ? 2. Testing the "switch ON" be done without a connected GPIO? (if set to auto-off). 3. Questions to parts - diode: 1N4001, 1uF capacitor: what type ?, 0.1uF capacitor: ceramic, 10uF capacitor: electrolytic 4. Do you have a PCB design?

I try to make a version THT, SMD is too difficult for me.

Best Regards Robert

Nick Guerette, 2014-06-19 23:32

Hi Robert,

The Controlled Turn-ON and Shutdown of Microcontroller Products circuit requires both an N-MOSFET and a P-MOSFET, both provided by the surface-mount IRF7319. It seems that multi-MOSFET chips are uncommon in through-hole packages, so you'll need to use two separate discrete components instead. Discrete through-hole MOSFETs are generally intended for high-current switching, so will be larger than necessary for this application. MOSFETs with otherwise similar characteristics you could use in a push-on hold-off circuit are:

Edited to add components with higher VGS

The circuit will work fine without using an I/O pin, but the microcontroller will have no way to detect that power is being shut off, or to shut itself off. 1N4001 or any other silicon diode will work fine. All capacitors used should be non-polarized ceramic -Edit: except for the 10 μF timing capacitor which may be electrolytic. If you are using through-hole components, I recommend using a simple prototyping "perf" board.

Robert, 2014-06-25 05:50


LastLast, one question :), Is it possible use a different GPIO than GPIO4 ?

Best Regards Robert

Ed Slate, 2014-06-03 12:36

I'm a new user to Mosaic+ and Mosaic Terminal and seem to be getting frequent "blue screens of death" while downloading files to my PDQ board from an XP host. After getting a blue screen of death, I can reboot the host and successfully download the very same file to the target. Any suggestions?

Nick Guerette, 2014-06-03 16:58

Dear Ed,

I'm sorry to hear that you're seeing a BSOD! For technical support with our products, feel free to Contact Us directly. We've never seen a Windows crash during usage of Mosaic Terminal before, but there are several things that may be at fault. This may be a bug in Mosaic Terminal itself, but it's best to rule out other possible causes. The other software that is heavily exercised in downloading code to a controller is the serial port driver, and driver problems are more easily able to cause a Windows crash than application software as well.

If you are using the usb-to-rs-232-adapter sold by Mosaic, then follow the link above and then click the link for the FTDI driver update page, and try downloading the latest driver from FTDI. If you are using another USB to RS-232 adapter or a built-in serial port, try updating the driver from Windows Update as follows:

  1. Right-click on "My Computer" and select "Properties".
  2. On the "Hardware" tab, click on "Device Manager".
  3. Expand the entry for "Ports (COM and LPT)".
  4. Right-click on the COM port you are using with Mosaic Terminal and select "Update Driver…"

You may also check the website of the manufacturer of the adapter (or for a built-in serial port, your computer or motherboard manufacturer) for updated driver software that may contain a bug fix.

If that does not work, we will need to isolate the cause of the BSOD using information provided on screen or in the crash dump. The first place to start in investigating a BSOD after the fact is to look at the Windows Event Log:

  1. Open the Control Panel under Start→ Settings.
  2. Click on "Administrative Tools", and then "Event Viewer".
  3. In the navigation pane on the right, select "System".
  4. In the list of logs that appears, look for an error at the time of the BSOD. Double-click on that error and see if it provides information about the nature of the error or any files related to it.

When the BSOD happens, there is information on the screen about the error that may also be useful, but by default Windows XP restarts immediately, making it difficult to read or record that information. To prevent the automatic restart:

  1. Right-click on "My Computer" and select "Properties".
  2. In the "Advanced" tab, in the "Startup and Recovery" box, click the "Settings…" button.
  3. Under "System Failure", un-check the box labeled "Automatic Restart". The next time the BSOD happens, you'll have time to read and write down the information it provides, which will include an error code and may also reference files that may be related to the error.

The dialog box above is also where you can ensure that Windows will create a Kernel Dump or Complete Dump, usually at C:\Windows\MEMORY.DMP . As a last resort, if the problem cannot otherwise be isolated, we may be able to set up a way for you to transfer the memory dump file to us to analyze using the Windows debugger, WinDbg.

Jose Lindo, 2014-05-11 14:14

Our Mosaic Template for dokuwiki is the best i can see.

Is possible download this greater template


Paul Clifford, 2014-05-14 18:47

Dear Jose,

Thank you. We are currently working on making a downloadable version of our dokuwiki template so that others can use it. We've got a few tasks to do: we made some changes to the kernel that we'll need to migrate to plugins instead, and we need to test it with the newest dokuwiki version. But we're eager to get the template into others hands so they can use it too.

Ruedi Heimlicher, 2014-05-10 06:21

Hi I am experimenting with the ON/OFF-switch. It works as it should, with one exception: I have an EDIMAX WLAN-adapter that works great when the raspi is powered via the micro-USB, but not with tho ON/OFF-switch. I cannot ssh to the raspi. Adding a big capacitor - 1000uF - to the power-output after the MOSFET helps sometimes, but not always. Any ideas? Thanks Ruedi

Paul Clifford, 2014-05-14 18:52


My guess is that the power supply you are using can't sustain the current required by both the RPi and the WLAN adapter. That adding the capacitor sometimes helps indicates that it is smoothing ripple or providing peak current that you power supply can not. The P-channel MOSFET adds a little voltage drop through the circuit, but just a little, so my only guess is that the power supply you are using has marginal capability to begin with. Let me know what else you find.

Ruedi Heimlicher, 2014-05-15 11:04

Hi and thanks for your response. The problem was the P channel MOSFET I was using on my breadboard. I read somewhere that the circuit also works fine with discrete MOSFET's, but the P type I had lying around had a threshold voltage of 2 to max 4V, and that apparently was too much. The PCB with the IRF7319 works now fine. I used a regulated power supply delivering 5V, and the output looked fine on the (100MHz)scope.

Paul Clifford, 2014-05-15 15:59

Reudi, Glad it's working now. Yep, the MOSFET specs really do matter! Using a supply of 5V, the P-channel of the IRF7319 will drop well less than 0.1V with currents up to 3A, so it's a good choice. Many newer MOSFETs have very low rDS_ON, much lower than MOSFETs available ten years ago.

Alex, 2014-03-20 19:15

Fantastic schematics and explanations, but I would like to find out if:

1. This circuit would still function at 3.0 to 4.2V supply voltage (used to drive the ENABLE line of an LVDO)

2. A 1s delay Power-ON delay could be introduced instead of a short press

3. Does this switch configuration effectively debounce it?

Thank you so much, Alex

Alex, 2014-03-21 01:38

Apologize for not referencing the circuit in question - the Raspberry PI ON/OFF controller:

Thanks again!

Paul Clifford, 2014-05-14 19:12


1. The circuit should still function down to 3.0V. The MOSFET pair specified, the IRF7319, has gate threshold voltages of about 1V for both MOSFETS. The IRF7319 datasheet shows detailed specs down to 3V. The series pass MOSFET can provide 1.5A with a 5V supply, but considerably less than 1A at a 3V supply. That won't work very well if you want to get a lot of power through it, but if it's used just to drive an ENABLE line it would work fine, even at much lower voltages. If you want to pass a lot of current at lower voltage then it's best to use separate MOSFETs. You can choose a series pass MOSFET that can provide more current at a lower gate-source turn-on voltage, and operate down to much lower voltages. For example, the SSM3J304T can provide more than 2A current with a voltage drop of less than 0.2V, at a power supply voltage of 2.5V.

2. You can add a 1 sec turn on delay (requiring that the switch be pressed for 1 sec before the circuit responds) if you use separate on and off switches, but it's trickier if you want to retain only one switch. I see if I can come up with a reliable circuit; if so, I'll post it.

3. Yes, this switch configuration debounces the turn ON/OFF perfectly.

Best regards!

Nick Guerette, 2014-10-01 21:54

Hi Alex — see this comment above for one option for a circuit allowing a delay in both turn-on and turn-off.

J. Lane, 2014-02-28 18:32

What kind of caps are those in figure 6? Are they ceramic? I noticed they are not polarized.

Nick Guerette, 2014-03-13 16:40

Yes, in general non-polarized capacitors on our boards are ceramic chip capacitors, most commonly 0603 package X7R type with 20% tolerance, but sometimes larger packages for higher capacitance or higher voltage limits, or tighter tolerance for timing circuits.

K. Nelson, 2014-02-07 19:00


Thank you for the instructive circuits and tutorials. I intend to build an on/off circuit for an RPi - 2 questions

1. The diode is labeled as a BAV99, which is a switching diode array, not a single diode as pictured in your circuit. Is this really the correct part number? 2. The Auto ON/Auto OFF jumper is not quite clear as it is explained, although I think I am reading the diagram correctly. If the switch is set to ground, then the circuit will always default to ON, until it is turned off with the momentary button. Is that correct?

Thank you for your help.

-K. Nelson

Nick Guerette, 2014-03-13 16:59

1. Yes, in this case we're just using one of the two diodes in the BAV99 part. It's inexpensive enough that from an inventory management perspective, it's simpler to use this part both where two diodes in series are needed and where a single diode is needed, rather than stocking a separate part for single diode applications. From a technical perspective, any silicon diode will work in this application.

2. Yes, you are correct. The Auto ON/Auto OFF jumper only affects what happens when external power is initially applied; shortly after power is applied the 0.1uF capacitor charges and then the circuit is controlled by the On/Off switch.

mustafa bayraktar, 2014-02-06 16:27

Dear Sir;

I have a program about writing & reading from RS232 however it drops bytes and I really cannot read what i write what can be the issue? Can it be related to my low ram which is only 1024 best

Nick Guerette, 2014-03-13 17:01

For this issue I suggest looking to online forums for general programming questions, such as:

Enter your comment. Wiki syntax is allowed:
If you can't read the letters on the image, download and play this .wav file so they will be read to you.