@user106970 mentioned to apply power to GPR sensor for a health app of sorts in the reference conversation about Please post what you're working on!. To keep this reference or pointer conversation concise, I started this thread.... and also move my comments from there to here (@user106970 may do so as well to provide a fluid reading experience to the forum consumer).
My response to @user106970 thought about about powering the sensor by the microcontroller itself is:
@user106970, take a look at GPS powered by Espruino pin(s). It all depends how much current you need... in the end it may be simpler to have a FET in place. The small offset of Ground could probably be accustomed by some gate circuitry - if even needed. Just make sure you switch all communication pins including signal ground pin to input / high impedance before powering off... otherwise they may destroy the sensor device - or at best - keep it half alive. If it is not working, think of a polarized or 2 step relays (Marklin/Lionel reverse switching unit): a pulse is required to switch between two states or a changing the polarity of the coil feed. Two pins could be able to do so... or four - two paired (I do though not know what transients the collapsing magnetic field creates and may destroy the mc if directly connected - a FET H Bridge may overcome that... but adds more and more components).
To clarify about the high impedance: pinMode(PinReference,"input"); - making it pull-down or pull-up is counter productive since it may even draw more power than when in operation (@user106970: PinReference is not a string but (like) a 'variable' pointing to the pin object... it can be an actual 'variable' that is assigned with the pin reference beforehand - a good practice to do in the beginning of the code to make code easier to move onto different pins and even boards - that may require to use totally different pins).
© Espruino, powered by microcosm.
Report a problem