Electronics > Projects, Designs, and Technical Stuff
Borderlands style jewelry box research thread
Youkai:
Oh yes you are right. That could be solved pretty easily by making the part of the pillar that goes below the base of the box an extension. The feet can have a post that slots into the main body and I can glue then together
Ian.M:
For a PM (permanent magnet) DC motor, torque and speed are closely interrelated, and the relationship is set by the motor design and construction. See http://hades.mech.northwestern.edu/index.php/Brushed_DC_Motor_Theory for a brief introduction.
A PM motor also acts as a generator, with an output voltage proportional to shaft speed, and even when running as a motor, the induced voltage in the windings from their movement through the stator field is still exactly the same as when it was running as a generator at the same speed, and this voltage (known as the back-EMF) opposes the applied supply voltage, and only the difference is available to drive current through the winding resistance. Theoretically, an unloaded frictionless motor will speed up until its generated voltage matches the supply voltage, at which point, with no current flowing, it cannot draw any more power to accelerate further, so a PM motor's maximum speed is proportinal to the average supply voltage.
Neglecting frictional losses and stiction, average torque is directly proportional to average current, and, assuming constant winding resistance (ignoring temperature effects) this results in the straight line torque vs speed 'curve' of an ideal PM DC motor.
Now lets get back to your problem - driving a mechanism from limit to limit without bits snapping and flying off, or the motor burning out when it hits the limit. If you ran a motor direct off the supply rail (e.g. using a pair of relays to operate it in either direction), one of three things would happen when the mechanism hits a mechanical end stop. If the torque available exceeds the strength of the weakest part of the mechanism, it will break. That's the one to avoid at all costs. If there is a friction drive (e.g. an untoothed belt drive) or clutch in the drive train, there may be enough torque to cause it to slip. That can be tolerated for a short time, but prolonged and repeated slipping will wear it out so is best avoided. The remaining possibility is that the motor will stall. At that point the current through it is only limited by its winding resistance so it will rapidly heat up. As long as the supply can handle the stall current and you cut power before the winding exceeds its maximum permissible insulation temperature, and the applied voltage isn't high enough for the stall current to demagnetise the stator, no damage will be done.
Now lets consider a PM DC motor driven by a H-bridge with current sensing, controlled by a MCU with the current sense voltage fed to an ADC input. Your code can control the average voltage across and current through the motor by varying the PWM duty cycle. If you close the loop in software to prevent the motor current exceeding your desired limit by reducing the PWM duty cycle, you get torque limiting.
However the MCU cant react instantaneously, so you need either some resilience in the drive train or resilient (rubber or sprung) end stops so the torque at the limit ramps up slowly enough for the code to read the current increase and react by dropping the PWM duty cycle.
Also, you'll want to detect prolonged stall or near stall conditions and fully cut motor power to prevent overheating.
It gets easier to code for soeed control if you also have a means of directly monitoring the motor speed rather than having to calculate it from the supply voltage, PWM duty cycle, motor current and the motor's parameters. This can be done electronically by measuring the back-EMF during the off period of the PWM duty cycle, but the voltage is noisy and a circuit to sample it and average it without reading the supply voltage during the PWM on period is quite complex. Its generally preferable to add a sensor that provides a pulse-train at a rate proportional to the shaft speed. At its simplest this can be an optical or hall sensor giving one pulse per turn, although for faster reaction multiple pulses per turn from an encoder disk are preferable.
One option for really compact small geared motors is to hack servos to remove the feedback pot and any stops that prevent continuous rotation. The feedback pot is replaced by a trimpot that is adjusted so the motor doesn't turn when a 1ms control pulse is present. Then the output shaft will turn forwards or backwards as the control pulse varies from 1ms, usually with speed proportional to the difference in its width from 1ms. However this arrangement is prone to unwanted motor creep at the supposedly off 1ms pulsewidth, so its advisable to include a MOSFET to cut power to the motor when you want it really off. The built-in drive electronics remove the need for a separate H bridge. Current sensing can be added in the supply wire to the servo, and if you can get access to the side of a gear early in the geartrain. an encoder disk can be printed on a sticky label and used with a retro-reflective optical sensor to get the shaft speed.
Youkai:
Wow lot of information there. Thanks Ian.M. I'll try to digest it all. Probably going to need to do some tests with my Arduino board and the setup you are suggesting (H-bridge, MOSFET). Are there any considerations I need to be aware of when looking for a motor to test with? Can I just google "hobby pm dc motor" and pick whichever?
Could I get a 6v motor and use the same 5v power source I'm going to run the Arduino from? For simplicity (especially if I'm going to give this to someone as a gift) I'd like there to be only one power source. If I get motors that need higher than 5v to do what I need them to do then I either have to have a voltage regulator to split some power off for the Arduino or I need two power sources; one for Arduino, one for motors.
Also NiHaoMike's comment made me realize there is a big overhang in the design so I updated the model to have the feet of the posts be detached so the base of the main box will sit on the printing bed. After printing a can glue them together and putty/sand the joint before painting to make it seem like one solid post.
Ian.M:
Brushed DC Motor voltage is a bit notional anyway - most will be reasonably happy at significant over or under voltages. The limits are mechanical, thermal and magnetic. Far too much voltage and the rotor may destroy itself by overspeeding and bursting, but you are far more likely to cook it by working it too hard before it flies apart. The actual voltage spec will be chosen by the manufacturer to get an acceptable probability of failure over the design operating lifespan, and so the stall current isn't high enough to demagnetise the stator.
5V is near enough so a 6V motor will run with about 80% of its nominal performance (i.e 80% of full speed, 80% of max torque). Another option would be a 3V motor and never exceed 60% PWM duty cycle.
Also most Arduinos have an on-board regulator. e.g. a Uno or Nano can accept up to 12V Vin and will regulate that down to 5V for the ATmega328P, so you could use higher voltage motors. However if you do that you have to be careful how much current you draw from the Arduino's 5V rail (including current out of Arduino I/O pins configured as outputs at a logic '1' level).as at 12V in, every extra mA drawn is another 7 mW of dissipation from the regulator and its got barely enough copper area to heatsink it as-is. The higher Vin is above the minimum of 7V, or the higher the ambient temperature, the less 5V current you can draw. You'll also run into regulator overheating problems if the board is in a poorly ventilated enclosure. If you need more 5V current than the onboard regulator can safely provide, the best option is a properly heatsinked external regulator if you need a low-noise 5V supply or an external switched mode buck regulator if you need it to run cool but can tolerate some HF ripple on your external 5V rail. If you use an external regulator, be aware that anything running off its output wont be powered if the Arduino is running purely off USB power.
Youkai:
Started looking into the power supply for this project. Went to the local thrift shop and found a wall adapter from something that supplies 12VDC and 500mA. My RGB LED strip runs on 12v. Also got a food saver vacuum that runs on 5v but I scavenged the barrel plug from that so I can have something to plug into. Pulled the plug out of the sealer and connected it to my adapter. Was able to power the segment of LED strip using this setup. Yay!
Now I just need to get a voltage regulator and some transistors and start working on a circuit diagram.
Currently the plan is for the thing to contain the following:
* 2 LED strip of the length shown in the image
* 3 servo: Futaba S3004 or similar
* Arduino (I have an Uno but I'll probably consider getting a board with a smaller footprint)
* Probably a TLC 5940 PWM driver or two since the arduino probably won't have enough PWM pins.
* Some transistors between the Arduino and LED strips
* Voltage regulator
Any reason to believe the power supply I found will be insufficient? I don't see anything on the box about minimum power needs for the Arduino.
Also I still need to do some testing on the servos. I think they will produce enough torque to do what I need since the parts won't be very heavy; but Ian.M has his doubts so I'll need to make sure these will work and come up with something else if not.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version