Diode causes error when simulating circuit with AutoDesk Open Electronics Lab

Hey,

I'm pretty new to electronics and am trying to get a motor to be controlled using an arduino board with a transistor acting as the switch. I modeled the proposed circuit in 123D circuits open electronics lab, but for some reason, it says it cannot run. I believe it has something to do with the diode, since it seems to work without it (although the power source displays 0 amps even though the motor animation runs). If anybody more knowledgeable than me on this subject knows whats going on, I'd appreciate the advice!

A picture of the circuit is attached.

Is this what you have? It's hard to tell from that fritzing pic.

Essentially, yes. Except that the diode is placed in series with the motor, not parallel. Also, I have the diode allowing current to run through the motor, but not back the other way.

So why are you asking about a simulation of a configuration that doesn't match the one you're working with? I'm confused.

The only circuit I'm working with is the one from my picture that I attached to my first post. The circuit that CrossRoads supplied is close to my circuit, but the difference is that my diode is in series with the motor. I've attached a drawing to show my circuit in the same format as CrossRoad's drawing.

Does the diode have to be in parallel? Why wouldn't the generated current just bypass the diode and go into the arduino unit (the motor's power supply) in that configuration?

Then fix your wiring to be as I show it. The diode is there to dissipate motor generated current when the transistor turns off.

Diode in series just robs voltage available to drive the motor. You want it in parallel and reverse biased to dissipate motor generated current when the transistor turns off (an effect of the magnetic field in the motor (created by current flow thru the motor) collapsing in the presence of a coil (the motor) is to create a current in the same direction - the diode lets it dissipate in the motor).

Okay, I tried it and the simulation works. I'll have to think about it some more to really wrap my head around how it keeps the current from reaching back into the power source though.

Meanwhile, once I get the equipment I need I'll set it up in the real world and see how it goes.

Thanks for the help!

With an inductive load like a motor you have to provide a path for current when the
transistor switches off, otherwise the energy stored in the magnetic circuit will blast
through your circuit at whatever voltage it takes to force the current through it - normally
this destroys things.

A diode across the motor will safely steer the current round a loop at switch off till the magnetic
energy/field fully collapses. Think of the pressure surge you get when shutting off a water tap
rapidly - same idea - the diode is a safety valve basically.