The forums are retiring and are now closed for new topics and comments. The existing content will remain online and accessible through 2020 to provide everyone the opportunity to save any relevant information. In the spring of 2021, these Community forums will be taken offline.

Search for h in Topics

Transistor H-bridges

Is it possible to make a transistor H-bridge with PNP transistors or can it only be done with NPN transistors.  As far as my knowledge( or lack thereof) of transistors goes, I think it would be possible, but it would require more than 4 transistors and it would be much more complex, however I could be entirely wrong.  Any input would be helpful, thanks.

Question by jpenn    |  last reply


Ok guys, my last project, the XM8, failed. What I got out of it was a brand-new mag system, it basically makes it complete the chamber. In other words, it won't fire w/o mag, which could help or hurt. Anyway, the Scar-H will have---- -true mag release -folding stock(I think) -new mag mech -tactical rails -RDS -EOTech sight -Heartbeat sensor(maybe) -M203(Maybe) -Undermounted Shotgun(maybe) -Removable "Plasticsights"  I think it will come together alright, but no guarantee. It will be posted as a slideshow first, and then(if people like it) as a full instructable.                       Thanks, Builder968

Topic by builder968    |  last reply

H-Bridge Circuit Help

Hello,I have an assignment to build an H-bridge circuit to control the direction of a motor with two buttons. The only materials I can use are depicted in the image; only three resistors, a battery pack, two button switches and an L283D chip. Based on the template given to me, I constructed the circuit as shown in the picture but it does not work. It looks very messy and I'm sure there's an easier way, but I just want to get it working first. If anyone knows what I'm doing wrong here I'd appreciate it.

Question by GaleDale    |  last reply

SMPS H-Bridge trouble

Hi,  I've built a 1kW SMPS designed to take a 350V unsmoothed DC input and convert it to 3kV @ 300mA. The circuit is basically Uzzors2k's design seen here minus the overcurrent protection and smoothing capacitor (for now), however I accidentally wired the GDT outputs backwards so the gate resistors (33ohm 2W) are on the source. I have used alternate MOSFETs the latest attempt with FDPF16N50T's. I've had various problems with the circuit, primarily the MOSFET's exploding seemingly from overvoltage (evidence of flashover in some cases despite no evidence of secondary leakage (i dismantled the transformer to check)). During my last test I had a flashover between the drain and source pins of one of the FET's, in addition all of the gate resistors were smoking hot after, seems the gates had all been shorted (first time this happened, other occurrences were from case to ground). This happened despite the variac only being turned up to 40% which should be well well below the pin spacings maximum voltage tolerance. I have checked the drive signals, they are quite nice square waves at about +-15V with some oscillation on their rise. I have built SMPS's before, one is currently working with similar MOSFETs using a half bridge at 300W. Does anyone have any suggestions as to why these troubles are occurring or have any suggestions to fix it or have any alternative circuits that may be less troublesome (is a h-bridge easier to manage?)? Thanks, Stephen I​ just gave it another test with a H-bridge instead and the source of one of the FET's blew so it appears that there is just FET failure and maybe not arcing between drain and source.

Question by The MadScientist    |  last reply

H and O burning car

The other day a friend and i were disscusing the possibility of riging an old vw beetle engine to run on hydrogen and oxyen separated by electrolosis immediatly befor combustion. heres what weve come up with so far. 1: run a second alternator off of the engine and directly to the gas tank which would be full of water (this would also contain some sugar or some form of electorlite to aid in the conductivity) as you would be burning the H and using the O as you oxidizer it would not be nessesary to worry about which gas is which u would only need one line this line would run to a valve of some sort limiting the flow of the two gasses the carb would then be removed as u are putting O into ur engine so there is no longer any need for it. the line would then be run to the fuel intake where said amount of gas is released (determined by the valve) no here is where we run into what we think might be a problem would the pressure of compression return the gasses to their original state; water? if not then the engine should then run at this point with increased horse power as of the explosive properties of these gasses. (note this is in a nutshell nothing is ever this easy if it was everybody would be doing this) of course as any responsible scientist would do i will tes this on my dads lawnmower first. not really but i do have a test engine my next project is to see if i can get an old snow blower engine to run on black powder if anybody has any ideas on that as well let me know as it is tricky because an engine requires oil but black powder igites dry that is why im going with a 2 cycle so i can try ro run it dry for like 3 seconds and if it works try to figure out how to adapt it to one with oil an maybe eventually my car how cool would that be. it would be like driving a machine gun. not to mention the increased horse power and torque.

