-
I have to date firmware and A4 is connected to a diode. I'm using this board: http://www.espruino.com/EspruinoBoard
-
-
-
Do I need a pull down resistor or something for the digitalRead(pin)? I'm getting unexpected results with this... I'm trying to read from pin B0 and B1, when I set A2 HIGH, sometimes the reading on B0 is actually effected, even when the two aren't connected... at first I thought it was the breadboard, but I tried on another and it's still not behaving as expected...
Btw, digitalWrite is working as expected
-
I think I'm going to be able to get around the DAC issue (thanks for the heads up).
Conceptually I don't understand how any battery can be charged without using some beafy diode to prevent current flowing out of the positive terminal (otherwise all what would happen would be similar to adding batteries in series) but still having a complete circuit so electricity will flow at all... I don't want to use a dedicated IC, I would like to build something myself and everything I'm finding on the internet is pointing me to these IC's...
-
I'm going to test a few of these ultra high capacity batteries with espruino, I figured it would be a straightforward process of just monitoring the voltage with the ADC and for charging I would adjust the output on the DAC, but specifically for the external battery charging circuit, I've attached a picture of something I found while looking at solar panels and was curious if anybody has any additional pointers... Conceptually (as a layman), there doesn't seem like much else that would be needed... Obviously I would first try adjusting the DAC with the recommended values provided by http://www.digikey.com/en/articles/techzone/2012/sep/a-designers-guide-to-lithium-battery-charging
-
What I'm experiencing when I use one of these http://www.ebay.com/itm/5V-One-1-Channel-Relay-Module-Board-Shield-For-PIC-AVR-DSP-ARM-MCU-Arduino-/310566336050?pt=LH_DefaultDomain_0&hash=item484f323632 is the GPIO is being forced HIGH even with a digitalWrite(A2,0); ... the relay will toggle if I physically disconnect the pin, but the micro isn't able to toggle the output of the pin... any advice? I did get the relay to work once before while using pin C9 which is 5v tolerant instead A2 which is not 5V tolerant, however the tutorial http://www.espruino.com/Heater+Controller used a pin that was definitely not 5V tolerant and it worked so I'm assuming something else is going on...
-
But don't forget that this curve is showing only typical behavior and with 5V across the MOSFET. totally useless information, because 2A * 5V = 10W. the MOSFET would expire in a puff of smoke if we tried that.
So, I just want to be sure that I'm understanding this correctly since when I look at the datasheet, it says the transistor you linked to can handle a continuous current of 4.9A at 4.5V on the gate which is definitely a lot more than 10W... am I reading this and understanding you correctly?
-
That is a beast of a transistor. At Vgs=10, it is spec'ed for 61 amps continuous current.
I've attached two screenshots of the datasheet that confuse me with what I'm being told about Rds(on) and this maximum peak current... The Rds says the transistor can only handle 15A at 10V but the maximum specs say it can handle 61A at 10V... what does it mean! LOL
-
if we look at the datasheet I linked to, Vgs(th) is the threshold voltage at which the MOSFET starts to conduct current (0.00025A). This threshold is between 0.6V and 1.5V, at room temperature. This is good information in the way that if we have 1.5V on the gate we should be able to run at least 0.00025A in the MOSFET and can expect that the drain voltage will be 1.5V or below. But most of the time our loads are larger than 0.00025A, are they not?
Now, the threshold voltage is not useful information if we want to control a real life load. If the load is for example 2A we will need a lot more gate voltage if we want the transistor to turn on. If we look at figure 3 we could be fooled to expect that we only need 2V gate voltage. But don't forget that this curve is showing only typical behavior and with 5V across the MOSFET. totally useless information, because 2A * 5V = 10W. the MOSFET would expire in a puff of smoke if we tried that. The only section in the data sheet that gives us any solid promise is the Rds(on) value at 2.5V gate voltage. If we apply 2.5V at the gate and the load current is 2A we know that the resistance will be max 0.065 ohm, if the transistor is at room temperature, because the data sheet says so. the power dissipation then is 0.065 * 2^2 = 0.26W, and we can be sure that the transistor can handle this heat dissipation. the temperature rise will be about 34 degrees.So, just to be clear, this .045 and .065 for the different voltages is meant to give us a ratio? Does this ratio only specify the required voltages applied to the gate in relation to the current on the load? As in, assuming you had .00000000000001 amps on the load, but wanted to apply the maximum 20V on the Drain-Source, it would only take at a minimum .6V on the Gate since that's the beginning threshold for the transistor to turn on?
-
Re: BJT - So you have positive voltage on emitter, and want to know how much current to apply to the base to make it saturate? It looks like somewhere around 5mA with a load of 50mA, leaving a voltage drop of around 0.4v? The voltage doesn't matter.
OH! lol, I always thought the .4V was the allowable voltage across the collector-emitter... not the drop out voltage... where do you see that .4V being the drop out voltage? So just to be clear, regardless of what voltage is being applied to the emitter (with the exception of voltages above 40V) it only takes 5mA on the base (which inserts 50mA to the load) to have it saturate? Say there was 10V being applied to the emitter and you only apply 4mA to the base, would that mean only 8V is allowed through the bjt?
-
But don't forget that this curve is showing only typical behavior and with 5V across the MOSFET. totally useless information, because 2A * 5V = 10W. the MOSFET would expire in a puff of smoke if we tried that.
Ok, I'm getting conflicting information again... Dr Azzy says:
That is a beast of a transistor. At Vgs=10, it is spec'ed for 61 amps continuous current. Just a jaw-dropping number, and 31A higher than the package limitation (nice marketing)...
Also, when I asked
for the collector/emitter to reach the peak 40v
I mean, the bjt's maximum voltage rating from collector/emitter is suppose to be 40V, but what amount of current would I need to apply to the base in order to allow 40V from collector/emitter given saturation ratings...
-
Sorry it's been so long since I responded to this post, just been busy with other stuff...
Look for parts that have Rds(on) specified at 2.5V. this one will have maximum 0.065 ohm resistance with 2.5V gate voltage. beginners make the mistake of looking at the spec for gate threshold voltage, but that is specified at very low current level. this MOSFET will start to turn on at typically 0.9V, but to drive high current you need more gate voltage. a 3.3V GPIO can drive this MOSFET with drain currents over 4A.
I read the article linked by Gordon about MOSFET's and it's actually pointing to Vgs being the specification I should look for... Why would knowing the resistance levels with 2.5V on the gate tell me how much current can be passed through the transistor? Actually, I'm really starting to get confused now after looking at that transistor datasheet you linked, the graph from figure 3 says there would be much much more current than 4A flowing through the transistor with just 2.5 V for Vgs...
Also, for the general purpose BJT, I'm confused as to how much current needs to be applied to the base for the collector/emitter to reach the peak 40V given the saturation levels I highlighted in the OP...
Thanks :-)
-
I'm super new to electronics and am still trying to wrap my head around how to read a datasheet. I've attached an image of a part of this datasheet that I'm trying to figure out:
https://www.fairchildsemi.com/datasheets/2n/2n3906.pdf
If I understand correctly (and someone please tell me if I am correct or incorrect, I am only interested in transistors as switching devices even though I know they can be used as amplifiers) this PNP transistor requires 1mA on the base pin when there's 10mA on the collector pin (regardless of Voltage since Current is what determines if the transistor is saturated or cut-off, which also means there's a 10:1 ratio between collector and base) and that the .85V is the voltage drop of the transistor... Someone has been trying to explain this to me on a different forum and this is what I've come up with so far.
-
-
-
-
I thought that was just one type of sequence... the Wave Drive, Normal Full Step, and the Half-Step Drive... will try this later, but could you explain what these step array elements are doing? Also, how am I able to reverse the direction of the motor? When I reverse the order of the pins in the code, it just jitters...
-
This is the code I'm using to generate what is called a 'Wave Drive' using this module DC 5V Stepper Motor + ULN2003 Driver Test Module and this is the result I'm getting: video
Can someone tell me why this motor is spinning so slowly?
function stepper(func) { var a = C11, b = C9, c = C7, d = C6; var list = [d,c,b,a]; for (var j = 0; j < 1000; j++) { for (var v = 0; v < list.length; v++) { digitalWrite(list[v],1); for (var h = 0; h < list.length; h++) { func(h,v,list); } } digitalWrite(d,0); } digitalWrite(a,0); } function stepperWaveDrive() { stepper(function (h,v,list) { if (list[h] != list[v]) digitalWrite(list[h],0); }); } stepperWaveDrive(); //stepperNormalFull();
This is the attempt with Espruino 4 Step Control Code
var step = 0; var steps = [0b0001,0b0010,0b0100,0b1000]; var stepperPins = [C11,C9,C7,C6]; function doStep() { step++; digitalWrite(stepperPins, steps[step % steps.length]); } var stepInterval = setInterval(doStep, 200);
-
-
The LED and potentiometer are connected where they should be receiving somewhere near 11V after you subtract the voltage drop from the diodes and how it's around a 4.7V output (the multimeter is monitoring the voltage of the second capacitor, not the total voltage of the circuit, when I measure the total voltage, it's just showing up as 4.7V). I've tried removing the LED and potentiometer and the capacitor just slowly discharges.
Do you know why the voltage wouldn't drop until I used a digitalRead(C9)? Shouldn't just calling the digitalWrite(C9,0) cut the signal?
-
The test leads are measuring the second capacitor from the PWM line, the schematic I've replicated can be found here: http://youtu.be/I4ED_8cuVTU?t=11m11s
There is actually a drop in voltage from 5000 Htz to 10000 Htz and I just noticed a weird thing where the Capacitor's Voltage actually increases when you use digitalWrite(C9,0) and will only start discharging when you use digitalRead(C9)... also, if you look at the line of code I ran just before running the first digitalRead(C9), you will see that the output was 0 and yet I got a 1 on that pre-test... no idea what was going on there...
I'm using 47uF capacitors, diodes that have a .7 forward voltage drop, 10K potentiometer and a 76ohm resistor
-
This page http://www.espruino.com/Compilation says that there are moments when you would want your code to run faster than normal speeds you get from source code, I'm curious if anybody has ever genuinely been in that situation (I'm just a beginner and don't know any situations that would call for a microcontroller to transmit over 5KHtz unless you were trying to drive a motor or something)?
-
All good in the hood, thanks guys!