Shop OBEX P1 Docs P2 Docs Learn Events
Power-On Propeller Microcontroller and HB25 — Parallax Forums

Power-On Propeller Microcontroller and HB25

rj33wrj33w Posts: 2
edited 2013-08-22 12:57 in Propeller 1
I am using the Propeller Microcontroller with the HB25. I am trying to power-on both with a single switch. Everything works fine if I power-on the HB25, then the microcontroller. Everything also works fine if I power-on the microcontroller, then the HB25. When I power them on simultaneously, the HB25 does not operate. I have tried spin code (below) similar to the sample (which is in .bs2) that waits until the HB25 has initialized.
waitpeq(|< pin, |< pin, 0) 'Wait for the HB25 to initialize
dira[pin]~~ 'Set pin as output
outa[pin]~ 'Set pin to low

Is it absolutely true that you cannot power-on both the microcontroller and HB25 at the same time? Is there any spin code I could use to allow them to power-on at the same time? If this will not work programmatically in anyway, does anyone have a recommendation on how I could power both on with the same switch? I suppose I would have to create some type of delay so that the HB25 will power-on after the microcontroller? Any ideas?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-08-20 08:43
    Welcome to the forums. The problem is that the HB-25 signal line needs to be brought low right after power-up of the HB-25. When you power the HB-25 and the Propeller up at the same time there is a delay while the Propeller copies data from the EEPROM to RAM. During this time the I/O pins remain floating and so on the HB-25 an internal pull-up causes the line to remain high and after a short period of time the HB-25 switches into another state. I'd have to confirm, but I think it might be assuming that high is the idle state at this point, causing things to be inverted. I will get more information if possible. In the mean time, as for the delay, you could use an automotive relay (switched by a transistor or FET) between the battery and the HB-25 power input. Once the Propeller has initialized it could turn on the relay powering up the HB-25 and the Propeller would be ready to monitor and bring the signal line low as needed.
  • rj33wrj33w Posts: 2
    edited 2013-08-20 19:05
    If you can find additional info, that would very helpful. Thank you. I will research the relay option.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-20 21:23
    Would a pull-down resistor on the signal line work?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-08-21 16:33
    No, because of the pull-up resistor you'd effectively be creating a divider and the most likely effect of that is that the signal wouldn't be fully high or low at any given time.
  • jonesjones Posts: 281
    edited 2013-08-22 12:57
    I'm not familiar with the HB-25, but would this work? Use an NPN transistor (e.g. 3904) with the collector tied to the HB-25 line, the emitter to ground and the base tied to the I/O line on the Prop. Include a pullup on the transistor base . As soon as power is applied the transistor turns on and pulls the HB-25 line low. When you want the opposite state, have the Prop pull the transistor base low which turns off the transistor, allowing the internal pullup in the HB-25 to pull the line high. No high-current relays needed, but the logic is inverted when you try to control the HB-25 with the Prop.
Sign In or Register to comment.