Topic by buildingteen    |  last reply

Molecular Hydrogen? Answered

Can someone tell me if you can use H2 to cook with, if yes or no, can you explain what happens either way, thanks!!!!

Question by RayannaJ    |  last reply

what skateboard deck should i get?

Im in quite a pickle. i am wondering  whether i should get a crooked or a minilogo and if you have any other ideas of a good cheap deck fill me in so ya but try and stay within the lines

Question by misterlister    |  last reply

how to control a dc motor from a cd-rom with an h-bridge RX-2B ?

Hi,, i'm new here and i'm new using arduino,,,  i have an arduino uno, and i have to make a project for a class in my university.i would like to know how to use a dc motor form a cd-rom, i have an h.bridge RX-2B, and i need to know how to control the direction of the motor with those components, i've found some information around, but using another h-bridge, so i'm not sure about the configuration of my circuit, i jus t need tha for the moment,,,  thanks?

Question by edwin0791    |  last reply

Need urgent help in H-bridge!! Answered

Hi,      I am building a H-bridge to drive my robot's motors. I am using the circuit from the following link     (Figure 12). For the mosfets I have used IRF540 and IRF9540. The moment I connect this circuit to my 12v power supply, the IRF9540, heats up very quickly although I have not connected it to any load !  For logic input, I am using the Arduino. Please help me with this H-Bridge circuit. Thanks in advance.

Question by Jayvis Vineet Gonsalves    |  last reply

Using the IRS2110 for 36v H-bridge? Answered

So i have some 850W 36v DC motors that i need to design an H-bridge for, and ive decided to use the IRS2110 to driveing them, since i need to drive the highside fets. I however have no idea of how to use that chip. Any help? :P

Question by dumle29    |  last reply

how to make an H FRAME EASEL? Answered

I have ordinary foldaway easels , but I would like something bigger, I saw somewhere a picture of an H frame easel made of wood, it looked rather simple to put together, but maybe not thank you christina ross

Question by cross15    |  last reply

Alternative to a strimmer (weedw[h]acker)?

When my electric lawnmower eventually, irreparably died, I replaced it with a manual cylinder mower. My strimmer is now due to be retired. Is there a manual version of a strimmer, apart from a pair of shears?

Topic by Kiteman    |  last reply

Robotics Idea for 4-H National Youth Science Day - Send Us Your Ideas!

Our group is looking for ideas for the 2012 4-H National Youth Science Day, a nation-wide event in October promoting science, engineering and technology. This year, the theme is robotics! * Age group is anywhere 7-14 years old * The event is based around an idea (i.e. make a solar robot that moves) and a materials kit * The materials kits should be low cost (<$50), easy to assemble in 1/2 hour or less (number of kits needed may be in the thousands) * Connection to the environment a big plus * Connection to other robotics initiatives a big plus (i.e. Jr. First Lego League) Please send me your thoughts, ideas, links or whatever on this subject.

Topic by phatguppy    |  last reply

what is the best microcontroller to use ( pic ?) if i want to drive a motor forward and reverse using a h-bridge ?

Im trying to save space in the design and be cost effective( i wanted the pic and h-bridge and the motor to be under 1 inch) . so im trying to use the smallest chips that will do the job.  i was wondering if an 8-bit pic would do the job ?   edit: Id prefer using Microchips PIC, i think i have somewhat an idea of using MPLAB. Im planning on using a brushed DC motor, H-bridge, and Voltage regulator.  It has to fit under a 1' area taking up the least possible space because im using it as an unlocking/locking device. i was wondering what would be the best microchip pic that could achieve this with the least cost and size.

Question by dudeitskumar    |  last reply

I have a large bipolar stepper motor. What's the simplest circuit to drive it with a microcontroller (arduino)?

I have a large stepper motor with 4 wires (bipolar) from an old printer and I assume it's 12 volts, or at least higher than 5v. I have plenty of transistors: 2n3904, 2n2222, 2n4401 and 2n3906 (PNP). How do I drive the stepper with output from an arduino? (simple H-bridge schematic?) Also, how can i find how many steps it has? Thanks!

Question by Vick Jr    |  last reply


Hi! this is kgb showing you my highly addaptable artillery unit version one! it can fire: rifle ammo, crossbow arrow, and cannon ammo. It gets about 200 feet should I post?

Topic by Knex_Gun_Builder    |  last reply

HELP ME ::: want to interface ps/2 mouse using uno to pc

Hi friends, i am new to arduino board. Trying to make a arduino uno based PS/2 mouse by using ps2dev.h... From the example from that the mouse move diagonally only. how to set that in other direction left,right,top,bottom.. // move the mouse diagonally     delta_x = 1;     delta_y = 1;     write_packet() Anyone guide me, how to move right or left or up or down...plz help me #include "ps2dev.h" PS2dev mouse(3,2); // 2 data 3clock char buttons[3] = {0,0,0}; int delta_x = 0; int delta_y = 0; //we start off not enabled int enabled =0; //ack a host command void ack() {   while(mouse.write(0xFA)); } void write_packet() {   char overflowx =0;   char overflowy =0;   char data[3];   int x,y;     if (delta_x > 255) {     overflowx =1;     x=255;   }   if (delta_x < -255) {     overflowx = 1;     x=-255;   }    if (delta_y > 255) {     overflowy =1;     y=255;   }   if (delta_y < -255) {     overflowy = 1;     y=-255;   }     data[0] = ((overflowy & 1) << 7) |     ( (overflowx & 1) << 6) |     ( (((delta_y &0x100)>>8) & 1) << 5) |     ( ( ((delta_x &0x100)>>8)& 1) << 4) |     ( ( 1) << 3) |     ( ( buttons[1] & 1) << 2) |     ( ( buttons[2] & 1) << 1) |     ( ( buttons[0] & 1) << 0) ;       data[1] = delta_x & 0xff;   data[2] = delta_y & 0xff;     mouse.write(data[0]);   mouse.write(data[1]);   mouse.write(data[2]);   delta_x = 0;   delta_y = 0; } int mousecommand(int command) {   unsigned char val;   //This implements enough mouse commands to get by, most of them are   //just acked without really doing anything   switch (command) {   case 0xFF: //reset     ack();     //the while loop lets us wait for the host to be ready     while(mouse.write(0xAA)!=0);      while(mouse.write(0x00)!=0);       break;   case 0xFE: //resend     ack();     break;   case 0xF6: //set defaults     //enter stream mode       ack();     break;   case 0xF5:  //disable data reporting     //FM     ack();     break;   case 0xF4: //enable data reporting     //FM     enabled = 1;     ack();     break;   case 0xF3: //set sample rate     ack();;); // for now drop the new rate on the floor     //      Serial.println(val,HEX);     ack();     break;   case 0xF2: //get device id     ack();     mouse.write(00);     break;   case 0xF0: //set remote mode     ack();      break;   case 0xEE: //set wrap mode     ack();     break;   case 0xEC: //reset wrap mode     ack();     break;   case 0xEB: //read data     ack();     write_packet();     break;   case 0xEA: //set stream mode     ack();     break;   case 0xE9: //status request     ack();     //      send_status();     break;   case 0xE8: //set resolution     ack();;);     //    Serial.println(val,HEX);     ack();     break;   case 0xE7: //set scaling 2:1     ack();     break;   case 0xE6: //set scaling 1:1     ack();     break;   }   } int xcenter ; int ycenter; int xsum = 0; int ysum = 0; void setup() {   unsigned char val;   // send the mouse start up   while(mouse.write(0xAA)!=0);    while(mouse.write(0x00)!=0); } void loop() {   unsigned char  c;   if( (digitalRead(3)==LOW) || (digitalRead(2) == LOW)) {     while(;)) ;     mousecommand(c);   } if (enabled) {     // move the mouse diagonally     delta_x = 1;     delta_y = 1;     write_packet()    }   delay(50); }

Question by melwin.a3    |  last reply

Shift Mosfet and H-Bridge for Arduino Question?

Hi guys, Im Rinozen.. Im newbie on Arduino and Electronic ^_^ Anyway, can you guys please help me? Look at the schematics i've uploaded. Are there something wrong about the track? And what value for the Resistors and Capacitors for the right choice? Sorry about my english ^_^ Thanks for reply... :)

Question by rinozen    |  last reply

H-Bridge Minimum Voltage That Can Be Switched

I am making a circuit that can switch the polarity of the output of my voltage supply at the timed intervals using a microcontroller. I am using a circuit similar to the one at this link: It works, but not at when the power supply outputs below about 3 volts.  Is there any way I can modify this circuit so that it switches the polarity all the way down to 0 volts?

Question by Ethanal    |  last reply

Need Project Ideas for 4-H SET

