Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: 4.1 state machine MOSFET+555

  1. #1
    Junior Member
    Join Date
    Jul 2021
    Posts
    3

    4.1 state machine MOSFET+555

    Hello guys,
    I am making a "simple" solenoid controller. It's not terribly complicated, and as a novice Arduino dabbler it appears that a case or state machine is probably the easiest way to do this. And then add nested If statements to modify these states.

    1) There are 5 or more solenoids, and they operate at various PWM at different stages. They end up low and high, but the transition technique is application critical, and I need to allow the end user to adjust this transition as desired (switch which solenoid engages first, adjust the delay before switching the state of the other solenoids). I believe millis() is perfect for this, not sure how I will implement the variable timing adjustment into a GUI (the external display coding is just out of reach today).

    These solenoids operate some with purely high low, and others want a 3,000hz or more PWM signal.

    I am trying to select MOSFETS to fit this. They won't take more than about a 9.3v 1.2ampere signal. digitalWrite will range from 5-255. There may be several feet of wire to the solenoids so I am also concerned with reducing noise... I assume the MOSFETs should be placed close to the pins of the teensy, then run the higher voltage out to the solenoids.

    Is there a good MOSFET for a 3.3v high PWM rate that is automotive rated? To output 1amp 9v roughly?

    Currently I am looking at this MOSFET: https://fscdn.rohm.com/en/products/d...m21fratb-e.pdf OR https://fscdn.rohm.com/en/products/d...ct2080ke-e.pdf


    2) I need to create a couple of very clean debounced button input signals, as the states will change from one to another in a user input chronological fashion. With an "up" and "down" button respectively. The catch is, I need to reduce the debounce time needed as much as possible. I want the end user to have the fastest button to state change time possible for this project, however a bounced signal that isn't corrected could result in a very expensive and potentially dangerous failure.

    My plan currently is to use a logic level input 555 timer, and the internal resistor/bounce code to clean the signal of an arcade style push button. I'm just having a hard time picking a 555 timer for this, and also was wondering what you might do in this situation.

    Right now it appears this 555 would be a good choice; https://www.ti.com/lit/ds/symlink/tlc555.pdf


    I'm new to this, but have been super impressed with the teensy boards I have. I will need to make a pcb for this application as well. But figure it would make sense to hear any thoughts from those far more experienced than myself. Criticisms are more than welcome. I understand "Arduino" is usually not used for such projects, but with ARM architecture it seems too capable to not use.


    I might post the code for more criticism later, as I'm sure I'm going to have a few issues in it.
    Last edited by kobe; 07-30-2021 at 09:12 PM. Reason: forgot links

  2. #2
    The MOSFET SP8M21FRA seems like it should work OK at 3.3V. If you have 5V available and drive it with something like a 74HCT125 between the Teensy and the MOSFET, it will help to ensure Rds(on) is keep down to it's minimum value to avoid any possible power dissipation concerns. Since that particular part isn't recommended for new designs, the similar SP8M21HZG might be better if there needs to be some life in procurement instead of a one-time build. The other MOSFET requires a very high Vgs to turn on, so not really suitable.

    For switch debouncing, the 555 timer is not optimal. This article explains why better than I can and gives some other options to consider in his follow-on articles https://www.eejournal.com/article/ul...bounce-part-4/

    You might consider a dedicated debounce IC like the MC14490 or LS18. These usually only have about a 20mSec delay, which I would think would be fast enough for your application and are pretty foolproof.

  3. #3
    Senior Member
    Join Date
    Aug 2019
    Location
    Melbourne Australia
    Posts
    241
    If the buttons are SPDT then this might be worth looking at.

    https://www.eejournal.com/article/ul...bounce-part-5/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •