For a research project I am making something called an "Arterial Constraint" using an ESP32 module.
Much like a BP cuff, a small air filled cuff (embedded with an IR sensor "watching" the rise and fall of blood in arteries) is to be wrapped around the finger.
When the pulse rises, the cuff pressure is to be increased to constrain the flow, when the pulse drops the pressure is to be reduced. Pressure profile matches the pulse profile
Desired Capability :
Dynamic altering of pressure in the cuff.
Frequency : Since max human heart rate is 250 beats per minute (before someone starts seeing Jesus), upper limit of 300 beats per minute should do the trick. So 5Hz.
At 5Hz, time period of single pulse is 0.2 seconds.
Rise happens for roughly half, so pulse is rising in say, 0.1 seconds.
If the arterial pressure rises to 300 mmHg max in 0.1 seconds, so the constraint will have to achieve the same.
To over compensate I thought I'll need something which can vary cuff pressure from 0-500 mmHg in 0.1 seconds, so 1 mmHg in 200 microseconds.
When the IR sensor sees the pulse rising, the microcontroller tightens the screws on the proportional solenoid valve so pressure in the cuff rises and the pulse is not allowed to rise.
I figured I'll have a continuously running air pump and vent the pressure through the proportional valve.
To solve it I was looking for a proportional valve and found one who's hysteresis is very high (25%), and another who's operational voltage is so high (310VDC) I didn't even know such high DC even existed (Hysteresis and reaction time not specified for this one).
I need help understanding how either of them will be operated with an ESP32 module
Your valve, if you ever decide to buy one, will require considerable current in the pulses. You should be sure to get the technical information on the valve of choice so you can size all the other components, including the power supply.
No, consider the 5000+ volts you generate when walking across your carpeting and touch a grounded metal object. It is current flow that is dangerous. Put both high voltage and high current together and then there could be problems.
I have never understood this. If current is dangerous then why would a live 220V AC line kill one? Also, static current from carpet lasts for an instant only, right?
The valve itself doesn't use much current, but its in an enclosure using cabling to connect it to the driver circuit. If there's a crack in the cable insulation and skin comes in touch, wouldn't there be shock? Why do they say High Voltage DC is more dangerous than high voltage AC?
Thank you. I'll test it with the BC337...with a base resistor of 1K Ohm?
Also, one question. I am using a proportional valve for the first time. I had imagined earlier that there would be way to continuously vary the voltage by the microcontroller. But everyone on the internet is using PWM, which in my mind seems to mean that we are switching power to the valve on-off very fast.
Is there a way to actually vary the voltage signal? Would that be more neat or less neat way to do the job? How do the professionals do it?
Please also look into my concern here and let me have your thoughts
If you look at the graph in the datasheet you will see it's flow vs. current. Of course you can't change the current without changing the voltage but it may not be as linear as it is with current.
If can get better resolution and control
With current control you will but now you will need a DAC for the ESP and another circuit for current control.
Do you know Ohm's law - Wikipedia ?
If not then please study it, Ohm's law is fundamental to electrical circuits, if you know Ohm's law a lot of things become clear.
It is indeed current that harms you, but for current to flow there must be enough voltage to overcome whatever resistance is in its path. Human skin is usually dry and has a high resistance. Wet skin has a low resistance, which is why you are more likely to get a shock when your hands are wet, but might possibly touch a high voltage with dry hands and get little or no shock.
Whatever is supplying the current also has some internal resistance, in the case of the mains electricity supply the internal resistance is so low that for the purposes of discussing whether you will get a shock or not it can be considered to be zero. So, when you touch a mains wire the things protecting you are the resistance of your skin and the resistance of the path to earth of the current. If you are luck and have very dry skin and are standing on an insulator, such as a nylon carpet, then there is a good chance you will only get a mild or no shock as there is a high resistance protecting you. Wet hands and standing on a wet flood and the resistance is low and you are at much greater risk.
Other sources of electricity have much higher internal resistances. The 5000V or more from walking on a nylon carpet comes with a very high internal resistance, as soon as you touch the 5000V the voltage drops to almost zero as it is incapable of supply much current, so you might get a brief shock but won't come to any harm as it's too quick to do anything much.
Yes, 300VDC is dangerous if it is from a supply capable of supplying enough current to harm you. It the supply cannot supply that much current then you'll (probably) be OK. Do some reseach on the levels of harm for different levels of current and find out if your proposed 300VDC power supply can supply that much current. If you use a 300kOhm resistor, for example, in series with the 300V then the current cannot exceed 1mA (see Ohm's law).
The ESP32 is not highly praised for it's analog functions ADC or DAC, it's best to use an external device, besides it's only 8 bits.
The DAC you selected is fine. Another choice is the MCP4725. It's more common and well tested within the Arduino community. It's 12 bits which will give you plenty of resolution but it's your call, either will do.