Hi, I am a third year project volunteer with 4-H and looking for ideas on what our next years project theme should be, So far in year one we did robotics (vibrating bots, BEAM, Legos, and underwater ROVs). In year two we did mechanical devices (solar cars, catapults and compressed air rockets). Any unique ideas for our 7-12 year old age group is encouraged. Info on our activities are here.

Topic by phatguppy    |  last reply

controlling coil using H-bridge...possible? Answered

Hi! Yesterday I bought a Nikko X-pander r/c car, for only $ 3, and I want to put my own electronics on it. I've seen that the front wheels are controlled by some sort of electromagnet that changes polarity to turn the wheels left or right. I already made my own homemade L298 module and I want to know if it's possible to use one channel of L298 driver to change the angle of the front wheels. Thanks.

Question by Timofte Andrei    |  last reply

GEN H-4 Mini Personal Helicopter

The GEN H-4 personal helicopter weighs 70 kg, carries 220 kg total, has 40 hp of 2-stroke power, counter-rotating props, and costs $35 K. Check out what it takes to put together:, get a flying motorcycle from Butterfly Gyroplane:

Topic by ewilhelm    |  last reply

how can I make this H shifter?

I seen this instructable and I found it cool so I decided to make one. I decided, based in other instructables using a cheap pc USB game controller. I have seen how to make the steering wheel, and I decided to make the pedals with linear potenciometers, such as the parking brake, but I don't know how to make the H shifter. Can somebody help me?

Question by tgferreira184    |  last reply

Right Transistor for a apx. 50watt H-bridge? Answered

Currently i am trying to make an Arduino UNO R3 control a 50 Watt (12 volts @ 4 amps) motor with an H bridge and use the Pulse width modulation on the Arduino to control the transistors. However i don't know what would be the best choice for transistors? Also I am new to this so can some also explain how transistors are named?

Question by luig    |  last reply

Problems with H. G. Wells' "Little Wars".

So I was reading this instructable, and the Little Wars sounds like a lot of fun. But 'ible was fuzzy on the actual base battle mechanic. Does anyone know how to actually play this game? Please help!

Topic by megakacktus    |  last reply

How to measure open loop H(s)? Answered

When designing constant current linear dummy loads, and when I was (attempting) to design a really nice linear power supply with op amps and pass transistors, I consistently run into the devil of the circuits that incorporate feedback. INSTABILITY! Especially if I use fast op amps, or MOSFETs, etc. My understanding as to why this happens is because I still have some positive gain at the point at the frequencies where signal the total loop has that dreaded -180 degree phase (gain margin) and then where the gain is unity and phase is at -180, again allowing that frequency component to be successively amplified (or never attenuated) as that wave whirls around the loop. However, with op amp circuits, how am I supposed to get an accurate open loop measurement, when the DC gain is so stupidly high the input to an op amp is essentially a comparator? This article suggests whacking in a 20 ohm resistor and injecting a signal into it, and measuring the voltage on either side of it (?) How is this supposed to work? Is there a better method in something like LTspice?

Question by -max-    |  last reply

I'm back

Hi everybody, I'm back. I got really into airsoft and real guns earlier, and neglected my K'nex. Sorry if I have not replied to your comments, I have not been on in a while, and your feedback is appreciated. Anyway, does anybody still want the M16? If so, I'll finish it off and post. Or, if somebody wanted to help me improve the internals, that'd be fine too. After that, I'll probably make a SCAR-H, as I just got an airsoft replica, so the K'nex version should be very realistically sized. I'll probably make it a realistic replica (Fake bolt, real style take down, folding/collapsable stock, etc, etc), and not a shooting model. After that, I'll remake and improve the LMG. IDK what I'll do then.  If nobody wants the M16, I'll just go to the SCAR-H. If nobody wants that, I'll go to the LMG. 

Topic by rec0n    |  last reply

rc car no longer accelerating?

