this is my very first time posting in this community and also the first time dealing with Arduino stuff. I apologize in advance if there already are the answers to my questions and I just couldn't find it.
For a experimental school project, I'm building a platform that consist of multiple pendulums which are supposed to be operated using magnetic force generated by coils. In order to achieve sufficient forces, I need to run about 0,5-1 Amps through these coils (like pulses, not constantly) which gives the input voltage of about 24-48 Volts. Now I need to somehow controll this and I though using Arduino would be good approach, at least for the testing. In the end, I need to be able to fast regulate the current through the coils on range of (-1,1) A according to some data I'll be aquiring from sensors (my second question).
Due to space limmitations, I can only use Micro or Nano boards. And now here goes my question: What setup and what devices (maybe some relays or?) do I need to be able to drive that current to these coils and regulate it?
My second question is regarding the sensor. I need to measure the deflection of each pendulum from vertical axis. Pendulums are free to move in both X and Y. I was browsing the supply of some sensord, bumped into several accelerometers and gyros (sparkfun, adafruit). My concern is that the maximum deflection of my pendulums will be very small - max 2° while the length of the pendulum is roughly 60 cm. Still I need to be able to compute the position of the end of the pendulum from the sensor data quite precisely (+-2 mm). Is any of these accelero/gyro sensors capable of giving me such information?
I'm aware that some of my expectations can be dumb but thanks a ton for any advice or recommendation.
Due to space limmitations, I can only use Micro or Nano boards.
Why? The Arduino doesn't need to be very close to anything.
What setup and what devices (maybe some relays or?) do I need to be able to drive that current to these coils and regulate it?
You can't "drive the current" (whatever that means). You can turn the supply on or off, using a transistor. Study the datasheets to find one that can control the voltage and current you need - probably a MOSFET of some type.
Regarding first note, Arduino really has to be very close. I didn't want to be to specific describing my system but I probably should have. So the thing is that the pendulum consist thin tube (arm) and a module on the end which contain four coils pointed in each direction and all the electronics. The only external things shall be the power sources.
Each module is supposed to fit in the plastic ball with the radius of about 4 cm. So there we go witht the size restrictions.
By 'driving the current' I simply meant controlling the flow through these coils - perhaps bad choice of words, being foreigner, I guess I must have hard this somewhere
Anyway, if I get it right, I'll need some boost converter (transistor based) of a propper choice, connected to external power source and I'll switch it using single Arduino output? Or would it be possible to use the same power supply to power both Arduino and the coils?
I'm really not very good in the theory but I'm a bit afraid that these coils (being of quite big inductance) won't allow the current to change fast enough.
first is the second question and second is the first question.
you measure first. then control
to control your coils, I assume electro-magnets, and that means DC voltage.
you can control 1 amp of DC voltage with a lot of choices of devices.
I would offer that a TIP-120 transistor would be easy to find and easy to use.
I would also offer that an logic level FET's would work as well.
you can turn these things off an on a few thousand times a second. read about PWM to get an idea of what you can do.
switching it on and off based on some calculation not that difficult, and that comes to question 2
I would offer that most sensors offer a relative measurement. not always an exact. but in your case, relative is relative to the last position, and that would be constantly changing, both direction and speed. means it should be easier to get readings of changes.
I read that original post as requiring bidirectional control of the coils. That implies a motor driver chip instead of a simple transistor. I've used a TB6612 chip on a circuit board that I made to plug into a Pro Mini. That will control two coils of about 1 amp or maybe a bit more. This Sparkfun breakout looks like it will fit your size limits.
Measuring the pendulum position from within the pendulum is tricky. An accelerometer won't work. A gyro will, but the maths is not easy. An optical or ultrasonic distance sensor looking out the side, bouncing off a nearby object might work. A Pixy camera looking straight down may work if you can put a distinct spot on the floor.
This is exactly what I need - tips for particula devices that could be used. I'll check that transistor you propose.
I maybe presented myself being more laic than I actually am I wanted to prevent getting answers that I'd not understand. In fact I'm quite educated in signal theory (and PWM is something I deal with on regular basis), physics, math. What am I lacking is the knowledge about electronics in the practical use. I usually know that there 'should be some condenser and transistor' but not much clue about the values and absolutely no clue which type to pick
Regarding sensors, I know this is tricky field. All you say is correct for measuring position in XY plane. Maybe measuring angle could be better - that one is really inertial (absolute, or lets say relative to the gravity direction). But I'm really afraid that the resolution of inertial sensors would be to low for my application whrre I'd need to distinguish fractions of degrees.
you replied while I was typing reply to Dave. You have perfect estimate - I really need both direction. I'll definitely check that motor drive, it's sounds like spot on!
Sensor - I know, it's tricky and that's why it's part of my task If I could choose I'd go for one camera watching all the pendulums, but the aim is to have each pendulum 'module' to be rather self-contained (with the exception of power source). Proximity or distance sensors of any kind are something I was thinking of at first but there seem to be to many obstacles (i'd need four per module, would be very hard to tune while the 'neighborhood' is also moving).
Camera watching some bed bellow is GREAT idea though. I'll surely consider it. Thank you a lot.