|
No no this is good. The code to control the LED rings includes brightness , I'll have to dig closely into the code to figure out exactly how bright it makes them and also how bright they'll be by default. I think maybe I won't worry too much about the battery stuff for now. Also one of the original requirements was a power supply that would work internationally (he lives/works in Ireland but travels the world working for Microsoft), which is not a requirement of mine so a simpler power adapter like you linked would make me a lot more comfortable so I"ll look into that.
|
# ? Jan 18, 2020 23:35 |
|
|
# ? May 30, 2024 13:10 |
|
FISHMANPET posted:Also one of the original requirements was a power supply that would work internationally (he lives/works in Ireland but travels the world working for Microsoft), which is not a requirement of mine so a simpler power adapter like you linked would make me a lot more comfortable so I"ll look into that.
|
# ? Jan 19, 2020 01:05 |
|
Remember at that kind of current you'll need to use thick wires everywhere or things will get warm
|
# ? Jan 19, 2020 01:19 |
|
Splode posted:Remember at that kind of current you'll need to use thick wires everywhere or things will get warm size it just right and have a built-in fuse.
|
# ? Jan 19, 2020 03:16 |
|
How thick is thick? I'm assumiming the 28 guage dupont wires for the breadboard wouldn't be thick enough for long term use, would 20AWG be good enough or do I need to get even thicker than that?
|
# ? Jan 19, 2020 03:26 |
|
Not particularly thick really, 20AWG would definitely be fine. 22 AWG also would suffice. See the "Chassis Wiring" column here: https://www.powerstream.com/Wire_Size.htm The other "power transmission" rating column are ultra conservative, for long lengths where voltage sag matters more, so not relevant.
|
# ? Jan 19, 2020 03:39 |
|
FISHMANPET posted:No no this is good. The code to control the LED rings includes brightness , I'll have to dig closely into the code to figure out exactly how bright it makes them and also how bright they'll be by default. I think maybe I won't worry too much about the battery stuff for now. Also one of the original requirements was a power supply that would work internationally (he lives/works in Ireland but travels the world working for Microsoft), which is not a requirement of mine so a simpler power adapter like you linked would make me a lot more comfortable so I"ll look into that. Those things are really forgiving, I know because while I've not wired them up and programmed them, my boyfriend has and there a thing with LED ring eyes sat on my kitchen shelf. You can drive them to *REALLY* bright, as in light up my kitchen bright.
|
# ? Jan 19, 2020 03:44 |
|
TotalLossBrain posted:size it just right and have a built-in fuse.
|
# ? Jan 20, 2020 01:33 |
|
Ugh, I glanced through the threads and somehow COMPLETELY OVERLOOKED this thread when I started a new thread. I'm dumb. So I'll ask this here for the people who are smarter than me about electronics wiring and poo poo. https://forums.somethingawful.com/showthread.php?threadid=3911599 I didn't fully understand why I needed the relay in my request but when I started looking at the wiring diagrams and how the pins were it was amazing. I suddenly realized exactly what was going on and why, and understood how to make it work. I never understood it before so suddenly having that flash of insight into why the thing work the way they do is really, really satisfying and enjoyable. khy fucked around with this message at 03:30 on Jan 20, 2020 |
# ? Jan 20, 2020 02:22 |
|
Hey folks, I might have posted something about this before but I've got a synthesizer thats making goofy noises (goofier than usual). If I poke around at the crsytal circuit the goofiness changes ear and sometimes gets a tiny bit better and sometimes craps out altogether. I replaced the crystal as it looks like its been dropped at some point but that hasn't fixed it. There is however a tiny crack thats gone through the connection point on the PCB right next to the crystal as you might be able to see here in the godawful pic (on the right going through the white box), that's exposing the copper underneath. This is running between the leg of the crystal and c150. I've actually got a working version of the synth and ive been poking at both with a multimeter and comparing - voltages vary slightly here and there but nothing super obvious. Could it be the crack is putting extra capacitance on the crystal causing it to be fucky? If so is there any realistic way I can fix this? Unfortunately reading the frequency on the crystal using the mulimeter causes it crap out (probably capacitance). Thanks! E: on futher inspection I think its the surface of the trace between c150 and the crystal leg thats exposed there E: managed to get the frequencies of both crystals by checking further along the line where they go to the CPU/DSP and the both look fine, so back to looking for where the problem is A LOVELY LAD fucked around with this message at 21:34 on Jan 21, 2020 |
# ? Jan 20, 2020 21:19 |
|
Shame Boy posted:Turns out the problems with the SPI bus weren't the lack of termination resistors (ok well they would have probably solved this problem but still) and I can kinda-sorta fix it in software. I figured out through trial and error that all the chips on the bus were powered up and ready to go a long-rear end time before the microcontroller's oscillator had even stabilized, so they were all listening to the SPI bus while it was still floating. The particular way it happened to float most of the time meant all the CS pins were low, MOSI was high, and the clock was... clocking, I assume from mains interference. In these LED display chips I'm using, if you clock in just a big ol' string of 1's, it thinks you're telling it to turn on "display test mode", where it will just turn all the LED's on at max power. Critically though, test mode overrides literally everything else, so even if you try to shut the chips down by sending the shutdown command, or any other command for that matter, it will just stay there in test mode acting like it's broken. I probably missed the initial posts but there wasn’t a pull-up or pull-down present to ensure CS was de-asserted in the absence of a driver? MCU in reset / default state probably defaulted fo High-Z for its I/Os?
|
# ? Jan 20, 2020 22:20 |
|
I have a small project requiring some level shifting between 3.3 and 5V, and I picked some "modules"(basically just breakout boards + tiny capacitor on each voltage rail) which use this chip: http://www.ti.com/lit/ds/symlink/txs0108e.pdf I'm a little confused about the OE pin though. The doc recommends to hook OE to Vcca with pull-down resistor to GND. It also says that the order of ramp-up of Vcca vs Vccb power supplies doesn't matter, but at the same time its saying, seemingly contradictory, that OE should only be set high when both supplies are ready. If I don't know for sure whether Vcca ramps up before or after Vccb, then would I need an additional logic AND gate or something between the two to ensure their both up before enabling output? I don't really get the implications of high-Z mode, if its actually needed to protect IO pins on the devices that level shifter will attach to or what.
|
# ? Jan 21, 2020 02:31 |
|
You're overthinking - As long as as the output of the level shifter is going to a high-Z pin (most pins of most microcontrollers will start up that way, although not all), and vice versa, you're not going to have a problem. The seeming contradiction is probably implying that startup behaviour is undefined when OE is high and the power supply is not yet on - Possibly glitches and the like. You won't damage anything. I also only skimmed the datasheet, so take with a grain of salt.
|
# ? Jan 21, 2020 05:27 |
|
movax posted:I probably missed the initial posts but there wasn’t a pull-up or pull-down present to ensure CS was de-asserted in the absence of a driver? MCU in reset / default state probably defaulted fo High-Z for its I/Os? I knew the MCU would start in hi-Z but I kinda thought the chips would have a weak pull-up or something built in since every MCU starts in hi-Z it seems, buut nope there's nothing. Also to everyone who was guessing they were MAX chips, yeeep
|
# ? Jan 21, 2020 16:06 |
|
peepsalot posted:I have a small project requiring some level shifting between 3.3 and 5V, and I picked some "modules"(basically just breakout boards + tiny capacitor on each voltage rail) which use this chip: http://www.ti.com/lit/ds/symlink/txs0108e.pdf Oh hey I'm literally using the lil' brother of that same chip in my design (not in the glitchy part, a different section that works fine). I also was a bit confused as to what to do with the OE pin, so I just have a spare pin of the micro turn it on at boot since that must happen after the power has stabilized and the clock has had time to start up due to the BOD in the micro. Before that I was thinking of rigging up some kind of RC circuit to delay it coming on by a short time, but it kinda sounds like it's not actually a problem either way so ehh.
|
# ? Jan 21, 2020 16:12 |
|
Where do you see them suggesting OE should be connected to a supply? The typical application has it connected to a microcontroller pin e: it is often worth your while to add a little circuit than generates a ms or two of delay from the power supply rise and then use it to hold digital logic in reset while power supplies come up and stabilize. Foxfire_ fucked around with this message at 04:40 on Jan 22, 2020 |
# ? Jan 22, 2020 04:27 |
|
There are lots of reasons to not want to connect it to a microcontroller
|
# ? Jan 22, 2020 04:53 |
|
Yeah in my case I don't ever need it to not be enabled, but the datasheet says the following:quote:The output-enable (OE) input circuit is designed so that it is supplied by VCCA and when the (OE) input is low, all outputs are placed in the I took that to mean "if it's not tied to ground and started up later like we say to do, it might do some weird crazy poo poo that could cause problems" but I guess it's just saying "it won't be guaranteed to be in hi-Z" which isn't that big a deal if everything it's connected to will be in hi-Z and ignoring it.
|
# ? Jan 22, 2020 05:03 |
|
Shame Boy posted:Yeah in my case I don't ever need it to not be enabled, but the datasheet says the following: The input buffer for OE is supplied by VCCA, and below 1.1 V (probably) behavior is not guaranteed as the input transistors are probably in sub-threshold region / otherwise outside of their nominal operating region. By tying OE to GND with a strong enough pull (even 100 kOhm is probably fine), you override any stray leakage that might cause that to float up, and guarantee that OE is de-asserted until you're ready to activate the buffer. If you didn't want that tied to a MCU / digital control, an RC or similar circuit would probably also do the job of holding that low until supplies stabilized. The VCCB requirement is of course so that your output signals are driven correctly. That said, I am inherently suspicious of 'auto direction sensing parts' because there's always some weird poo poo that can go on and confuse them.
|
# ? Jan 22, 2020 05:48 |
|
peepsalot posted:I'm a little confused about the OE pin though. The doc recommends to hook OE to Vcca with pull-down resistor to GND. It's not telling you to externally attach OE to both Vcca and GND. It's saying that the buffer inside the chip that accepts the OE signal is powered by Vcca. It wants you to hold OE down with a pulldown while the supplies rise, then have it go up to enable the chip. The go up could be from a microcontroller pin, a RC circuit, or a dedicated POR reset chip. (Doing it with a RC is cheapest, but annoying to tune since it'll depend on how fast your supplies rise, and too-slow rises that spend a long time in transition regions can also break things)
|
# ? Jan 22, 2020 06:20 |
|
Ok I've got these two kinds of switches/buttons: Trigger Switch Push Button They've both got the the little tabs where wire connects. Can I use something like a "female disconnect" to actually connect wires to that? Amazon has suggested this, would that be the right sort of thing (adjusting for size, the trigger leads are different sized than the button leads), and do I need a special kind of crimper for that? I've got this wire tool which works for stripping wire and can do some kind of crimping.
|
# ? Jan 22, 2020 18:07 |
|
I have some of the push button ones and you just need the red sized female crimp connectors. The connectors I got had a little dimple on them that made it impossible to remove from the button, which maybe is the point, but it also ripped the tab out of the button when I tried to remove one, so I just hammered the dimple down. The connector itself held on just fine. If you can't figure out what size the switch is, you'll just have to buy all three sizes of female connectors and see what works. The toggle switches I got just have screw terminals.
|
# ? Jan 22, 2020 18:21 |
|
FISHMANPET posted:Ok I've got these two kinds of switches/buttons:
|
# ? Jan 22, 2020 18:26 |
|
Do any of you know where I can find connectors like this? This is for a brushless motor. The three conductors in the middle are for power and the five around the perimeter are for the hall effect sensors. I really don't want to cut off and splice in different connectors just because I want to try a motor with different windings.
|
# ? Jan 25, 2020 01:16 |
|
Is this for an e-bike? I tried a few combinations of 'bldc' 'hall effect' 'encoded motor' '9pin' 'connector' 'molex' and didn't find that exact configuration. Here's a guy hacking up a similar connector. Another e-bike forum post that has a really similar connector called 'Julet', perhaps you could get 3 bullets and 5 sensor pins in that format for quick swaps?
|
# ? Jan 25, 2020 01:57 |
|
Continuing my project and I've got a question about a mosfet that's in the plan. So the Pi outputs 3.3v signals, and the plan routes most of them through a shifter that shifts them up to 5V (and this is properly powered and working). So to control the LED for one of the buttons it goes like this: 3.3v out of Pi to shifter which turns it into 5V, which then goes into the Source of my mosfet, the gate on the mosfet goes to ground, and the drain goes to the positive terminal on the LED, and the negative goes back to ground. The voltage between the + and - on the LED is around 3V, though I'm not sure where I would measure to figure out the voltage coming out of the drain on the mosfet. I'm wondering why this can't just take the 5V out of the shifter into the positive on the LED. I've tried to read up on Mosfets and it seems like they can use a low voltage signal to trigger a higher voltage load, but it seems like I'm using a 5v signal to trigger a ??? signal. Playing around with it, I'm able to just connect the + on the LED straight to that 5V output, and the voltage between the + and - on the LED is about 3.2V. So what purpose is that mosfet serving?
|
# ? Jan 25, 2020 08:09 |
|
Can you draw a schematic? It's like trying to describe a coding problem without actually posting code
|
# ? Jan 25, 2020 08:17 |
|
FISHMANPET posted:Continuing my project and I've got a question about a mosfet that's in the plan. So it sounds like the fundamental issue here is that you are trying to use a level shifter to turn your Raspberry Pi's GPIO 3.3v into a usable 5v power source. They don't work that way. You need a proper 5v power supply for what you're trying to do. In more detail, working backwards: You want to turn on an LED using the Raspberry Pi's GPIO header. Great. LEDs need a specific voltage and current to turn on, which varies with the type of diode. A simple red indicator LED might require 1.8v and 5mA to light up, while a powerful white lamp like in a flashlight might take 4v and 1000mA. To do this properly, you need to know the specs for your LED. The Raspberry Pi's GPIOs have two states, high and low. When the pin is high, it is raised to a level of 3.3 volts and can source up to 23mA of current. So you can turn on an LED with the GPIO directly if it can operate at or below those values. The red indicator will turn on, but the white flashlight won't. In order to turn on the flashlight, you need some way of powering it with the voltage (4v) and current (1000mA) it needs. So you get yourself a 5v/2A power supply and hook the LED up to that directly*. Now it turns on, but you want to switch it with the GPIO. So you get a MOSFET and use it as an electronic switch -- it gets spliced into the ground line of the flashlight (assuming it's an N-type) and then you apply power to the gate to turn it on and off. When the MOSFET goes on, the current from the large power supply is allowed to flow and everything works. You can skip the level converter if you ensure that you buy a MOSFET that turns on at 3.3v. Some of them need 6v, 10v, 12v to fully turn on, and if you apply a lower voltage to the gate they'll either not work or only turn on partially and burn up. That's where a level shifter is really meant to be used -- shifting digital logic up or down to the right level for the part you're trying to operate. It doesn't supply significant power. * you can't actually hook an LED like that up directly to the power supply as they are non-ohmic parts and will burn up. You either need an appropriately-sized resistor or a constant-current controller of some kind, but one step at a time e: this is almost too embarrassing to post but i am not currently in a position to draw anything better so you get what you get. there is a pull-down resistor on the MOSFET gate which is important for reliability. Sagebrush fucked around with this message at 08:35 on Jan 25, 2020 |
# ? Jan 25, 2020 08:25 |
|
That's the best schematic I've ever seen
|
# ? Jan 25, 2020 09:53 |
|
Best part of that schematic is... that's what made it finally click for me. I had the drain of the mosfet going to the positive source on the LED, then the negative going to ground. And for that to work I actually had the gate and the source swapped in my mosfet, and then what was powering the LED was the signal directly out of the shifter. So if I plug the LED directly into the 5V source, and the ground of the LED to the drain on the mosfet it works, the light is slightly brighter, and I can measure 5.2V over the LED. Though a bit of a twist with this project. The 5V shifter is needed because there's an LCD panel and LED ring light that use controllers that require 5V signals. The project as designed also started out with 12V driving these LEDs I'm working on (they're rated for up to 24V) but that was apparently too bright and lighting them with 5V was bright enough. This is the mosfet I'm using, and I can't understand the specs well enough to know what kind of input voltage is required to trigger what kind of voltage on the final device. It could be that to trigger the 12V LED the mosfet required a 5V signal. But since this is all on the breadboard I tried wiring the 3.3V GPIO directly to the gate on the mosfet, and it works just fine with the LED still being at 5.2V. So maybe to trigger the LED at 5V the 3.3V gate is enough, but to trigger the 12V LED 3.3V wasn't enough and it had to be shifted up to 5V first (is that how a mosfet works?)
|
# ? Jan 25, 2020 21:32 |
|
the MOSFET you've got is fine. these are the key parts the phrase "logic-level" nearly always refers to a part that can operate on 5v, which is the (old) standard voltage used in transistor-transistor logic. most of the cool new parts run on 3.3v or even lower, to save power, but most of the cheap and sturdy hobbyist components are still designed for 5v. so this line is all you need to look for in your case. this graph shows the part's characteristics in a little more detail, and indicates the peak current that can flow with various voltages on the gate. the specified max continuous current in the datasheet is 30A, which appears to be somewhere around 3.5v on the graph. that's about 2/3 of Vcc (5v), which is what you would expect to be the active level for a TTL part, so everything checks out. since your LED is drawing only fractions of an amp, you can probably actually turn that part on just fine with a 3.3v input. try it without the level shifter. re. your 12v vs 5v stuff -- if the 12v LED isn't illuminating and you're sure you are giving it 12v, then it's probably just not getting enough current, which could be caused by the MOSFET not turning on enough, yes. use the level shifter on the mosfet gate and see if that fixes it. there is no difference to the MOSFET (for your purposes) whether you're running 5v or 50v through the drain and source lines -- it will switch both equally well. the 60v limit is the maximum it will handle but under that it's all the same,.
|
# ? Jan 25, 2020 22:10 |
|
The project as is doesn't have any 12V, but it was originally designed with 12V in mind (by someone else, not me). So part of this adventure is figuring out why it was designed the way it was as I assemble my copy. It uses a shifter with 8 terminals, but the only 3 5V terminals are really needed (2 for the LCD display and 1 for an LED ring controller). Do the other 4 LEDs go through because the builder assumed the mosfets would need 5V to trigger, or did he just have a pile of that 8 terminal shifter laying around and used it and then wired the other 4 LEDs through it for the heck of it? For that matter why do these 4 LEDs go through mosfets but the 3 LEDs in the toggle switches not go through mosfets or the shifter and instead are powered directly from the 3.3V off the GPIO of the Pi? Now that I've typed all that out, I'm going to see what happens if I use a mosfet and run 5V directly through the toggle switch LEDs.
|
# ? Jan 26, 2020 02:13 |
|
Dude. Schematic. As posted above, it doesn't have to be elaborate. I never even wire anything up for myself without sketching something
|
# ? Jan 26, 2020 05:08 |
|
ante posted:Dude. Schematic. Yeah, this. I would go so far as to say nobody should wire anything up without first drawing a schematic
|
# ? Jan 26, 2020 05:31 |
|
I have a schematic, I linked it in my initial post. I'm not just plugging shot in randomly and seeing what happens. I'm working off of someone else's schematic and trying to understand it.
|
# ? Jan 26, 2020 05:49 |
|
It doesn't sound like you're following the schematic exactly/properly, though, so drawing a schematic of exactly what you have wired it will help us figure out what you're doing.
|
# ? Jan 26, 2020 05:50 |
|
I'm looking for some advice/sanity-checking on my first "proper" electronics project (proper in the sense that I'm trying to make it look professional). I'm a software guy by profession with experience in mechanical engineering, but electronics-wise just some small Arduino stuff making basic circuits on breadboards. I'm sick of using my phone as my bedroom alarm clock so I'm working on creating a small wooden alarm clock. What I'm planning so far:
|
# ? Jan 26, 2020 18:55 |
|
The MSP430 by Texas Instruments is the MCU I use in power-sipping applications because of its extremely low current sleep states. Even the little ones would be able to handle your IO requirements without a problem. That said, the MCU power cost no matter how you slice it is going to be dwarfed by the LEDs and whatever you are going to use as the alarm function (speaker? piezo buzzer? vib motor?) when it goes off. Is your plan to keep the LEDs on at all times? edit: I haven't used seven-segment displays and I don't know how it gets divvied up by individual segments but let's say you can get away with 10mA average draw per seven-segment display...obviously the 10s digit for the hour will be off most of the time in 12hr display, so I'm guessing here. Four displays comes out to 40mA, so 1000mAh / 40mA = 25 hours for just the LEDs. You should be able to keep the other components under 2mA average draw without breaking a sweat - a microcontroller in deep sleep will be in the microamp range for most of the time - but that's still only about a day on a single charge for an (optimal) 1000mAh source. edit2: \/\/\/\/\/\/ agreed on trusting your alarm to a battery powered device alone. It sounds like the central concept of the OPs design is flipping it over to turn it off but they should still be able to get away with a micro USB sticking out the back of it. They could even build the port into a slip ring! csammis fucked around with this message at 19:17 on Jan 26, 2020 |
# ? Jan 26, 2020 19:06 |
|
I would never trust my alarm to something that isn't plugged into the wall, sleep mode notwithstanding. Is there a reason you're trying to make this battery operated? A simple wall wart could obviate all of your power concerns, at least for your initial prototype.
|
# ? Jan 26, 2020 19:14 |
|
|
# ? May 30, 2024 13:10 |
|
Check out the data sheets for the current AVRs you use in Arduino applications. Most have a power down sleep mode that can be woken by external interrupts or WDT. There are some considerations about pin state to keep in mind if you are looking to get the absolute lowest power draw while sleeping. Support circuits generally end up being the biggest power draw if you make effective use of sleep.
|
# ? Jan 26, 2020 19:19 |