Alright, so ive got this rc car, it runs off of a 7.2v battery pack and has variable speed and turning. it is not a hobby-grade car, but it is still something id like to hold onto. today, when i tried to drive it, i discovered it could not accelerate, forwards or reverse. it can steer fine, but trying to accelerate does nothing. ive ruled out the controller and the motor, which means the h-bridge and associated circuitry must be to blame. i tested the battery in another car of the same model (not mine), and all was well there. the h-bridge must be PWM controlled in order for there to be variable speed, so heres what im figuring: the motor is making a clicking noise when i pull the trigger on the remote, looking at the motor, it is turning very little and then stopping and then doing this again, at a fast rate. when it stops turning for that split seond it returns to the original position, because it has turned so little. i know the motor itself is fine, because i connected the battery straight to it and it spun up and turned the wheels. i have a feeling the issue lies within the PWM control. i cannot guarantee the receiver chip is fine but it seems kind of odd that it would be the part to fail; regardless i cannot find a datasheet using the numbers on the chip. if i were to try and look for an issue/failed part somewhere, where might you guys think i should start? there are a number of transistors on the board around the h-bridge, some capacitors, and a lot of resistors as well. i checked all the resistors inside the h-bridge and they are all the same value as the bands indicate, andthere are no corroded or cold solder joints. i plan to test the h-bridge on its own once i find a diagram i can reference to, that way if the h-bridge works i can rule it out and narrow the possibilities. if you need any more information please let me know.

Question by zack247    |  last reply

help upgrading an old RC truck?

Ive got an old New Bright RC truck, i got it around 2000 so as you can assume the batteries arent very good anymore. im not looking to repair the batteries though, im looking to upgrade the truck with a little bit of some newer technologies. heres where i ask for help: i dont want to overpower the control board in the car, since it may have adverse effects on how it performs, so i just want to up the power to the motor. i have some D2583 and B1658 transistors, i found a datasheet for the D2583's that says they are high power NPN transistors, but no such luck with the B1658's. using the D2583's (i have 6 of them), i want to create a circuit that runs from the main board, and acts as a second H-Bridge (or some sort of control circuit) that controls more power, so i can safely run more voltage to the drive motor without overpowering the main circuit board. does anybody know how i can do this? i have attached a picture of the area on the circuit board where the original H-bridge is.

Question by zack247    |  last reply

what is the basic steps to built a dvb-h station ?

(it's nessesary much more for me help me please) thanks i prepair to master about this subject and in my country we don't have any supports about it

Question by modar saleh    |  last reply

Control DC Motor with a L298N H-Bridge with 24V

Hello everyone, I bought this module with a L298N H-Bridge inside: Now I want to control a 24V DC motor with an incoming PWM 488 Hz signal from an external converter. I don't want an arduino or something else to control it. Just from this pwm signal. How do I connect it? I use a 24V power supply.

Topic by julianpe    |  last reply

TNKIT entry and FN SCAR H (Now with pictures)

This is my TNKIT entry, an F1 based car. It has built-in suspension (not independent, but on the axle), and realistic features. The last pictures are of my new assault rifle, an FN SCAR replica. The stock is different because of the internal ram mechanism, and it has Ironman rails top and bottom, with strange new rails on the sides, which hold a bipod at the moment. An ironman mag adaption allows for extremely quick mag changing, with the release lever an inch from the trigger at the front of the trigger guard. The flip-up iron sights have been modified since these pictures, and the barrel (area with the bottom rail, not the false barrel at the end) has been shortened by 2 units, making the weapon more realistic and easier to use. Uses lots and lots of y clips and hinges, and requires about 6 cut white rods (can get away with 5). The EGLM fires a large projectlie using a push trigger behind the mag (in front of and below the handle). Also for your enjoyment; my MP5 from May.

Topic by knexguy    |  last reply

H E L P! Password troubles with this site

I have had troubles with password resets. i am ranting about this because your password re-set tool is off. every time i login i have to reset my password because it says my password has been changed. this happens even if i sign out right after i created a new password. this has happened constantly for the past week. i love this site but my tolerance is being cut short. please email me at or at least leave a reply so i know someone even reads these.  if your tech support contact me or lose a few instructables in the making if this isnt fixed soon. ill explain more if i get at least 1 reply from a pro member or an administrator or from tech support. i was using google chrome o/s windows 7 for everyone else with this problem. i fixed it by the help of someone below. sorry cant remember your name. i fixed it wb going to the tool icon drop down menu>history>edit history>delete all browsing information>check mark all boxes> enter>re-login should work =]

Topic by nuckthebuck    |  last reply

Need help with MOSFET h-bridge; gets hot when using PWM frequency of ~500Hz. Answered

Hello, I recently bought an Arduino and used it to control a MOSFET h-bridge circuit.Everything worked fine until I started using PWM to drive the motors.The PWM frequency is about 500 Hz and I've already tried switching out the 1N4004 flyback diodes in the h-bridge circuit for 1N5819 shottky diodes but it didn't help. The schematic of the h-bridge can be found here ( ) What should I do? Andy

Question by Monoclecat    |  last reply

Hi-Cap horizontal magazine concept

Here is a concept I came up with a while ago. Basically, it is just a mechanism that allows a normal grey connector mag (I.e. One that would be used vertically) to be used horizontally, and so solving the problem of the low capacity of traditional knex horizontal magazines. However it is not without issues. The model used in these pictures is rather large, and there is an issue where the pusher cannot push the last connector out fully. Anyway, I thought I'd just I'd post this so if anybody is interested, they can use this concept and/or improve it so all issues are fixed. Just make sure to give me credit pictures: 1) overview  2/3)  overview of the mechanism 4) the red rod blocks the rotating mechanism so that no ammo falls out when not in use. Pull it out to initiate feeding

Topic by I.E.    |  last reply

Ethernet.h causing problems with 7 segment display driver [Arduino]

Hey Instructables,  I have a really annoying issue with some Arduino code I am writing.  The code is for an ethernet controlled countdown timer.  In it's component parts the functions all work fine,  I can drive the 7 segment display fine. I can start/stop/set a count over Ethernet However as soon as I add the line  Ethernet.begin(mac, ip); in void setup()  The 7 segment display starts to show errors, specifically the first of the four digits. Even If I don't include any additional Ethernet related code in the loop, just calling the library on setup causes problems.  I'm not an especially experienced programmer so I'm really hoping someone can share a little of their wisdom here! #include #include          // needed for Arduino versions later than 0018 #include #include          // UDP library from: 12/30/2008 int digit1 = 11; //PWM Display pin 1 int digit2 = 10; //PWM Display pin 2 int digit3 = 9; //PWM Display pin 6 int digit4 = 6; //PWM Display pin 8 //Pin mapping from Arduino to the ATmega DIP28 if you need it // int segA = A1; //Display pin 14 int segB = 3; //Display pin 16 int segC = 4; //Display pin 13 int segD = 5; //Display pin 3 int segE = A0; //Display pin 5 int segF = 7; //Display pin 11 int segG = 8; //Display pin 15 // Enter a MAC address and IP address for your controller below. // The IP address will be dependent on your local network: byte mac[] = {   0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; IPAddress ip(192, 168, 1, 177); unsigned int localPort = 8888;      // local port to listen on // buffers for receiving and sending data char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //buffer to hold incoming packet, char ReplyBuffer[] = "acknowledged";       // a string to send back // An EthernetUDP instance to let us send and receive packets over UDP EthernetUDP Udp; elapsedMillis timeElapsed; //declare global if you don't want it reset every time loop runs //  milliseconds in a second unsigned int interval = 1000; unsigned int seconds = 0; unsigned int state = 1; unsigned int timeSetting = 10; unsigned int oldSeconds = 0; char theCount[9] = "01:06:30"; int secs = 0; int mins = 0; int hours = 0; String isItTime = ""; String firstFour = ""; void setup() {                      Ethernet.begin(mac, ip);   Udp.begin(localPort);      pinMode(segA, OUTPUT);   pinMode(segB, OUTPUT);   pinMode(segC, OUTPUT);   pinMode(segD, OUTPUT);   pinMode(segE, OUTPUT);   pinMode(segF, OUTPUT);   pinMode(segG, OUTPUT);   pinMode(digit1, OUTPUT);   pinMode(digit2, OUTPUT);   pinMode(digit3, OUTPUT);   pinMode(digit4, OUTPUT);     pinMode(13, OUTPUT);     } void loop() {     displayNumber(millis()/1000);    } void displayNumber(int toDisplay) { #define DISPLAY_BRIGHTNESS  500 #define DIGIT_ON  HIGH #define DIGIT_OFF  LOW   long beginTime = millis();   for(int digit = 4 ; digit > 0 ; digit--) {     //Turn on a digit for a short amount of time     switch(digit) {     case 1:       digitalWrite(digit1, DIGIT_ON);       break;     case 2:       digitalWrite(digit2, DIGIT_ON);       break;     case 3:       digitalWrite(digit3, DIGIT_ON);       break;     case 4:       digitalWrite(digit4, DIGIT_ON);       break;     }     //Turn on the right segments for this digit     lightNumber(toDisplay % 10);     toDisplay /= 10;     delayMicroseconds(DISPLAY_BRIGHTNESS); //Display this digit for a fraction of a second (between 1us and 5000us, 500 is pretty good)     //Turn off all segments     lightNumber(10);     //Turn off all digits     digitalWrite(digit1, DIGIT_OFF);     digitalWrite(digit2, DIGIT_OFF);     digitalWrite(digit3, DIGIT_OFF);     digitalWrite(digit4, DIGIT_OFF);   }   while( (millis() - beginTime) < 10) ; //Wait for 20ms to pass before we paint the display again } //Given a number, turns on those segments //If number == 10, then turn off number void lightNumber(int numberToDisplay) { #define SEGMENT_ON  LOW #define SEGMENT_OFF HIGH   switch (numberToDisplay){   case 0:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_OFF);     break;   case 1:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   case 2:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_OFF);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_ON);     break;   case 3:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_ON);     break;   case 4:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 5:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 6:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 7:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   case 8:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_ON);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 9:     digitalWrite(segA, SEGMENT_ON);     digitalWrite(segB, SEGMENT_ON);     digitalWrite(segC, SEGMENT_ON);     digitalWrite(segD, SEGMENT_ON);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_ON);     digitalWrite(segG, SEGMENT_ON);     break;   case 10:     digitalWrite(segA, SEGMENT_OFF);     digitalWrite(segB, SEGMENT_OFF);     digitalWrite(segC, SEGMENT_OFF);     digitalWrite(segD, SEGMENT_OFF);     digitalWrite(segE, SEGMENT_OFF);     digitalWrite(segF, SEGMENT_OFF);     digitalWrite(segG, SEGMENT_OFF);     break;   } }

Topic by drkovorkian    |  last reply

How can I generate a formatted HTML file with PHP?

I'm doing a major reconstruction of my website. I want it to be more dynamic and interactive (CMS), something like Instructables. I already started the login-logout cookie system, establish a MySQL database and found a user friendly text editor. I'm planning to buy a ".com" domain if I get the system to work. I'm not trying to compete with ibles or anything, but rather just want to make a site where I can post guides then display it on my homepage. Similar to the GUI of ibles.  My Site: Can you guys help me find a decent PHP code that would generate formatted html files, so that I would be able to post step-by-step guides similar to instructables... Don't worry about the database, and the text editor, I'll just figure it out.  As a sign of gratitude, I would like to gave away a patch or a 3 month Pro-membership to the person who gets the best answer :D  _____________________________________ //I found a code, but sadly I can't get it to work :(  error_reporting(E_ALL); require_once 'KvzHTML.php'; // These are the default options, so might // as well have initialized KvzHTML with an // empty first argument $H = new KvzHTML(array(   'xhtml' => true,   'track_toc' => false,   'link_toc' => true,   'indentation' => 4,   'newlines' => true,   'echo' => false,   'buffer' => false,   'xml' => false,   'tidy' => false, )); echo $H->html(   $H->head(       $H->title('My page')   ) .   $H->body(       $H->h1('Important website') .       $H->p('Welcome to our website.') .       $H->h2('Users') .       $H->p('Here\'s a list of current users:') .       $H->table(           $H->tr($H->th('id') . $H->th('name') . $H->th('age')) .           $H->tr($H->td('#1') . $H->td('Kevin van Zonneveld') . $H->td('26')) .           $H->tr($H->td('#2') . $H->td('Foo Bar') . $H->td('28'))       )   ) ); ?>

Question by ASCAS  

Can I drive a stepper motor with a dual H-bridge? Answered

I was looking at building a small desktop CNC after looking around i found this. Anyway instead of buying a expensive motor controller could I buy a dual H-bridge per stepper? Also if anyone knows a cheeper alternative cnc controller could you please tell me about it in the comments.

Question by David97    |  last reply

h a any one know some things about bullets?

Ok so i have a bullet(no powder) with a spent primer in it and cannot seem to get the primer out,im doing this to get the bullet out although ive done it by hammering a nail into a with no primer i cannot get the primer out its a rifle shell rws.308 and is there a easier way to get the bullet out of the shell,i dont have a kinetic bullet puller and cannot be bothered to buy one for a few shells

Question by sharlston    |  last reply

can anybody tell me how to do this plz

I downloded this program and in the "readme'' folder it says: Install Instructions Upload the files to your server in the exact same structure as you see in the This is important! MAKE SURE FOLDER "TEMP" HAS 777 AS PERMISSION To do this just navigate to that folder with your favorite ftp program, select its properties (often right mouse menu) and set it to 777. If you dont do this the images wont be written and the save button wont work! BUT!!!! if you have MOD_SECURITY enabled dont set your permissions to 777 but keep it at 755 the default value. If you dont do this the final end result wont be saved eventhough a "save file" box is shown! That's all there is to it.

Question by 2hot2hack    |  last reply

what is the best primary pistol ?

For a knex war thats not oddammo

Question by Im_the_knex_god_hail_me    |  last reply

Stepper Motor and an L298 Module? Answered

Hello, I bought those items: L298 Module Kit, PIC16F877A + KIT, a stepper motor my friend found in an old printer (with four wires (2 coils)), and the pic programmer. I am lost trying to find out how to wire this thing. Can someone tell me how to connect the L298 Module with the Pic kit and the basics of how to program it (not code just the concept). I already connected the stepper motor to the coil pins of the module. Thanks

Question by Seifpic    |  last reply

What is the optimal and minimum voltage to charge a 12v 9a,h battery? Answered

What is the optimal and minimum voltage to charge a 12v 9a,h battery?

Question by Electronic guy    |  last reply

Trying to build a square wave generator (high frequency) and H-bridge

Hi, I was wondering if someone could help me out at building a high frequency variable square wave generator. Specs: 100kHz - 1Mhz (better if I can get up to 3Mhz), 5 to 20V, square wave. Right now I have a LM555 timer. I have read online that I can get it to run at maximum 1Mhz. I don't know what I'm doing wrong, but I can't get it to output at higher frequencies. Also, does anyone know of a good H-bridge circuit schematic that could output 24V pk-pk at 3A. I will be using the signal from the square wave generator to feed to the H-bridge, therefore, is there a H-bridge design that can handle high frequencies? Or, is there another driver circuit that I could use instead of a H-bridge that could do the same job or better?

Topic by sonny301    |  last reply

Just read Aeshir's b***h-fest, I can top that

Lightning hit my tree, everything that is wireless and powered in my house got knocked out permanently, this includes: flat panel tv, 2 CRT tv, nintendo wii, wiimotes, every cordless phone, every clock radio, and my cheapo routereverything that was unplugged and without batteries in them was fine, also things that are not wireless are fine, there was no surge or anythingI don't know how badly it affected my neighbors and finally, some pics;=true

Topic by frank26080115    |  last reply

How to use Multiple mcp23017 chips with the adafruit mcp23017.h library?

I have been experimenting with I2C and the mcp23017 IO expander chip for my arduino ATMega2560 as I would rather use the IO on the arduino its self for other things I am just figuring out how to use the adafruit mcp23017.h library and cant figure out how to address multiple mcp23017 chips and how to use there pins individually this is the code from the button library that I editied. Here is the datesheet of mcp23017 I want to be able to address the individual chips and the pins I was not quite sure if in the setup that the pin modes for the IO go up sequentially from 0 past 15 if multiple chips are connected and addressed in code. For example if the first chip is addressed as 0x20 and the IO number count is from 0 - 15 if I added and addressed another chip as 0x21 will that count go from 0 - 15 to 0 - 31. ~ Edit if you could recommend or send a library that would be easier or could help please do. #include #include "Adafruit_MCP23017.h" //pin 1 and 0 are mcp pins not arduino IO pins Adafruit_MCP23017 mcp; void setup() {  mcp.begin();      // use default address 0 mcp.pinMode(0, INPUT); mcp.pinMode(1, OUTPUT); Serial.begin(9600); pinMode(13, OUTPUT);  // use the p13 LED as debugging } void loop() { // The LED will 'echo' the button digitalWrite(13, mcp.digitalRead(0)); //Writes pin 13 to the reading of pin    0 mcp.digitalWrite(1, mcp.digitalRead(0)); //Writes pin 1 to the reading of 0 if(mcp.digitalRead(1) == HIGH){ //if pin 1 == high serialprint led whent   high Serial.println("Led whent HIGH"); } }

Question by DELETED_MakiY2    |  last reply

Would someone please post a published book or a competent reference with H Bridge in it? Answered

Every textbook, reference, and manual I have or can find say bridge network so where does H Bridge come from. I do know that bridge circuits can look like an H the way some people draw the schematic but they are called bridge networks whether they are resistors, diodes, capacitors, transistors, or a mix and look like an H or not. Other than a hand full of dictionaries and the books I have written and anthologies my works are in on top of this books case, all these books and more that I have are on electronics and none of them say H Bridge. So I would like to know where H Bridge comes from and please post the book or competent reference. Joe

Question by Josehf Murchison    |  last reply