Electronics > Projects, Designs, and Technical Stuff
Mechanical jewelry box schematic
<< < (3/4) > >>
Ian.M:
The 470R resistors between the MCU and the Neopixel strings are recommended by Adafruit to prevent damage to the data input of the first LED by limiting the current during transients that may take the input outside the rails. 

The 470R resistors between the MCU and the Servos may be needed to limit the input current in the case when the Arduino is being powered via USB during programming, but the servo 5V supply is down because no external power is connected.  Many models of servo are likely to have inputs protected against signals being applied without power, and if you are *CERTAIN* your specific servos are protected, the 470R resistors could be omitted.

Does the button's internal LED have a built-in series resistor? if not, you need one!
DaJMasta:
The switch makes sense, then, you'd need some fancy programming to use only one in that case.

The servos definitely are the current hogs here, that's why if you're going to have extra decoupling caps, it's good to have them near there.  The neopixels are designed to be placed individually in long strings, so while I don't know if they have internal decoupling, they are probably designed to be able to operate in noisy environments.

There will definitely be noise on the power rail because of the servos, but I doubt it will be problematic with 2000uF of decoupling and the on-board decoupling for the micro so long as the switchmode converter can actually deliver it.  I wouldn't be surprised if removing the 0.1uF caps, the 470 ohm resistors, the BAT54S diodes, and the zener (?) diode from the schematic entirely would work the same as as proposed in the vast majority of situations.

As a matter of flexibility, I'd move the 10k resistor divider from pin 1 to pin 21, so you can use it as an analog input to monitor the 9V in addition to just a digital reading... and if you don't need to monitor it or check it, just removing them too is an option - not exactly sure what requirement it fills.

Regardless of what schematic you settle on, it could be worth trying some elements of the other to see how they actually effect things - the parts required are pretty cheap, so it's basically only the time investment in the rework (which is almost nothing if you use a solderless breadboard to test it first!)


For the post that's appeared before I could post this reply:
Fair enough with the 470s, then, I hadn't heard of such requirements for neopixels and have never implemented series resistors on the PWM control pins for interfacing with a micro, myself, but if there are instances where it's useful, they're certainly not a big ask, and I doubt either will have any negative effects.
Ian.M:
The 9V monitoring circuit was to allow the Arduino code to wait for external power to be good, rather than driving the outputs controlling the servos and Neopixel strips if they aren't powered.  The 470R resistors were for extra insurance if there was a bug in that part of the code during development, but I wan't too happy about possibly driving ~10mA into an unpowered servo or neopixel input long-term, hence the 9V monitoring circuit.

There'd be more space to be saved by using a bare ATmega328P (@8MHz Int. Osc.) instead of the Arduino Pro Micro, so IMHO Muntzing the passives isn't worthwhile.
Youkai:
OK so here is the updated schematic. I fixed the BAT54S, and added a resistor to the button LED. I also took out a bunch of the empty space. Is that OK or does it make it "too busy" and hard to read?

I understand the comment about Muntzing it. I'll just have to find a way to make it fit.
Youkai:
Ian.M how important is that 9v detection? It seems that it's either not possible or I'm massively misunderstanding how it works.

I used a solder-less breadboard to work on my test circuit. I set up a circuit that has my 9v source going to a positive and negative rail in the board. Then I put the positive to my "raw" input on the ProMicro and the negative to the GND next to RAW. Then I used two 10k resistors. One each for positive and negative rails on the board. Both I had bridging their rail to the same row in the board. Using a third slot on that row I put a wire to pin 1 on the ProMicro.

I believe that setup wires the top right of my schematic. I.e. the 9v rail, the pro micro, and the pin 1 connection. But when I leave the wall wart unplugged and power the ProMicro from USB it still registers a positive digitalRead at pin 1. Using a meter across the positive and negative rails shows 5v in this scenario. I believe this means that the "RAW" pin is supplying 5v to the rail. This means that any time the ProMicro is plugged in (either through the wall wart or USB) I'm going to show a positive digitalRead at pin 1. I think this means that the whole pin 1 part is superfluous since it won't tell me what it was designed to tell me. I believe in the scenario I just wired you want it to show a digitalRead of "0" since the wall wart isn't plugged in.

Do I just take out the pin 1 stuff then? Am I totally misunderstanding how to use it?
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod