picaxe 8M and repeat cycle timer help

Discussion in 'General Electronics Chat' started by TCLynx, Aug 17, 2010.

  1. TCLynx

    Thread Starter New Member

    Aug 17, 2010
    9
    0
    Hi all, I wasn't sure if there was an appropriate place to introduce myself and as for a bit of direction.

    I'm not in school and this isn't a "homework assignment" unless you figure it so because I'm trying to teach myself and I'm at "home"

    Anyway, I've managed to teach myself how to build simple 555 repeat cycle timers and I've done some more complex stuff with the help of some friends.
    (I have good soldering skills and signal flow but I'm a bit green on the more in depth electronics stuff.)

    Anyway, I have in my grubby little hands a picaxe 8M and the usb programing board to play with it as well as the software to program it (once I learn a bit more.)

    I would like to find some examples of some very simple circuits and projects. I want to create a repeat cycle timer that I can program for say 5 minutes on 5 minutes off for example or 15 minutes on 1 minute off or what ever, I figure this should be fairly easy and perhaps that is why I'm having such a difficult time finding and info on doing it, everyone thinks it is too simple to bother with.

    So please, can some one point me at some resources that might help me learn more about doing this?
     
  2. pilko

    Senior Member

    Dec 8, 2008
    213
    20
    Look in Picaxe Manual 2 at the "pause" and "wait" commands.

    pilko
     
  3. TCLynx

    Thread Starter New Member

    Aug 17, 2010
    9
    0
    Ah, yes thank you. I had just run into the fact that I can't do a pause longer than a certain length. And you just pointed me where in the manual to find the answers.

    I'll probably be back some time soon when I go to hook up the transistor and relay to actually power something with this simple timer.

    Please post tips and warning if you have any off the top of your head. (I can manage this without hurting my self or other living creatures, I know enough about electricity to do the big wiring, but I don't want to burn up my chip before I get more for tinkering.)
     
  4. TCLynx

    Thread Starter New Member

    Aug 17, 2010
    9
    0
    Ok, so I've programed a very simple timer on my picaxe 8M.

    I now want to hook it up to something to be turned on and off.

    I probably need to learn a little about voltage regulation so I don't fry my chip. (and to give me a bit more power to have on hand to operate something like a relay.) Where do I go to learn a bit about those sort of parts?

    Next, I don't know much about transistors. I need to learn a bit of basics about those since most of the interface circuits seem to use them.

    And since I'll probably be hooking up with a relay the total power supplied to the overall circuit probably needs to be higher voltage than the 5 V for the chip which brings us back to voltage regulation.
     
  5. Jaguarjoe

    Active Member

    Apr 7, 2010
    770
    90
    Did you post any of this on the Picaxe forum? They'll bring you up to speed in no time. They are a very friendly bunch too.
    Did you look in Picaxe manual #3 for interfacing your Picaxe output with a transistor or mosfet?
     
  6. TCLynx

    Thread Starter New Member

    Aug 17, 2010
    9
    0
    I have not yet registered on that forum. I have read through the manual 3 though. Issue I had with the manual info was that they only mention one part for each possibility and I don't know enough about some of these parts to know what others might be compatible.

    I have a 9V power supply as well as some 12V power supplies which should work with many of the relays I have on hand.

    I need to sort out supplying the chip with power using a voltage regulator that will give it 5V (I think I can get such a thing at radio shack maybe, though most radio shacks don't seem to stock much of the components anymore.) Then I need to find the appropriate transistors to work with the output and the relay. Unfortunately radio shack doesn't return any search results when I try the numbers that the Picaxe manual has.

    We have an aerospace surplus place locally and I might be able to get many of the parts I need there, unfortunately, most of the people working there are too busy to help someone figure out specific project parts. I need to arm myself with more knowledge before I show up there.

    And I may have many of the parts needed already here if I can figure out the functioning a little better.

    Perhaps I'll go post over on the picaxe site too.
     
  7. TCLynx

    Thread Starter New Member

    Aug 17, 2010
    9
    0
    Ah, because I've not been activated properly yet over there , I can't post questions(perhaps the admin has been sleeping since I registered since it is across the pond), that might be why I didn't post there first (sorry, been a long hot week with non functional air conditioning in 100 +F weather here in central FL.)
     
  8. TCLynx

    Thread Starter New Member

    Aug 17, 2010
    9
    0
    So the picaxe manual recommends using a pair of transistors like BC548B with BC639 or BCX38B on it's own. However, I'm not finding any of those or the MOSFET IRF530.

    Can anyone help me find info about what other parts might sub in to have a 8M chip switch a relay. (I've got plenty of small 12 volt relays on hand and even one 9 volt relay and I have 12 volt or 9 volt power supplies and I can find the 5 volt regulator part as well as the various diodes and resistors needed.)

    I'm just not sure if any of the transistors in the junk box will meet my needs.
     
  9. Jaguarjoe

    Active Member

    Apr 7, 2010
    770
    90
    BCxxx parts are European and the Picaxe system is from England. Radio Shack won't have anything like that.
    BCX38B is an obsolete part. Use a BCX38C instead. They're 14 cents each
    IRF530 is really an IRF530PBF. They're $1.76
    Both of these parts along with just about anything else you need are available from Mouser Electronics.
    Before you start substituting parts on your own, build your circuits with the parts specified. If you can't find a part the guys and gals on the Picaxe forum will be more than glad to help, Just ask.
    Happy Picaxing!
     
  10. TCLynx

    Thread Starter New Member

    Aug 17, 2010
    9
    0
    Well I finally got onto the picaxe forum and was told that the TIP102G I have on hand could work (even though it is kinda overkill)

    but anyway. No one has commented on my diagram I posted there to ask if it might work (or please let me know what I drew wrong so I fix it before trying it.)

    I'll try and post it here too.

    Please comment.
     
  11. Jaguarjoe

    Active Member

    Apr 7, 2010
    770
    90
    Everything looks great. I didn't check the Picaxe pins but I trust you figured that out. Do you know how much curent your 12 volt relay consumes? If its more than about 250 ma you 'll need to make the 10k resistor a lower value. Another way to find out is to measure the voltage across the C-E junction of the transistor when the relay is energized. It should be close to 2.0 volts. If its much more than that the 10k is definitely too big.
    FWIW- the tp102g is really a tIp102g
     
  12. TCLynx

    Thread Starter New Member

    Aug 17, 2010
    9
    0
    Thank you Jaguarjoe, So I got the interfacing to the power and the transistor and relay right, that is what I'm most worried about as I don't want to be frying chips. Pins on the 08M I've got pretty well sused as I have the picaxe manual. I'll probably use output 1 which is leg 6 as I drew it. The program for this is practically nothing. I almost feel I should have the chip play a tune as I do this just so it feels like it actually has a job. But no, I want to make this as tiny as possible. I'll probably add a couple LEDs once all is said and done. Probably one so I can see that there is power to the unit and another to show when the pump should be running. The resistance on the coil is 322 ohms and when I hooked up to the power supply (which is probably really closer to 15 VDC than the 12 VDC it says on the tag) to measure current I get about 44 mA And that relay says the contacts should be good for 15A 125V so I figure it should be able to handle even a 3.5 amp surge on pump start up if I hook up the bigger pump instead of the little 50 watt pump I will normally switch with this timer.
     
  13. TCLynx

    Thread Starter New Member

    Aug 17, 2010
    9
    0
    You are right. I think it just shrunk down so much in the drawing when I re-sized to post.


    I've got another part on hand here that I was wondering if it would work as well as the TIP102g?

    Would a 2N6044 work instead of the TIP102g?

    I looked up the data sheet but I'm not very good at reading or understanding what information is really meaningful to the situation.
     
  14. Jaguarjoe

    Active Member

    Apr 7, 2010
    770
    90
    A 2N6044 will work just fine. Remember to watch the on state voltage across the transistor to make sure its 2 volts.
     
Loading...