Shop OBEX P1 Docs P2 Docs Learn Events
BS2 and electromagnet — Parallax Forums

BS2 and electromagnet

alnajjar1alnajjar1 Posts: 110
edited 2010-11-14 06:14 in BASIC Stamp
I am powering an electromagnet with a BS2 via a TIP120. The EM draws about 0.7A. The power supply is regulated and provides 5Amp.

The Stamp turn the EM on and of at intervals of about 10 seconds. There are other components (see attached circuit). The code is very simple turning the EM on and off when the switch is depressed. The circuit functions flawlessly for several days but then the Stamp dies completely, twice already.

All output pins including buzzer and LED are current limited 0.01 mA by the 470 ohm resistors so I don't think that is a factor especially when all of them are turned on together.

The EM and the Stamp are in the same enclosure. Do you think EM radiation and frequent rise and collapse of the field impact the Stamp's internal electronics?

any thoughts?

Al
883 x 411 - 119K

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2010-11-04 07:49
    What kind of diode are you using across the coil? If your 'charging' your coil with nearly 1A, then the back-emf diode should also be rated for 1A.

    Also, to 'harden' the I/O pin driving the TIP120, you could also put a reverse biased diode there, but I tend to lean more towards the diode across your coil not being adequate as the source of your failure based on your description.
  • stamptrolstamptrol Posts: 1,731
    edited 2010-11-04 07:51
    Do you mean the Stamp is totally destroyed? Or is damaged confined to one pin?

    The magnetic field should have no appreciable effect on the Stamp.

    Is the diode used with the coil up to the task, in terms of current rating and voltage rating?
  • alnajjar1alnajjar1 Posts: 110
    edited 2010-11-05 05:16
    The BS2 stops working all together and no longer programmable. I will check on the diode rating, but I thought the BS2 is completely insulated from the Coil via the TIP120. How does back EMF make to the BS2 through the TIP120 base pin?
  • stamptrolstamptrol Posts: 1,731
    edited 2010-11-05 10:25
    There is no isolation with a junction transistor. Spikes and other electrical noise can get back through to the base. Thats why the diode and other spike/surge protection is so important.
    Still a bit surprised the damage was so complete.
  • alnajjar1alnajjar1 Posts: 110
    edited 2010-11-05 16:20
    I checked and the diode I am using is IN4007 which is rated for I forward surge protection at 30A and DC voltage blocking at 1000V. I could be reading the specs wrong but it seems that the diode should handle the job.

    I will use a solid state relay to turn the EM on and off that way there is complete isolation.

    Al
  • $WMc%$WMc% Posts: 1,884
    edited 2010-11-06 15:24
    alnajjar1 wrote: »
    I checked and the diode I am using is IN4007 which is rated for I forward surge protection at 30A and DC voltage blocking at 1000V. I could be reading the specs wrong but it seems that the diode should handle the job.

    I will use a solid state relay to turn the EM on and off that way there is complete isolation.

    Al
    '
    I like SSRs,They work good in low freq App.s
    '
    I didn't see the power supply for the Stamp or for the Electro.Magnet. I would look at this before I tried something else with another stamp.
    '
    I'm no engineer, But I think the 470 ohm resister on the base pin of the TIP120 should have protected the stamp from BEMF. Could you post the power supply set-up?
    I suspect this is were the problem is.
    '
    I would use a driver for the buzzer as well (BEMF).You could replace the buzzer with an LED and resister to get the code working for now.Then go back and make the buzzer work.
  • MoskogMoskog Posts: 554
    edited 2010-11-09 07:42
    It happends the BS2 can act strange. One time one of my BS2's could not be recognized by the computer of unknown reasons and then suddenly been seen again later at night. I couple of days ago another one stopped running the loop when I disconnected the serial cable from the PCB. I could program it but run the program only as long the serial was connected. I reset it and took away power but still couldnt run the program unless serial cable was connected and also connected to the computer. Well, I left the shed for the night and came back next morning, turned on power without the serial cable in and now the BS2 ran the program loop without any problem at all, with or without the serial connection.
  • $WMc%$WMc% Posts: 1,884
    edited 2010-11-09 17:38
    Moskog wrote: »
    It happends the BS2 can act strange. One time one of my BS2's could not be recognized by the computer of unknown reasons and then suddenly been seen again later at night. I couple of days ago another one stopped running the loop when I disconnected the serial cable from the PCB. I could program it but run the program only as long the serial was connected. I reset it and took away power but still couldnt run the program unless serial cable was connected and also connected to the computer. Well, I left the shed for the night and came back next morning, turned on power without the serial cable in and now the BS2 ran the program loop without any problem at all, with or without the serial connection.
    '
    Moskog:
    '
    I've been using the BS2's for years now.I have some Stamps that run 24-7 and work flawlessly.
    '
    The only times I have had a Stamp ACT strange is when I did some strange wiring or I wrote some strange code!
  • MoskogMoskog Posts: 554
    edited 2010-11-09 22:33
    $WMc% wrote: »
    '
    The only times I have had a Stamp ACT strange is when I did some strange wiring or I wrote some strange code!

    Yes, same thing here. Never faced any kind of problems with Stamps in compleated projects, I also have several of them running 24/7.
  • Alan BradfordAlan Bradford Posts: 172
    edited 2010-11-14 06:14
    I also have Stamps running 24/7 and the oldest ones were put in service in 1998.
    The only ones destroyed were incorrect connections and Lighting Strikes.

    Are you using the intrenal regulator..or an external +5 volt supply?
    If using the internal regulator, what is the supply votage?

    You may be overheating the regulator if you are using the same +12 volt power supply as the EM.
    The buzzer and led both add to the load on the regulator.
    It has to dissapate the extra 7 volts as heat and can damage the stamp.

    I Always use an external 5 volt supply for the stamp.
    You can regulate the +12 to +5 and filter it to keep the EM noise out.
    I would also run the buzzer from a transistor connected to the output pin to take the load off the stamp.
Sign In or Register to comment.