Setting a specific pin to high status when the device powered
#1
Hi,

I would like to use a linbus tranceiver to boot up my pine64. When the IC senses traffic it wakes up and provides current for 20ms. When the board powered it has to set CSL/WAKE pin to high to have continues power. So how can I set a pin to high status when the board powered?

I dont want to use arduino or other microcontroller, it makes my board even more complex.

Thanks.
  Reply
#2
(10-05-2016, 09:48 AM)mbt28 Wrote: Hi,

I would like to use a linbus tranceiver to boot up my pine64. When the IC senses traffic it wakes up and provides current for 20ms. When the board powered it has to set CSL/WAKE pin to high to have continues power. So how can I set a pin to high status when the board powered?

I dont want to use arduino or other microcontroller, it makes my board even more complex.

Thanks.

I may be overthinking it, but I'm imagining some sort of battery powered circuit with the receiver and a relay-- possibly optically coupled-- on a perf board that triggers the eular pins with the momentary voltage to wake your Pine, but that may be way over-engineered.
  Reply
#3
Hi,

Actually It is possible to make it with a tiny microcontroller but I want to use as less component as possible. I want to make all the logic work from pine64. If there is a way to make a pin state high from the beginning that would be great.
  Reply
#4
(10-06-2016, 02:43 AM)mbt28 Wrote: Hi,

Actually It is possible to make it with a tiny microcontroller but I want to use as less component as possible. I want to make all the logic work from pine64. If there is a way to make a pin state high from the beginning that would be great.

Depending on what voltage your board is, and what it's threshold voltage is for logic high, you could use the 3.3v output, as that is off (altough registering 0.3v on my meter) when the pine64 is not powered up. Check the pinout doc in my signature if you want to work out which pins to use - GND and 3v3 on either the RPi or euler headers.
  Reply
#5
Hi,

I can use both 3.3v or 5V logic, I have no issue with it. It has to be high immediately when the board powered and It should go to zero when the shutdown sequence completed, then the external linbus IC will cut all the supply until it receives a data on the line.

Thanks.
  Reply
#6
(10-06-2016, 04:15 AM)mbt28 Wrote: Hi,

I can use both 3.3v or 5V logic, I have no issue with it. It has to be high immediately when the board powered and It should go to zero when the shutdown sequence completed, then the external linbus IC will cut all the supply until it receives a data on the line.

Thanks.

Well, the question then will be whether the 0.3v that I measured when the pine64 was off (remembering that this was with nothing 'loading' the pin) is  low enough for your linbus to consider the pine64 off. It will come on and stay on (3.3v, RPi pin 1) when the the pine64 starts up, and goes off when the pine64 shuts down, so it meets those criteria.
  Reply
#7
(10-06-2016, 07:42 PM)pfeerick Wrote:
(10-06-2016, 04:15 AM)mbt28 Wrote: Hi,

I can use both 3.3v or 5V logic, I have no issue with it. It has to be high immediately when the board powered and It should go to zero when the shutdown sequence completed, then the external linbus IC will cut all the supply until it receives a data on the line.

Thanks.

Well, the question then will be whether the 0.3v that I measured when the pine64 was off (remembering that this was with nothing 'loading' the pin) is  low enough for your linbus to consider the pine64 off. It will come on and stay on (3.3v, RPi pin 1) when the the pine64 starts up, and goes off when the pine64 shuts down, so it meets those criteria.
 
Use a comparator on the PMIC output pin for DCDC1;  with an open collector, and pullup for 3v3 or 5v.

Set the threshold on the comparator for something reasonable so that the 'off' level ( .3 , whatever ) snaps the output to zero and holds it there. The LM339 is good in this kind of application.  These make great level detectors, operate at a wide voltage range, and have open collector outputs;  pullups are 'required'.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#8
(10-06-2016, 09:01 PM)MarkHaysHarris777 Wrote: Use a comparator on the PMIC output pin for DCDC1;  with an open collector, and pullup for 3v3 or 5v.

Set the threshold on the comparator for something reasonable so that the 'off' level ( .3 , whatever ) snaps the output to zero and holds it there. The LM339 is good in this kind of application.  These make great level detectors, operate at a wide voltage range, and have open collector outputs;  pullups are 'required'.

