Shop OBEX P1 Docs P2 Docs Learn Events
Trouble with hall effect IC — Parallax Forums

Trouble with hall effect IC

groggorygroggory Posts: 205
edited 2012-02-23 15:34 in Propeller 1
I'm using this hall effect IC

http://www.mouser.com/catalog/specsheets/SL353.pdf

This is a Honeywell SL353 hall effect sensor.

When I power it up it defaults to a logic 1.

When I bring a magnet near it the output changes to a logic 0.

When I power it down and set a magnet on top of it, then power it up, the output is a logic 0. When I remove the magnet the output is a logic 1.

Per the spec sheet: "Note 1: These Hall-effect sensors may have an initial output in either the ON or OFF state if powered up with an applied magnetic
field in the differential zone (applied magnetic field > Brp and < Bop). Honeywell recommends that the application circuit designer
allow 10 μs after supply voltage has reached its rated value for the output voltage to stabilize."

....

I would like the sensor to power up with a logic 0. When exposed to a magnetic field I'd like it to change to a logic 1.

Would someone please help me accomplish this goal?

Thank you!

Comments

  • idbruceidbruce Posts: 6,197
    edited 2012-02-22 02:17
    groggory

    Have you tried a simple 10 μs "waitcnt" when the program boots before testing the value?

    Bruce
  • idbruceidbruce Posts: 6,197
    edited 2012-02-22 02:49
    groggory

    You could always use a variable to simulate an altered input, for example:
    CON
      HALL_EFFECT_INPUT = 3 'Assumes PIN# 3
    VAR
      BYTE HallEffectSensorState
    
    PUB Main
      WAITCNT(clkfreq / 100_000 + CNT)
      IF INA [3]
        'magnet is not present
        HallEffectSensorState =: 0
        
      ELSE
        'magnet is present
        HallEffectSensorState =: 1
    

    Why not just test the default input, like so:
    CON
      HALL_EFFECT_INPUT = 3 'Assumes PIN# 3
    PUB Main
      WAITCNT(clkfreq / 100_000 + CNT)
      IF INA [3]
        'magnet is not present
        
      ELSE
        'magnet is present
    

    EDIT: I am no electronic genius, but I believe you could also do it electronically with a logic device, I believe it would be a flipflop or an inverter.
  • groggorygroggory Posts: 205
    edited 2012-02-22 06:42
    idbruce wrote: »
    groggory

    You could always use a variable to simulate an altered input, for example:
    CON
      HALL_EFFECT_INPUT = 3 'Assumes PIN# 3
    VAR
      BYTE HallEffectSensorState
    
    PUB Main
      WAITCNT(clkfreq / 100_000 + CNT)
      IF INA [3]
        'magnet is not present
        HallEffectSensorState =: 0
        
      ELSE
        'magnet is present
        HallEffectSensorState =: 1
    

    Why not just test the default input, like so:
    CON
      HALL_EFFECT_INPUT = 3 'Assumes PIN# 3
    PUB Main
      WAITCNT(clkfreq / 100_000 + CNT)
      IF INA [3]
        'magnet is not present
        
      ELSE
        'magnet is present
    

    EDIT: I am no electronic genius, but I believe you could also do it electronically with a logic device, I believe it would be a flipflop or an inverter.

    I'm using the hall effect sensor as an on/off button. The sensor feeds a Maxim Max16054 , power switch controller. The Maxim Max16054 needs the 'button' to be at a logic 0 and then pulse logic 1 in order to change it's state. So this part of the circuit doesn't hit the propeller yet.

    This is going to be built into a very very space constrained application, so I was trying to minimize the number of chips and power consumption used.

    I'm thinking that I may need to change hall effect IC's to a model that's normally low and goes high when in the presence of a magnet.
  • idbruceidbruce Posts: 6,197
    edited 2012-02-22 06:55
    groggory

    Take a look at this page http://www.kpsec.freeuk.com/trancirc.htm , you can create a logic inverter with a transistor and two resistors if you can find room on the board for these items. On that page, look for the title "A transistor inverter (NOT gate)"

    Bruce
  • tonyp12tonyp12 Posts: 1,951
    edited 2012-02-22 08:19
    So you are using the Max16054 on/off latch switch ic, to power the Prop on.
    As you to save battery power you don't want the Prop to be simply sleeping (and using a little bit of power)

    But the hall sensor and Max16054 would Always be powered and should have a known state.(after new batteries may have to check state)
    As you want the magnet near once to turn on in and then later once again to turn if off.
  • groggorygroggory Posts: 205
    edited 2012-02-22 11:09
    tonyp12 wrote: »
    So you are using the Max16054 on/off latch switch ic, to power the Prop on.
    As you to save battery power you don't want the Prop to be simply sleeping (and using a little bit of power)

    But the hall sensor and Max16054 would Always be powered and should have a known state.(after new batteries may have to check state)
    As you want the magnet near once to turn on in and then later once again to turn if off.

    To my knowledge, the prop does not have a 'sleep' mode. The closest to a sleep mode it has is to hold the reset line low, but that still consumes a pretty appreciable amount of power. I believe having a cog sitting on a waitpne using the 22kHz internal oscillator uses less power than the reset low method.

    My plan was to have the hall effect sensor act as a switch for the Max16054. The Max16054 would then control a logic line to my buck regulator that creates the 3.3v for the circuit. The propeller will be powered by that regulator.

    The hall effect sensor takes a few microamps, the Max16054 takes a few microamps, and the sleep mode of the buck regulator takes a few microamps....So the current draw when the device is 'off' is pretty low.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-02-22 12:23
    I think the closest thing to a sleep mode on the Prop it to use RC slow, shut down all but one cog and have that cog use a waitpe (or friend). The Prop will use its minimum power (I don't remeber what the minimum power is) until awaked by the pin state.
  • groggorygroggory Posts: 205
    edited 2012-02-22 12:27
    Duane Degn wrote: »
    I think the closest thing to a sleep mode on the Prop it to use RC slow, shut down all but one cog and have that cog use a waitpe (or friend). The Prop will use its minimum power (I don't remeber what the minimum power is) until awaked by the pin state.

    RCslow (~20khz) 70 microamps (.07 milliamps)
    RCfast (~12mhz) 0.8 milliamps
    RCfast with xtal 5mz activated but chip still running on RCfast 1.12 milliamps
    xtal (5mhz) 0.6 milliamps pll off
    xtal (5mhz) + pll1x (5mhz) 1.3 milliamps (The pll itself operates at 80mhz, x1 is a tap)
    xtal (5mhz) + pll8x (40mhz) 2.9 milliamps
    xtal (5mhz) + pll16x (80mhz) 4.8 milliamps

    reset (reset button pressed) 0.8 milliamps
    programming (being programmed F11 from PC, propeller uses 12mhz RCfast) 3.9 milliamps
    brownout occurs at around 2.7 volts, at 2.5 volts 0.2 milliamp, at 2.2 volts 0.09 milliamp
  • pgbpsupgbpsu Posts: 460
    edited 2012-02-22 12:35
    groggory-

    Thanks for posting those numbers. Are those your measurements or are then pulled from some Parallax printed materials?

    If your measurements can you describe your setup?

    Thanks,
    Peter
  • groggorygroggory Posts: 205
    edited 2012-02-22 13:52
    pgbpsu wrote: »
    groggory-

    Thanks for posting those numbers. Are those your measurements or are then pulled from some Parallax printed materials?

    If your measurements can you describe your setup?

    Thanks,
    Peter

    http://forums.parallax.com/showthread.php?84907-Propeller-Current-Draw

    These were a single cog running who knows what. It was done by Tracey Allen.

    These numbers came from a pre-release propeller. Chip says they are likely lower now.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-02-22 14:00
    groggory wrote: »
    These were a single cog running who knows what. It was done by Tracy Allen.

    I'm pretty sure Tracy has done some additional power tests with the Prop. I don't remember which thread the additional tests are in.
  • groggorygroggory Posts: 205
    edited 2012-02-22 14:31
    Duane Degn wrote: »
    I'm pretty sure Tracy has done some additional power tests with the Prop. I don't remember which thread the additional tests are in.

    I just dug around the search tool and couldn't find it.

    If you find it please bump that thread or repost, it's great info (and should be in the spec sheet IMHO).

    I guess I'll take the numbers I posted and subtract 20% to get a rough estimate of power consumption.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-02-22 14:38
    I found it.

    http://forums.parallax.com/showthread.php?132961-Propeller-Power-Consumed-Based-on-Code&p=1019874&viewfull=1#post1019874

    I remembered the names of some of the forum members who had posted in the thread. That and using the "site:" feature was enough information for Google to find it.
  • groggorygroggory Posts: 205
    edited 2012-02-22 15:43
    Duane Degn wrote: »
    I found it.

    http://forums.parallax.com/showthread.php?132961-Propeller-Power-Consumed-Based-on-Code&p=1019874&viewfull=1#post1019874

    I remembered the names of some of the forum members who had posted in the thread. That and using the "site:" feature was enough information for Google to find it.

    Very nice! Thank you!
  • Mark_TMark_T Posts: 1,981
    edited 2012-02-23 10:02
    groggory wrote: »
    RCslow (~20khz) 70 microamps (.07 milliamps)
    RCfast (~12mhz) 0.8 milliamps
    RCfast with xtal 5mz activated but chip still running on RCfast 1.12 milliamps
    xtal (5mhz) 0.6 milliamps pll off
    xtal (5mhz) + pll1x (5mhz) 1.3 milliamps (The pll itself operates at 80mhz, x1 is a tap)
    xtal (5mhz) + pll8x (40mhz) 2.9 milliamps
    xtal (5mhz) + pll16x (80mhz) 4.8 milliamps

    reset (reset button pressed) 0.8 milliamps
    programming (being programmed F11 from PC, propeller uses 12mhz RCfast) 3.9 milliamps
    brownout occurs at around 2.7 volts, at 2.5 volts 0.2 milliamp, at 2.2 volts 0.09 milliamp

    I get 7uA for RCSLOW (that 70uA is probably the voltage regulator?) - 7uA is low enough for nearly all purposes.
  • tonyp12tonyp12 Posts: 1,951
    edited 2012-02-23 10:20
    Is it conclusive that you could connect the hall-sensor directly to the prop.
    and with software you can debouce/invert/latch etc
    Though you could not disable the voltage regulator (unless you get one just to power prop and one larger with enable for accessories)

    And this 20cent should work just as fine (though needs a 47k-470k pull-up)
    http://www.mouser.com/ProductDetail/Diodes-Inc/AH1751-WG-7-A/?qs=sGAEpiMZZMvhQj7WZhFIAG2N5sxMWGciBBICsA0G5Wo%3d
  • groggorygroggory Posts: 205
    edited 2012-02-23 14:57
    tonyp12 wrote: »
    Is it conclusive that you could connect the hall-sensor directly to the prop.
    and with software you can debouce/invert/latch etc
    Though you could not disable the voltage regulator (unless you get one just to power prop and one larger with enable for accessories)

    And this 20cent should work just as fine (though needs a 47k-470k pull-up)
    http://www.mouser.com/ProductDetail/Diodes-Inc/AH1751-WG-7-A/?qs=sGAEpiMZZMvhQj7WZhFIAG2N5sxMWGciBBICsA0G5Wo%3d

    Yes, I've verified that I can connect my current hall effect straight to the propeller.

    That hall effect has the downside of consuming 3.5-6mA. My hall effect takes <10 uA while 'sleeping'. When it's being triggered it requires a comparable amount to yours.
  • tonyp12tonyp12 Posts: 1,951
    edited 2012-02-23 15:34
    I forgot to look for only microAmp versions, here is all of them:
    http://www.mouser.com/Sensors/Hall-Effect-Magnetic-Sensors/Board-Mount-Hall-Effect-Magnetic-Sensors/_/N-6g7qoZscv7?P=1yzsbyyZ1yzsymjZ1z0w7ysZ1z0skrsZ1yzrvg5Z1z0rwf5Z1z0w0ma&Ns=Pricing|0


    If they are open drain version and your magnet makes them NC during "off state" would not be too good
    even with a 1M Ohm pull up resistor and if my calculations are correct would use 3.3 uA
Sign In or Register to comment.