Wanted to reach out to you guys because I have; what is likely a very normal small circuit phenomenon that I just don't know enough about I guess.
Using a solenoid, and two float switches; determine fluid position/and fill-state of solenoid adjusting state as needed. LCD merely displays debug info.
(fried mosfet? controller?)
*3 (30 minute) durability tests were ran on the circuit last night to ensure the device didn't overheat or fail during normal operation. Normal operating time (for solenoid open) is about 7 minutes. The device completed 3 test perfectly. After this I moved it into service and connected everything. During its first operational fill, something went wrong- the LCD froze (likely whole microcontroller), and the MOSFET was now stuck in always-on state. Regardless of program (state).
(arduino boot hang)
A odd side-affect of this (or an issue I never noticed before). If the arduino is turned on with one of the float switches "open", the arduino flat-out wont boot. If I move the switch to "closed" it boots fine. I've noticed the float that causes this is using the same pin that is tied to the arduino LED. If I disconnect the floats completely the arduino starts up fine.
Floats (I believe hall variant?- works well as digital-in)
BATTERLY ELIMINATION CIRCUIT
ADRUINO- FEATHER M0 ADALOGGER
SEE PAINT ATTACHMENT
I plan to post the program tonight... but first ill give some basic explanation of what it does.
1)Level sensors are monitored for a change in state. A changed state is represented of being one value for more than 5 seconds.
2)Logic decides what state the device is in. Both sensors being closed means we're in "full state". Upper sensor open with lower sensor closed, AND solenoid open is "filling" state. Both sensors open is "empty" state. Upper sensor open with lower sensor closed, AND solenoid closed is "draining" state.
3)State change looks at current sensors, current state and decides if a change is needed.
-a change to full state shuts off the solenoid
-a change to empty state turns on the solenoid
4)Solenoid is open or closed based on state - information is relayed back to LCD
The device was working great up until whatever happened to it. Its possible the boot issue existed and i'm just now catching it... but I don't know I tested it beforehand. I think i'm missing some pull-ups and maybe a diode in there over the coil. I wish I knew just a little bit more (seems this is enough to be dangerous) but I will learn from this with some help from one of you circuit guru's!
PS- I've put 100 hours into getting this thing right- from plumbing to 3d printing on this one... if I have to hire someone to get me right- I will totally do that... just point me in the right direction of the person or lesson learned