Is there any particular reason a LM311 wouldn't be more suitable - as it results in a smaller package size, unless you want the extra comparators. However, that is beside the point - you're basically agreeing that unless the threshold trigger voltage for the linbus transceiver the OP is wanting to use will accept 0.3v as off if using the 3.3v power pins on the RPi/euler bus, that there is no reliable way to get a pin to go high and stay high immediately from power on, without using external hardware?
  Reply
#9
(10-07-2016, 06:46 PM)pfeerick Wrote:
(10-06-2016, 09:01 PM)MarkHaysHarris777 Wrote: Use a comparator on the PMIC output pin for DCDC1;  with an open collector, and pullup for 3v3 or 5v.

Set the threshold on the comparator for something reasonable so that the 'off' level ( .3 , whatever ) snaps the output to zero and holds it there. The LM339 is good in this kind of application.  These make great level detectors, operate at a wide voltage range, and have open collector outputs;  pullups are 'required'.

Is there any particular reason a LM311 wouldn't be more suitable - as it results in a smaller package size, unless you want the extra comparators. However, that is beside the point - you're basically agreeing that unless the threshold trigger voltage for the linbus transceiver the OP is wanting to use will accept 0.3v as off if using the 3.3v power pins on the RPi/euler bus, that there is no reliable way to get a pin to go high and stay high immediately from power on, without using external hardware?

I've never actually used the LM311. The LM339 is readily available, inexpensive, and very easily used; also, in my experience if you need one comparator|shifter you need more one (usually).

External hardware is probably required; reason being that the pins are not 'reliable' until the OS has control-- even the GPIO don't really reliably default to inputs until after the pine board is booted up. For instance, if I needed GPIO pins that 'would' be reliable inputs prior to full bootup I would expand the GPIO bus with the MCP23S17;  those pins really are going to default to inputs from power on.

I have found the LM339 ( I've used it many times ) to be reliable, affordable, and easy to use. The main error that folks forget about is using a pullup on the output (it is required). But that is the beauty of open collector circuits because they also double as level shifters (albeit uni-directional).
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#10
(10-07-2016, 10:00 PM)MarkHaysHarris777 Wrote:
(10-07-2016, 06:46 PM)pfeerick Wrote:
(10-06-2016, 09:01 PM)MarkHaysHarris777 Wrote: Use a comparator on the PMIC output pin for DCDC1;  with an open collector, and pullup for 3v3 or 5v.

Set the threshold on the comparator for something reasonable so that the 'off' level ( .3 , whatever ) snaps the output to zero and holds it there. The LM339 is good in this kind of application.  These make great level detectors, operate at a wide voltage range, and have open collector outputs;  pullups are 'required'.

Is there any particular reason a LM311 wouldn't be more suitable - as it results in a smaller package size, unless you want the extra comparators. However, that is beside the point - you're basically agreeing that unless the threshold trigger voltage for the linbus transceiver the OP is wanting to use will accept 0.3v as off if using the 3.3v power pins on the RPi/euler bus, that there is no reliable way to get a pin to go high and stay high immediately from power on, without using external hardware?

I've never actually used the LM311. The LM339 is readily available, inexpensive, and very easily used; also, in my experience if you need one comparator|shifter you need more one (usually).

External hardware is probably required; reason being that the pins are not 'reliable' until the OS has control-- even the GPIO don't really reliably default to inputs until after the pine board is booted up. For instance, if I needed GPIO pins that 'would' be reliable inputs prior to full bootup I would expand the GPIO bus with the MCP23S17;  those pins really are going to default to inputs from power on.

I have found the LM339 ( I've used it many times ) to be reliable, affordable, and easy to use. The main error that folks forget about is using a pullup on the output (it is required). But that is the beauty of open collector circuits because they also double as level shifters (albeit uni-directional).
If operate on 5V, both LM311 and LM339 will work. If operate on 3.3V, better using LM339 due to LM311 minimum operating voltage is 3.5V.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Portable USB-Powered Monitor mribunal 4 10,492 02-03-2017, 05:28 AM
Last Post: stevenmeza07
  High speed I/O richw42 3 7,181 01-15-2017, 04:08 PM
Last Post: richw42
  Setting up UART2 for Adafruit GPS hat stephen fleming 1 3,803 05-13-2016, 03:20 PM
Last Post: peterz

Forum Jump:


Users browsing this thread: 2 Guest(s)