Bringing Up the HB-25 After the Stamp
Bill Chennault
Posts: 1,198
All--
I got my skid-steer up and running today under Stamp control. (Soon, my wife will name it. I wanted to name it after one of her sisters that does unpredictable things, but that pretty much got vetoed.)
Anyway, the HB-25 documentation makes it pretty clear that the Stamp must be up and running and fully in control of its faculties and ready to control the HB-25, or the HB-25 will simply do nothing. Today, I found out that this is true. So, the Stamp needs to be ready to control the HB-25 before the HB-25 is powered up.
The HB-25 runs off my 12vdc system. (The 12vdc ground is tied to the 7.2vdc ground of the battery pack that powers my Stamps.) What I would LIKE to do is never turn off the Stamps. (I do not know if it is possible to do this and recharge them when necessary.) But, I WOULD like to turn off the 12vdc system which powers the HB-25s and the gearmotors and before long, some other stuff. My first reason for turning the 12vdc off concerns the HB-25s cooling fan. I am sure it does not draw much current, but it makes a little noise and there is no good reason for the 12vdc system to be up and running, anyway.
This is easy: All I have to do is put a manual switch in it. However, that is not what I want to do. I want to control the 12vdc system using a Stamp which is ALWAYS powered up. So, I am thinking of using a 74HC595 to drive a relay that will handle 12vdc at 24 amps.
What do you think?
Thanks!
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
I got my skid-steer up and running today under Stamp control. (Soon, my wife will name it. I wanted to name it after one of her sisters that does unpredictable things, but that pretty much got vetoed.)
Anyway, the HB-25 documentation makes it pretty clear that the Stamp must be up and running and fully in control of its faculties and ready to control the HB-25, or the HB-25 will simply do nothing. Today, I found out that this is true. So, the Stamp needs to be ready to control the HB-25 before the HB-25 is powered up.
The HB-25 runs off my 12vdc system. (The 12vdc ground is tied to the 7.2vdc ground of the battery pack that powers my Stamps.) What I would LIKE to do is never turn off the Stamps. (I do not know if it is possible to do this and recharge them when necessary.) But, I WOULD like to turn off the 12vdc system which powers the HB-25s and the gearmotors and before long, some other stuff. My first reason for turning the 12vdc off concerns the HB-25s cooling fan. I am sure it does not draw much current, but it makes a little noise and there is no good reason for the 12vdc system to be up and running, anyway.
This is easy: All I have to do is put a manual switch in it. However, that is not what I want to do. I want to control the 12vdc system using a Stamp which is ALWAYS powered up. So, I am thinking of using a 74HC595 to drive a relay that will handle 12vdc at 24 amps.
What do you think?
Thanks!
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
Comments
You should have the stamp control its own power too. (Have a pushbutton that you hold down while the stamp turns the relay on)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--DFaust
I posted in another thread a home-built bot using the new wheels we’re working on. That robot has a separate power switch for the logic and motors. I always turn the logic on and then the motors. I also always turn off the motors before the logic, although this is not necessary. If you wanted logic control of the power system there is no need to use a 74HC595 to drive the relay. Just use a transistor or MOSFET of a single I/O line instead. It would take three to control the 74HC595, unless you need the extra outputs.
As a note, the HB-25 really wants to see the signal line LOW at startup, although when the BASIC Stamp waits for a high then does this it is close enough. The problem comes when the line is floating then later brought low. This condition may cause the HB-25 to seem to hang. On the other hand if you’re going to control power via logic you can always make the HB-25 signal line LOW prior to powering them up. I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I THINK what you described results in what I am experiencing . . . unpredictable behavior of HB-25(s) upon power up. But, not due to my failure to bring the logic up first. I THINK it is due to the fact that since I don't have a relay or a switch (never thought of either when I was building), I have to insert the power wire into a screw terminal. This has got to cause a little "noise" on the line! (A few Ctrl-R strokes usually straightens everything out dandy.)
I have a SSR on the way that will solve the problem. However, I am sure I will be asking questions about how to drive the SSR with a 74HC595 via a Stamp pin. I have used the 74HC595 before in an experiment in one of your books. Easy, and I do not expect this to be much more difficult.
Thank you!
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
Unless you need 8 additional I/O pins you should just drive the SSR from a single I/O pin. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Nope. I don't need the pins, that's for sure. I thought the SSR I bought drew too much current to be driven directly from a Stamp pin. But, it is an SSR with photo-isolation. Does that mean all the Stamp does is drive an LED in the SSR?
Here is a link to what I bought: http://www.futurlec.com/Relays/SSRDC100V40A.shtml
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
Electronically, the input of an SSR is an LED. So you determine the current via the inline resistor. Many SSR have an internal resistor or rated current draw so check the datasheet for your device.
EDIT: Just saw your link to the datasheet…It looks like the input voltage changes depending on whether the device has the indicator LED in it. As for current, it is listed for a 32V input. The current will be less at 5V. You should be able to drive it directly from am I/O pin. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Thank you so much for taking the time to look at that datasheet and interpret it for me!
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
As others mentioned, it sounds like you have a floating control input to the HB-25.· In addition to controlling what gets powered up in which order,· you can add a pulldown resistor to the HB-25 control line which will hold the control line in a defined state (logic low) when it's powered up.· A 4.7K or 10K resistor to ground will do the trick.· It's generally a good idea to have a pullup or pulldown resistor on any unused CMOS logic input or any input that could temporarily be connected to another input instead of an output (like an uninitialized Stamp I/O pin).
Thank you for that advice and I know you will not·mind a stupid question: A pull-down resistor is tied from the line in question (the HB-25 control line, in this case) to ground? And (for my information), a pull-up resistor would tie the line in question--in the Stamp environment--to VDD?
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
In this case a pull-down won’t work because there’s a pull-up internal to the HB-25. It’s best to either drive the I/O line LOW prior to powering up the HB-25 or simply use the example code which tests for a high on the signal pin (indicating power-up) and immediately drive the pin LOW. This works in all tests and is the recommended method for this controller. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Your sample code is the "header" to all my HB-25 programs. In other words, all my programs begin with .·. .
HB25··········· PIN···· 15············· ' I/O Pin For HB-25
DO : LOOP UNTIL HB25 = 1··············· ' Wait For HB-25 Power Up
LOW HB25······························· ' Make I/O Pin Output/Low
PAUSE 5································ ' Wait For HB-25 To Initialize
PULSOUT HB25, 750······················ ' Stop Motor 1
Then, I do stuff. So, if I am understanding correctly, I should do nothing other than fix my hoakie power connection?
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
I· read some where in This Forum a while back about having a Basic Stamp have a soft start where it slow power up·the stamp because there servo where moving back and forth alittle bit on power up
I try to find it for you to read but I can not find where it is
Maybe some one on the Forum Knows where that Post is
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Thank you! And, I always have a tiny piece of code at the end of every program that causes the HB-25s to stop the motors. Maybe great AND minor minds think alike! [noparse]:)[/noparse]
--Bill; aka Minor Mind
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.