0

So I recently purchased a Grove Electromagnet + GrovePi+, everything works perfectly. However for the effect, I want to show in my experiment, I need more power out of the Grove Electromagnet. I'm not fluent in Python so do not know how to call this module/function. It is labeled to have 25N hold but I can't seem to even get a tenth of that, I know it is working because I tested it with a little screw, it seemed to hold it in place, but when I try to attract the screw from about a cm away it the effect isn't present. I know the relationship between distance and power, it is the inverse square law. But it should still attract, that's why I've concluded that the Electromagnet isn't being used to its full potential. Can anyone help? Thanks! I'll still keep looking.

Edit: I realised that from my prior knowledge in Python that if the output is set to something like 'GPIO.HIGH' then perhaps i can get more power to it. I'm going to try it.

import time
import grovepi

# The electromagnet can hold a 1KG weight

# Connect the Grove Electromagnet to digital port D4
# SIG,NC,VCC,GND
electromagnet = 4

grovepi.pinMode(electromagnet,"OUTPUT")
time.sleep(1)

while True:
    try:
        # Switch on electromagnet
        grovepi.digitalWrite(electromagnet,1)
        print "on"
        time.sleep(2)

        # Switch off electromagnet
        grovepi.digitalWrite(electromagnet,0)
        print "off"
        time.sleep(2)

    except KeyboardInterrupt:
        grovepi.digitalWrite(electromagnet,0)
        break
    except IOError:
        print "Error"

This is the code that is working, how would one edit it so that it is at the highest possible setting. Something like 'high' or 'max'? I'm still looking for the documentation for the 'grovepi' module. I think it only takes 1 or 0 sadly... :(

5
  • Well,the Groove datasheet I read says for 5V input, current would be 400mA, and can suck 1kg. Have you tried this out without first using Rpi python?.
    – tlfong01
    Commented Jul 18, 2019 at 11:30
  • Mine says 0.5A or 500mA and can suck 25N at 6V. This is labeled on the actual product itself. I can try, but I'm unsure how to set it up, I have two electromagnets, one is seen here - [wiki.seeedstudio.com/Grove-Electromagnet/] The other - [amazon.co.uk/gp/product/B008RFOI8U/… Is there no way to direct more current to the electromagnet programatically? Commented Jul 18, 2019 at 11:54
  • Nothing to do with the program. What hardware are you using to enable the Electromagnet?
    – Milliways
    Commented Jul 18, 2019 at 12:24
  • Grove Pi+ - [amazon.co.uk/gp/product/B01AFKN2TK/… Commented Jul 18, 2019 at 12:25
  • Hi xoxRumbleLorexox, actually I bought a couple of magnets from TaoBao, and I manually applied 6V and 12V to the coil (and later using python to control a power MOSFET). So according to Ohm's Law, higher voltage means higher current, and according to Lenz Law (not sure if it is Lenz), more current mean more magnetic power! :)
    – tlfong01
    Commented Jul 18, 2019 at 12:45

1 Answer 1

1

You can't get more power from a digital signal programmatically. There is no level higher than "1".

The electromagnet in your link is specifically designed to concentrate the magnetic field in the gap between the metal parts. This is what makes it strong when holding a weight attached to it, but the downside is the the magnetic field is nearly non-existent elsewhere. If you want to spread the magnetic field, you need a coil of a bigger diameter and without the core.

The inverse square law only applies when the source can be considered a point. It doesn't apply on distances comparable to the size of the electromagnet.

10
  • Thank you very much for your input, I guess I didn't realise this when I was purchasing it. Would you know where to purchase such a coil electromagnet which will cover a range of 25cm, I know quite large. Also, I wanted to clear something up why do you need a coil without a core? because does the core concentrates the field in the center? But I thought that adding a core makes the field stronger by up to 100x. Commented Jul 18, 2019 at 12:24
  • Hi xoxRumbleLorexox, I did not understand your question until I read Dmitry Grigoryev's explanation. I agree with him saying that what you need is a big coreless coil, and I guess you need a huge current, perhaps 10,000A to get the powerful field you want.
    – tlfong01
    Commented Jul 18, 2019 at 12:50
  • The core makes the field stronger by concentrating it in one place. You can increase the field density with it. If you need more intensity, your only option is to get more current density, that is Ampere-turns. This is not to say that a core is useless of course: it's the only way to get a significant density with a small electromagnet. The most powerful electromagnets don't have cores though, just very high currents. Commented Jul 18, 2019 at 12:53
  • Hi Dmitry Grigoryev, ah yes, more Ampere turns, not necessarily higher current. I need to revise my high school physics! :)
    – tlfong01
    Commented Jul 18, 2019 at 13:02
  • Also note that an electromagnet which can pick up a metal screw from a distance of 25 cm starts to become rather dangerous: if it picks up a larger object (screwdriver? knife?) and accelerates it all the way to the coil, you'll get yourself a nice Gauss canon. Commented Jul 18, 2019 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.