electromagnets and messages, and other stuff

i have a few more questions. first, can i turn on an electromagnet using pin 9. second, how can i send signal to the computer, then display a message? can i do that using a batch or vbs program? finally, can 3 things share the same GND pin?(electromagnet, LED, piezo speaker/buzzer). i know its a mouthful, but please help. :slight_smile:

a4great:
i have a few more questions. first, can i turn on an electromagnet using pin 9.

Yes. Mind the max current specification. And add a suppression diode.

second, how can i send signal to the computer, then display a message? can i do that using a batch or vbs program?

Iā€™m pretty sure it can be done, but smarter guys than me can tell you how

finally, can 3 things share the same GND pin?(electromagnet, LED, piezo speaker/buzzer). i know its a mouthful, but please help. :slight_smile:

Yes.

How strong must the electromagnet be? You have to limit the current drawn directly from the controller which limits how strong the electromagnet would be if hooked direct, but the controller can 'valve' a transistor or other element to power the magnet to some desired strength. But for current/voltage beyond the limited amount that your board may take (if you have a Ruggeduino, it will be -more-) you will want to use an external power supply with external wires to your higher power parts.

Yes you can connect many things to the same ground. If you run a lot of current it might be best to provide a thick wire or strap to ground on your power supply and connect the Arduino ground to that rather than pass it all through the poor little Arduino. A good solid ground will save you possible mysteries down the road.

You should definitely do some of the tutorials, some include USB serial communication back to your PC. http://arduino.cc/en/Tutorial/HomePage

how can i send signal to the computer

What signal? The PC is not very good at receiving smoke signals.

then display a message?

On what?

can i do that using a batch or vbs program?

I don't think a batch program interactively displaying messages will work very well. A VB application would be a better choice.

It's been a while, over 10 years, since I regularly ran console instead of GUI but IIRC I could pipe from COM in command line and from there, sure cat or echo do work.

GoForSmoke: How strong must the electromagnet be? You have to limit the current drawn directly from the controller which limits how strong the electromagnet would be if hooked direct, but the controller can 'valve' a transistor or other element to power the magnet to some desired strength. But for current/voltage beyond the limited amount that your board may take (if you have a Ruggeduino, it will be -more-) you will want to use an external power supply with external wires to your higher power parts.

Yes you can connect many things to the same ground. If you run a lot of current it might be best to provide a thick wire or strap to ground on your power supply and connect the Arduino ground to that rather than pass it all through the poor little Arduino. A good solid ground will save you possible mysteries down the road.

You should definitely do some of the tutorials, some include USB serial communication back to your PC. http://arduino.cc/en/Tutorial/HomePage

whats the current limit on the uno? and when you say external, you mean a usb connection or a battery pack right? sorry, im very new to this.

You can run about 40mA on a pin and I'm probably high on this but 500mA through the board total. And you can run a lot more outside the board and use the board to control that. Just make sure the board ground connects to the external ground, volts measure relative to ground and you want them measured from the same base.

External power can be a plug-in power supply. There's lots of types available. Wall warts are less efficient than switching supplies and not much cheaper and they do get warm. Laptop power supplies are okay though they tend to run 15V minimum. What's good depends on what you're doing so don't buy and then think what you need.

You can go with batteries. You can keep those charged by solar/wind/water power even. As long as you have enough clean power it doesn't matter the source.

How much current your electromagnet needs is up to what you want to do with it. But very likely it should be powered externally if just to leave the board enough power to do other things.