Author Topic: Borderlands style jewelry box research thread  (Read 7130 times)

0 Members and 1 Guest are viewing this topic.

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 9522
Re: Borderlands style jewelry box research thread
« Reply #50 on: September 26, 2018, 05:48:44 pm »
That would be a physically *BIG* capacitor.  You'd probably be better off using at least two separate capacitors for a lower profile.  You may also want a Schottky diode between the buck converter output and the Neopixel Vcc + bulk decoupling cap, with the servos  + their bulk decoupling cap connected on the buck converter side of it so the servos cant glitch the neopixel supply.

The Arduino Pro Micro RAW supply pin can tolerate up to 12V.  If you want the convenience of using a 12V wallwart, you need to pre-regulate or drop the RAW supply so it can *NEVER* go over 12V. A 78L09 9V 100mA regulator is suitable or a string of four 1N4148 or similar diodes to drop about 3V.   If you use a 9V wallwart, don't worry.  N.B. the wallwart *MUST* be regulated - avoid old linear unregulated ones as their output can be as much as 50% high when minimally loaded which will blow the Arduino.
« Last Edit: May 08, 2019, 06:57:15 am by Ian.M »
 
The following users thanked this post: Youkai

Offline Youkai

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Borderlands style jewelry box research thread
« Reply #51 on: September 27, 2018, 02:08:48 am »
Alrighty so a few things:

1) The purpose of the diode is to prevent power "Backlash" from the servos starting/stopping causing trouble with the Pixels correct? If so then I would need D2 in my new diagram? Is there a reason to put D1 in there? Any reason to put one on the line that has the photointerupters on it?

2) Is the Schottky diode for the low forward voltage drop? Is there any other reason to use that instead of another type of diode?

3) What power rating should I use for the diode? A quick google seems to indicate that they are rated for voltage; and that the "breakdown voltage" is usually pretty high (like 100V). So just make sure I get a diode with a breakdown voltage way above 5V and I'm good?

4) NeoPixels seem fragile. Is that just me not being used to component parts or are they a little more finiky than normal stuff?

5) Figuring out power needs:
  • NeoPxel: 16 * 30 ~= 500mA (30 is the rough estimate of power use on an "average" pixel)
  • Servos: 200 * 3 = 600mA
  • Pro Micro: 200mA
  • Misc power loss: 200mA
Total power needs: 1.5A. Does that seem correct? I'm thinking I'll try to find a 9V, 2A wall plug online. Will that be sufficient?

6) I found a 1000mF/16V capacitor that seems a reasonable size. Any reason I shouldn't use it? I know you said a couple smaller ones would work but if just one will do I'd rather keep it simpler.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 9522
Re: Borderlands style jewelry box research thread
« Reply #52 on: September 27, 2018, 03:22:54 am »
1. When a servo starts moving, the motor will momentarily draw its stall current which can be 10x its normal running current.  This will cause the supply voltage to dip.  If you feed 5V to the other devices like the Neopixels and the optosensors via a diode with a reservoir capacitor after it, when the supply dips, the  reservoir capacitor after the diode maintains the 5V rail through the dip.  D2 should NOT be on your diagram.  D1 should feed *EVERYTHING* 5V except for the servos.  You *need* a reservoir cap after the diode

2. A Schottky would be used exclusively for its low Vf drop. 

3. Low voltage Schottkys typically have a lower Vf drop than high voltage ones. Also, at a fixed current, a higher current rating diode will typically have a lower Vf drop than a lower current rating one. The tradeoff is: higher current ones have more junction area so higher reverse leakage.  A 3A 20V one should be suitable for this project.  Don't go below 2A or over 40V.

4. They are LEDs + logic.  They don't like over-voltage and/or ground bounce, or DIN going outside the supply rails AT THE LED so if you don't use enough bulk capacitance and your wiring inductance rings with the decoupling caps on the strip it can transiently over-voltage them, or your ground is too flimsy and their local ground is bouncing up and down by a volt or so, and you haven't used a series resistor in the data line, you can blow the internal input protection diodes of the DIN pin.  Basically if your circuit is crap they can be killed by it.  There have also been reports of quality problems with some suppliers (direct from China) of reels of the 'neopixel' style LEDs,  with an excessive percentage being DOA.   However Adafruit quality control should have weeded out defective ones after assembly so you shouldn't have any issues.

5.  The Pro Micro will draw far less than 100mA as none of its outputs are directly driving heavy loads.  The sensors will draw about 100mA for all their IR LEDs.  1.5A @5V is 7.5W.  assuming 80% efficiency in the buck converter, that's 9.4W in, so fractionally over 1A at 9V.  A 1A one will be right on the bleeding edge, but a 1.2A one should do nicely and will be a lot easier to find than a 2A one.

6. I'd advise two 1000uF caacitors, one before and one after the Schottky diode.

« Last Edit: May 08, 2019, 06:59:41 am by Ian.M »
 
The following users thanked this post: Youkai

Offline Youkai

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Borderlands style jewelry box research thread
« Reply #53 on: September 27, 2018, 05:56:43 am »
As always excellent information. Thanks Ian.M

I updated my schematic with the provided information. The wires are a little more confusing but I rearranged the parts so that I could put everything on the second 5V rail together. Please let me know if I broke any cardinal tenants of schematic design.

I tried to make sure that all the items are labeled correctly in this version. e.g. "Lid Servo" so I will know what pins they are attached to. Also I have all of the components labeled with their values so those can be verified.

I did a little bit of looking online to find a wall wart that is 9V, 1.2A and didn't have much luck. Sparkfun has a 650mA version. Jameco has a 500mA. I maybe found a couple on some sites I have never heard of before. Do you have any recommendations for a site where I can get the wall plug?

EDIT: After a little more searching I found this one at Jameco. It's 9VDC / 2A. Is that overkill? https://www.jameco.com/z/GS18U09-P1J-MEAN-WELL-2-Wire-AC-to-DC-Regulated-Switching-Wall-Adapter-18W-9VDC-2A-2-1mm-Plug_1952847.html
« Last Edit: September 27, 2018, 06:07:16 am by Youkai »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 9522
Re: Borderlands style jewelry box research thread
« Reply #54 on: September 27, 2018, 06:33:49 am »
The only thing its missing is some ceramic decoupling caps right at each of the Neopixel connectors - at least 0.1uf, but preferably larger, and a 2x 10K potential divider between 9V and Gnd, with the tap connected to an Arduino analog pin so it can sense the supply voltage and only enable the servo control and Neopixel data outputs if the 9V is present.

For robustness, you may also want a pair of small Schottkys from DIN to +5V (resevoir), and from Gnd to DIN right at each Neopixel connector, cathodes positive so they are reverse biassed in normal operation - that will save your Neopixels if there is a fault in your code and it attempts to drive them when the 9V is not present.
 

Offline Youkai

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Borderlands style jewelry box research thread
« Reply #55 on: September 27, 2018, 07:10:29 pm »
1) Don't the decoupling caps you are recommending and the 1000uF capacitor already there do the same thing? Is this just an extra layer of smoothing or is there some other purpose?

2) When you say 0.1uF but more is better; what does "More is better" mean? Is there some upper limit to how much is reasonable? I found this 0.33uF cap on jameco: https://www.jameco.com/z/MD-33-Capacitor-Monolithic-Ceramic-0-33-micro-F-50V-plusmn-20-37-_138237.html Is that enough-more to be better-enough?

3) What is the purpose of sensing the 9V and shutting off the pins? I assume (based on previous posts) that I can not power the whole circuit via USB (while programming). At most I would plug in 2 other components while programming it and the servo will never have a load applied to it while programming. So I would think USB could handle that ok.

My plan is to use the Arduino while writing the program since it has a 5v output pin that I could use to power a single component while getting the code correct. Then I would only ever wire up the pro-micro/whole-circuit using the wall wart so there would never me a time when all of the components are attached and the 9V isn't present. Is it an issue if my Arduino is sending commands to a NeoPixel that isn't there?

Oh reading your last sentence again I might see it. I remember reading on the Adafruit guide that you want to power the pixels before the micro-controller. So I guess you can somehow brick the pixel if you send an update command to it when it's not fully powered? Cool >.>

4) I think I put the new Schottkys in there the way you explained but I don't see how they help with anything. I understand that if the Pixel gets a data input when it is not powered that can cause a problem but I don't see how the diodes somehow prevent the signal from getting through when not powered. I don't see how the ground connected one does anything ever under any condition. And If the positive rail is connected to power then nothing from data is going through because the Voltages will match right? Thus the signal goes to data; perfect. If it's not powered it's a wire with no connection at the end so there is no circuit so thus now power will go through the diode anyway right? Or does one of the capacitors somehow allow a circuit to complete and "eat" the signal?

5) Question about actually soldering this together. Maybe this is complex enough that it makes sense to use a Perfboard. If I don't what's the best way to do something like the 5V Reservoir Rail connection where I have 5 wires connected. Would I expose enough of each that I could twist them all together in one group and solder that together; or perhaps expose a lot of one of the wires and solder the other 4 to unique points along it?

6) New diagram attached. I think I got the Schottkys in there correctly as it seems if they were the other way it would cause issues. Though can you confirm the attachment points are ok. Do I actually need to go to the 5V rail on the upper ones; or is connecting the 5V and Data pins using the diode ok? They should be effectively the same right; with the exception that if I go back to the 5V rail that puts a capacitor in the circuit that wouldn't be otherwise?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 9522
Re: Borderlands style jewelry box research thread
« Reply #56 on: September 27, 2018, 07:59:38 pm »
1 & 2.  The 1000uF electrolytic capacitors have a fairly high impedance at high frequencies due to their size and wound foil construction.  A 0.1uF or 1uF ceramic has a much lower impedance at high frequencies so you need both in parallel, with the ceramic as close as possible to the load that will be drawing pulses of current.  You don't need one for the Arduino as it already has some on-board.

3.  The Neopixels could be damaged if data is applied without power.  If the 9V is missing its preferable to stop and not do anything (except possibly blink the Arduino's on-board LED to indicate its waiting for 9V power), so that's why I recommend sensing the 9V in.   If you want to test the board while its hooked up to your PC by USB, supply 9V as well.

4. For the DIN protection Schottky diodes, use low current ones. If you are building it using SMD parts BAT54S would be very suitable as it gives you two series connected diodes in a single three pin SOT-23 package.  If you are using through hole parts, BAT43 wuld be suitable.   Ideally solder the DIN protection Schottkys direct to the Neopixel LED strips, as there they can protect against loose power or ground wiring.  If you mount them on your main board, they should go as directly as possible to the Neopixel connector pins.

5. I'd build it on Veroboard, with the Arduino soldered down and a full width set of strips for the 5V rails and the Gnd rail just beyond the end of the Arduino to mount the big caps and big Schottky to.

6. Your new diagram looks good.  Ceramic decoupling and DIN protection Schottkys should be as close as possible to the Neopixels - ideally soldered direct to the strips, otherwise at the three pin connectors for the neopixels on your main board.
« Last Edit: September 27, 2018, 08:02:42 pm by Ian.M »
 

Offline Youkai

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Borderlands style jewelry box research thread
« Reply #57 on: September 27, 2018, 08:53:55 pm »
I like the idea of the BAT54S. If I'm interpreting the spec correctly: https://www.mouser.com/datasheet/2/308/BAT54S-1118484.pdf

Data goes to pin 1
+5V goes to pin 2
GND goes to pin 3

Is that correct? Then I just solder the pins on the BAT45S using as short a wire as close as possible to the pins for the Pixels?

EDIT: note that the Pixels are going to be in a different physcial location than the board. So I'll have a few components that aren't attached to the board. Specifically anything that needs to be connected as close to the Pixels as possible. I suppose there could be seperate little mini-boards for the pixels. That probably makes the most sense.
« Last Edit: September 27, 2018, 10:41:49 pm by Youkai »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 9522
Re: Borderlands style jewelry box research thread
« Reply #58 on: September 27, 2018, 11:35:32 pm »
Yes.   You could superglue the BAT54S direct to the back of the Neopixel strip, and hook it up with individual strands of tinned copper wire, or you could solder it to a scrap of one pad per hole matrix board the width of the neopixel PCB, and put the bare ends of the wires through that then on to the neopixel PCB pads.
 

Offline Youkai

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Borderlands style jewelry box research thread
« Reply #59 on: September 29, 2018, 03:20:20 am »
Ok I have updated the diagram to have the BAT54S in there.

I also added the voltage divider for pin 1 to sense 9v. Is that wired correctly?

I got my neopixels in the mail today and noticed they have two ground connections. If you look at the last image you can see it: https://www.adafruit.com/product/2869 But the images showing them working only have 3 wires connected. I can't find any information about why there are two ground connections. Do I just use the one on the same side as the images from the site? I assume the second one is redundant for some kind of extra safety but not needed?

I think it's pretty darn close at this point. Time to start figuring out what I'm missing and order parts.


EDIT: I was re-reading the posts some more and saw your comment about the Bat43 for throughole. I'm not really planning on using a board at the LED panels; or if so it will be as small as possible. Is it ok to solder the BAT54S to a board? I'd like to use that because some of the wiring is already done for me and it's harder to mess up (i.e. get the polarity backward).
« Last Edit: September 29, 2018, 03:38:28 am by Youkai »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 9522
Re: Borderlands style jewelry box research thread
« Reply #60 on: September 29, 2018, 03:49:36 am »
Ignore the spare ground pad - its just there to give you another option for the wire order in a three wire flat cable hooking them up.

Whether you use the SOT-23 BAT54S or a pair of BAT43 depends on how good you are at soldering tiny parts.  I'd suggest ordering both, as even if you go with the BAT54S, some small Schottkys are useful to have around, and you'll need the through-hole parts if you want to breadboard it so you can start on the Arduino software while you are still figuring out how to make it all fit in the base of the box.
 

Offline Youkai

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Borderlands style jewelry box research thread
« Reply #61 on: September 29, 2018, 04:21:38 am »
Is this what I would use in my chest to connect the wall wart to? https://www.jameco.com/z/CD022-Velleman-2-1mm-x-5-5mm-Female-DC-Plug-to-Screw-Terminal-5-Pack-_2153916.html

EDIT: Also umm . . . where can I get the BAT54S. The only place I see with them in stock is this and I don't nee 3000 of them: https://www.jameco.com/z/BAT54S-7-Diodes-Zetex-Diode-Schottky-30-Volt-0-2A-3-Pin-SOT-23-Tape-and-Reel_1589814.html

EDIT 2: Same for the BAT43. Can't seem to find it. Is there a similar product with a different number? I looked to find a 30v 200mA shottky but couldn't.
« Last Edit: September 29, 2018, 04:42:04 am by Youkai »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 9522
Re: Borderlands style jewelry box research thread
« Reply #62 on: September 29, 2018, 07:30:33 am »
The CD022 is the wrong gender.   The wallwart will have a plug like the CD022 (or maybe with a 2.5mm center pin), and you need a matching socket: probably PCB mount with solder terminals, or maybe chassis mount.

Try Mouser USA.  Their parametric search shows a wide range of Schottkys <50V, <200mA in stock, and minimum order quantity 1(cut tape).  Any small Schottkys will do for the protection diodes.


 
 

Offline Youkai

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Borderlands style jewelry box research thread
« Reply #63 on: September 29, 2018, 04:40:12 pm »
Ok I think I got it sorted. Attached is what I hope is the final schematic. Please review and confirm that looks correct to you.

Also here is my "shopping list" to make sure I got the correct parts. You can ignore the numbers in parenthesis; I'm intentional ordering more than I need of some components. Also I left off things I already have: ex. 10k resistors.

Jameco
   Header Pins (many): https://www.jameco.com/z/2012-254-20-0-100-2-54-mm-20-Pin-Straight-Single-Row-Male-Header-br-Breakable_2229036.html
   Wall Adapter (x1): https://www.jameco.com/z/GS18U09-P1J-MEAN-WELL-2-Wire-AC-to-DC-Regulated-Switching-Wall-Adapter-18W-9VDC-2A-2-1mm-Plug_1952847.html
   1000uf capacitor (x5): https://www.jameco.com/z/EEU-FM1C102-Panasonic-Capacitor-Aluminum-Electrolytic-1000uF-16-Volt-20-10-X-20mm-Radial-5mm-2180mA-5000h-105C_1361561.html
   Schottky 20V 3A - for reservoir rail (x6): https://www.jameco.com/z/1N5820-Major-Brands-Diode-Schottky-20-Volt-3A-2-Pin-DO-201AD_177973.html
   Schottky Diodes 200mA 30V - pixel protection (x20): https://www.mouser.com/ProductDetail/Vishay-Semiconductors/BAT43-TAP?qs=sGAEpiMZZMtQ8nqTKtFS%2fCT6%2f0RNrmfHlPqgqRLTrGU%3d
   0.1µF capacitor (x10): https://www.jameco.com/z/DC-1-25-Capacitor-Ceramic-Disc-0-1-micro-F-25V-plusmn-20-37-_151116.html
   Photointerrupter (x3): https://www.jameco.com/z/H21A3-Major-Brands-Photointerrupter-Transmissive-3-3mm-Phototransistor-4-Pin-Rail_320901.html
   Strip board (x3): https://www.jameco.com/z/ST2--Busboard-Prototype-Systems-Traditional-Stripboard-Pattern-Prototyping-Circuit-Board-100-x-80mm_2191496.html
   Barrel Plug receiver (x1): https://www.jameco.com/z/WTJ-020-37A-2-1mm-Male-DC-Power-Jack-Breadboard-PCB-Mount-_2210677.html?CID=MERCH

Sparkfun
   Pro Micro: https://www.sparkfun.com/products/12640

Adafruit
   NeoPixel (x6): https://www.adafruit.com/product/2869
   Button (x1): https://www.adafruit.com/product/482

Hobby Store
   Hi-Tech 311 Servo (x3): https://www.servocity.com/hs-311-servo
 

Offline zitt

  • Regular Contributor
  • *
  • Posts: 92
  • Country: us
    • Pinball-Mods.com
Re: Borderlands style jewelry box research thread
« Reply #64 on: October 05, 2018, 10:09:11 pm »
Duuuuuuude.... I totally need one of these to scale for my Pinball project:
https://pinside.com/pinball/forum/topic/borderlands-the-pinball
 

Offline Youkai

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Borderlands style jewelry box research thread
« Reply #65 on: October 08, 2018, 06:09:31 am »
HAHA! Well if this one works out maybe you can commission one lol :P Whenever I finish it I'll post videos.

EDIT: Actually that chest would probably be easier than what I'm trying to do; especially if you don't need lights added. 2 Servo's would do it. Just put the shelf on an arm that you rotate up after the lid opens. Actually if you worked out the mechanism you could maybe do it with one servo. If it's going to be in a pinball machine it's probably going to be small and you probably don't care how hollow/thick it is. So one small servo could probably work both the lid and the drawer with the right setup.
« Last Edit: October 08, 2018, 06:13:35 am by Youkai »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 9522
Re: Borderlands style jewelry box research thread
« Reply #66 on: October 08, 2018, 07:40:30 am »
Sorry I didn't have time and enough patience to check your parts list.

When you document this project, *PLEASE* do it in a format other than long video (although you may choose to make one of those anyway if you are a regular vBlogger). Its *MUCH* easier to skim a PDF or web page for the interesting bits than it is to get an overview of a long video.
 

Offline Youkai

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Borderlands style jewelry box research thread
« Reply #67 on: October 08, 2018, 02:44:05 pm »
Sorry I didn't have time and enough patience to check your parts list.
No worries. I think it is correct. Just wanted a second eye to make sure I didn't somehow pick the wrong value for the schottky's or something.

Its *MUCH* easier to skim a PDF or web page for the interesting bits than it is to get an overview of a long video.
Interesting. I hadn't ever really thought of that. I haven't been documenting this project at all so far, other than this thread I guess, so I was just going to have a short youtube video where I show it actually working; and maybe show the electronics bits once I get them all wired up before I actually insert them into the shell. I'll definitely keep in mind the PDF idea. Do you have a link to a PDF someone else has made so I can get an idea of how people organize those?
 

Offline Youkai

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Borderlands style jewelry box research thread
« Reply #68 on: November 26, 2018, 05:07:10 am »
Ok took a fair bit of time off of this project but I'm gonna try to get a little more work done on it. Couple things I want to make sure I'm clear on. Please correct me if any of the following are mistaken statements:


If these are all correct and someone could confirm that it would be appreciated. Thank you.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 9522
Re: Borderlands style jewelry box research thread
« Reply #69 on: November 26, 2018, 05:25:32 am »
Ordinary through hole resistor bodies are covered by non-conductive paint, however its bad practice to let them touch as there may be flaws in the paint, and especially on the metal endcaps, (dogbone outline bodies), that risks a short-circuit.

Electrolytic capacitors are polarised - the stripe indicates the negative lead.   Tantalum bead capacitors are polarised, the stripe indicates the positive lead.  Tantalums are best avoided because they have a nasty habit of catching fire if even slightly abused.  All other common capacitors are non-polarised.

For diodes the end with a ring-stripe round it is the cathode, and is the direction the arrow points in their schematic symbol and the direction they permit (conventional) current flow in.   Their orientation will depend on whether they are supposed to pass or block current in normal operation - see schematic of the specific circuit you are using them in.
 

Offline Youkai

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Borderlands style jewelry box research thread
« Reply #70 on: May 06, 2019, 04:46:12 am »
Hey guys. It's been forever but I'm back! Did a little soldering today to try and set up one of the NeoPixel units. Can some of you take a look at the attached image and see if you can confirm that I wired it properly.

Mostly I'm worried that I misinterpreted the schematic and treated something as "all joining together" when they should be in sequence. Also there is the very real possibility that I put the diode's in backwards because I wasn't smart enough to figure that out correctly :)

I have the images aligned so that the right edge is the same on both. So it's mirrored top/bottom. Please let me know if the images are insufficient and better pictures would help.
 

Offline zitt

  • Regular Contributor
  • *
  • Posts: 92
  • Country: us
    • Pinball-Mods.com
Re: Borderlands style jewelry box research thread
« Reply #71 on: May 06, 2019, 07:40:39 am »
I was going to do something similar for my Borderlands Pinball project...

https://pinside.com/pinball/forum/topic/borderlands-the-pinball
Sadily; I haven't gotten around to even starting the project. With Borderland3 "on the way" now would be a great opportunity to revisit.

Good luck with your project … it'd have a great reuse capability for my project if I ever get back to it.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 9522
Re: Borderlands style jewelry box research thread
« Reply #72 on: May 06, 2019, 08:14:58 am »
Veroboard layout + visible component markings match the schematic.
 

Offline Youkai

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Borderlands style jewelry box research thread
« Reply #73 on: May 06, 2019, 03:00:03 pm »
Veroboard layout + visible component markings match the schematic.

Awesome! Thanks. Now to wire it up to an Arduino and confirm it works.
 

Offline Youkai

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Borderlands style jewelry box research thread
« Reply #74 on: May 06, 2019, 10:10:48 pm »
No dice so far. I am using an Arduino Uno. I plugged the power (Yellow) into the 5v pin, Ground (Black) into the GND pin, and data (Green) into pin 6. Then I used the below code to run the strip. A simple cycle test of R, G, B, W.

Getting no light at all. Does anybody see an issue with my code?

If not then I think the next step is to wire up just some wire leads on a bare NeoPixel strip and see if I can get that working with none of the other stuff. Is that a good next step? Is it possible that I just damaged one of the components during soldering and the whole assembly is broken at some point?

Code: [Select]
#include <Adafruit_NeoPixel.h>

#define neoPixelPin 6
#define neoPixelCount 8

Adafruit_NeoPixel lidPixel(neoPixelCount, neoPixelCount, NEO_RGBW + NEO_KHZ800);

void setup() {
  lidPixel.begin();
  lidPixel.show();
  Serial.begin(9600);
  Serial.println("Starting");
}

void loop() {
  for (int i = 0; i < lidPixel.numPixels(); i++) {
    lidPixel.setPixelColor(i, lidPixel.Color(255, 0, 0, 0));
  }
  lidPixel.show();
  Serial.println("Red");
  delay(1000);

  for (int i = 0; i < lidPixel.numPixels(); i++) {
    lidPixel.setPixelColor(i, lidPixel.Color(0, 255, 0, 0));
  }
  lidPixel.show();
  Serial.println("Green");
  delay(1000);

  for (int i = 0; i < lidPixel.numPixels(); i++) {
    lidPixel.setPixelColor(i, lidPixel.Color(0, 0, 255, 0));
  }
  lidPixel.show();
  Serial.println("Blue");
  delay(1000);

  for (int i = 0; i < lidPixel.numPixels(); i++) {
    lidPixel.setPixelColor(i, lidPixel.Color(0, 0, 0, 255));
  }
  lidPixel.show();
  Serial.println("White");
  delay(1000);
}

EDIT: I soldered wires on a second strip because I'm going to need it anyway. One of the leads was kind of a mess and I had to use some desoldering wire to clean it up. Anyway this strip with just the wires and nothing else didn't work either. So either I messed up the second pixel as well or there is something wrong with my code. I'm hoping for the latter. I certainly hope the NeoPixels aren't this fragile, I can't imagine how they could possibly be used in anything if they were.
« Last Edit: May 06, 2019, 11:12:00 pm by Youkai »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf