Control three transistor switches from two pins? #1484
Replies: 15 comments
-
Posted at 2015-09-01 by DrAzzy That seems plausible - what worries me is the possibility that even with the diodes, there could still be a small current flow (due to the 0.7v drop across the diode) - you'd definitely want to use a schottky diode if you do this... I can't say I like this design though... I'd rather do it with a little discrete logic chip instead... Are you using a Pico? There are a few pins that aren't broken out that can be accessed with careful soldering... this is a better solution if it's viable for you. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-01 by alexanderbrevig I guess this is more of a fun experiment than something I could actually use, so I'll revert back to some shift reg. As I'm driving LEDs I might go for something a bit more tailored for that need. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-02 by Pinnchus I2C or SPI and an expander ? Endless pins... with i2c even read. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-02 by alexanderbrevig Soo yeah. I've decided to not use some sort of transistor logic gate setup and go for a more tried and true approach. Serial-in/parallel-out shift register The load will look a lot like this: And for my 12v supply I'll chain a max of three LEDs (Vf = 3v, Iled = 60mA) per 'loop' and calculate resistor for You think I'm on the right track @drazzy? :) Here's the FET I've chosen for now: http://www.mouser.com/ds/2/308/EN8999-D-256482.pdf EDIT: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-04 by DrAzzy Yeah - I'd say you're doing it right (now) - a dedicated LED controller with constant current drive is the way to go here imo. The current is within the limits of those small drivers, so you should be fine. Usually when I think of driving LEDs, I'm driving either "pixel" style LEDs (WS2812, or WS2811 LED drivers with 1206 LEDs on them, so 20mA each), or I want bright light, so I'm using a 1W+ leds, at 350 or 700mA (or more) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-05 by alexanderbrevig After laying out various alternatives I ended up using 60 APA102C. I actually just pressed the 'order' button! $240 for five boards :d I wrote about the process on my blog They are 25mA nominal I think I read somewhere, so I grouped the µCU and RTC in one block with the silkscreen, and the power regulation in another block. I'm about to pull the trigger on the parts from Mouser as well :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-07 by @gfwilliams Wow, $240? How big are those boards then? And where did you get the manufactured? Surprised you didn't use WS2812B actually - there's a bit less wiring involved with them :) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-07 by @gfwilliams Are Seeed assembling it too? Doing 70 of those chips will be 'fun'. By the way, I was recently doing something with WS2812 chips (the APA102 may be similar) and I found they have quite a lot melting point. Enough that it was basically impossible to solder them with the '8' tip I had in my Weller soldering iron, and had to go back to a '7'. I'm not 100% what temperatures those equate to, but it's worth keeping in mind if you have problems. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-07 by alexanderbrevig Sadly I'm doing the assembly, but I will use paste and hot air gun for those LEDs (I think). Thanks for warning me about temperature! I'll keep in in mind. (I got 1000 of the APA's from AliExpress so at least I don't have to worry about ruining a couple ^^) I'll make a separate projects thread for it down the line. I kind of want to make something like firmata that end up being able to control the Wiring/Arduino board using JS in the form of
I have some thoughts about this already sketched out :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-08 by @gfwilliams Not sure I quite understand - so you'd be using an Arduino (not Espruino), but allowing JS functions to be loaded onto it? Or controlling an Arduino from an Espruino? Of course maybe the most flexible (and awesome) thing would be to get a build of Espruino working for Arduino. I did have something compiling, but not working (I think since ints are 16 bit for most Arduinos) - and the lack of debug really scuppered my attempts to get it working. If someone attacked it with a proper debugger (is there a software simulator of Atmel chips?) it shouldn't be too hard to get going. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-08 by alexanderbrevig The idea is to implement a simple register based bytecode interpreter on the ATMEGA chip, and then make an Espruino wrapper for calling into that interpreter over Serial or I2C. I'll also make a client driver for 'Arduino' / Wiring and one for C++ (using the CLI so I can use from C# as well). The main goal is to enable the Espruino to have the ability to interact with the Arduino using a simple and known API like
It's just an idea. Probably yet another pointless academic endeavor but I don't know... What do you think? Worth spending time on? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-08 by @gfwilliams Personally, I reckon a lot of that is handled by firmata already on the Arduino side... It is kind of a bytecode interpreter already - just without loops :) Now a module for Espruino that emits firmata? That'd be very cool - and yes, I guess you could parse rudimentary JS into bytecode. However something like this might work for functions?
so when you do I guess if you wanted to go faster, you could extend firmata on the Arduino with 'store command list' and 'play command list' commands? I don't know if that exists already - it seems like it'd be great if not? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-09 by DrAzzy
7 weller tip is 700F, 8 is 800F. They also made a 6. IMO the 8 is too hot for everything except scavenging parts. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-09 by @gfwilliams Ahh, thanks! That makes a lot of sense. I've really liked the 8 - it works well on most stuff, but you've got to be quick with it :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2015-09-01 by alexanderbrevig
Hi :)
I'm trying to learn electronics, especially the basics (as I know I could use shift regs or other MUX chips for this) so I tried to challenge myself to design something that would allow me to control three sets of LED banks using two pins.
I ended up missing one pin so I thought I'd try to gain a pin by using two to control three.
Here it is:

I'm not sure if it will work though? I've probably missed something.
Currently downloading LT Spice to try and simulate this
Beta Was this translation helpful? Give feedback.
All reactions