Electronics > Projects, Designs, and Technical Stuff
Borderlands style jewelry box research thread
<< < (17/17)
Youkai:
Hey guys awesome news. It looks like a total rats nest but I wired up most of the circuit and it seems to work. I was able to verify by hooking up the button/led combo to turn the LED on and then off when the button is pressed. I can also run it off of the power supply (i.e. the pro micro specifically off of the 9v source instead of the USB).

So this verifies that the wall plug is working and that all of my power rails/capacitors are all working correctly. The LED/Button runs off of the 5V Reservoir Rail which is at the end of the chain. Next I need to hook up some servo's and test that. Then time to solder the LED and photo-interrupters into the circuit.

I found that I had already soldered together the three photo-interrupters I needed so I might as well use them instead of the lever switches.

EDIT: Oh I meant to ask. How bad would it be if I had the 9v plugged into RAW while I had the USB attached? Would it overload due to two power sources or does the circuitry account for that?
Nominal Animal:

--- Quote from: Youkai on May 19, 2019, 11:48:19 pm ---How bad would it be if I had the 9v plugged into RAW while I had the USB attached? Would it overload due to two power sources or does the circuitry account for that?
--- End quote ---
While Arduino Micro

does have both 5V and 3.3V voltage regulator, Pro Micros have only one, bypassable via a pair of solder pads (JS1 in the corner, left open for USB +5V):


Because Arduino Micro has no RAW pin, we are talking about SparkFun Pro Micros or its clones. (The design is known to be pretty good, and the hardware license (CC-SA-4.0) allows clones.)

You can open the SparkFun Pro Micro schematics and board layout in EasyEda here (does not require registration or anything), or download the Eagle files from the SparkFun Github repo for the Pro Micro. The Arduino Micro schematics are here in PDF form.  That is, no need to believe me, check for yourself.

On the Pro Micros, when the JS1 pads are connected, the USB +5V line goes through a polyfuse (limiting current to 500mA max or so), and from there directly to the board VCC.  That is, there is nothing but a 500mA polyfuse between the board VCC and the USB +5V line.  The RAW line goes to the voltage regulator input.  There is a diode stopping the regulator input from backfeeding to the USB +5V line, but the output is directly connected to the board VCC.  (The regulator used must accept a bypass situation, where the regulator output voltage is one diode drop lower than its input, or it will be damaged when the board is connected to USB.)

So, there are several possible cases you need to consider:

* You have a Arduino Micro.
There is a supply selection circuit that disconnects USB +5V line when VIN is present.
It is safe to provide power to the board using the VIN pin, whether or not the board is connected to USB.
 
* You have a Pro Micro (clone), with a 5V low-drop regulator, JS1 pads not connected.
The polyfuse and the diode are between USB +5V line and the regulator input.  RAW is connected directly to regulator input.
This does mean that when USB is connected, RAW voltage is at least (5V - one diode drop), but as long as your RAW supply is at least +6V, this does no harm.
Your board always runs on 5V regulated voltage, and it is safe to connect both USB and RAW at the same time.
 
* You have a Pro Micro (clone), with a 5V regulator, JS1 pads connected.
There is a diode blocking RAW from feeding back to the USB connector; but, the board VCC is connected to the USB +5V.
So, if your computer provides a lower USB +5V line than the 5V regulator on board, you may be backfeeding power back to your machine via USB, which is bad.
 
* You have a Pro Micro (clone), with a 3.3V regulator, JS1 pads not connected.
When you provide the board power via the RAW pin, the board will operate at 3.3V.  If you connect it to USB, it will suddenly switch to 5V power.
I do not know if this is okay, but I would advise against it.
 
* You have a Pro Micro (clone), with a 3.3V regulator, JS1 pads connected.
The board always operates at 3.3V.  The diode will protect from the board backfeeding power to your USB +5V line.
However, when you connect the board to USB, the RAW pin will be at least one diode drop lower than +5V.
So, as long as your RAW pin is either disconnected, or connected to a voltage supply higher than +5V, you are safe to connect the board to USB.In summary, cases 1, 2, and 5 are safe.  For Pro Micro or clones, check which voltage regulator it has.

Personally, when working with Pro Micro (clones) or other USB-programmable microcontrollers (I have a dozen or so!), I use an USB isolator (usually this one from fleabay, basically an implementation of the ADuM3160 appnote) and/or an USB cable where the +5V line is disconnected.

I prefer the isolator, because that keeps my USB ports safe.  (The switch chooses between 1.2 Mbit/s and 12 Mbit/s operation; the latter is suitable for Arduino Micros and Pro Micro clones, as that's the fastest ATmega32u4 can do.  The isolator does not support 480 Mbit/s high speed USB devices.) Just note that these isolators cannot provide full 500mA, but somewhat less, something like 300mA maximum (due to losses in the isolated DC-DC converter).  The Olimex USB isolator is a variant which has an extra power jack (8V to 15V supply, regulated to 5V) that can supply up to 750mA to the device (but note that this supply is isolated only from the computer, not the device; there is only a voltage regulator in between).
Youkai:
This project has been stagnant for a while because a friend was going to help me with the modeling/3D printing. But that's has been taking forever so I just ordered myself a 3D printer (arrives tomorrow). Going to get this project out of the muck.

To that end I was thinking. Would it make any sense to use stepper motors (instead of servos) and some micro switches to detect the range of motion needed? The "open" position stop doesn't have to be super exact and stepper motors are supposed to be super exact things right? so I could probably get away with switches to confirm the "closed" position is where I expect it to be when it's powered on or closed. Then run the motor to the open position by programming. If the final rest is off by a couple degrees one way or the other it wouldn't matter too much.

In either case should I connect the drawer's directly to the motor/servo or do I need some kind of circular hinge to bear the weight? I'm a little worried about the leverage on the drawer if someone puts a heavy watch or something in it causing it to sag or bend the shaft of the motor but I don't know if that's a reasonable concern.
Youkai:
Well. I failed for the most part. It kind of works, sort of. I ended up with WAY too much wire and couldn't stuff it all into the cavity. I cut a bunch out of the middle of wires and soldered the wires back together to save some space. Kind of worked. Somewhere in all of that I ended up either blowing out one of the NeoPixels or when I was stuffing the wires in there it just got disconnected. Either way one of the LED doesn't work in the final item. Also one of the servos doesn't work end the end either.

Going to start over from scratch with what I've learned and try again. This time I'm going to use micro servos and a lot less wire. Thanks a lot for your help everyone!


https://photos.app.goo.gl/6BrS4r74JXfwwvsX9
Youkai:
Version 2 of the project was successful! Here is the demo video if you are interested:

Also my build journal for those of you that want more details or don't want to watch the video: https://docs.google.com/document/d/1UCf8qaZgw3GsMXFvT55gbCp3WXba2CDr0ZiEJwghIu4
Navigation
Message Index
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod