NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Basic Electronics » Very fundamental problem of operating with out a ground??

March 31, 2012
by Ralphxyz
Ralphxyz's Avatar

Before you ask what the heck I am talking about have a look at these:

Notice anything strange about the ground wire??

Well in case you do not see it the ground wire from my power supply is pulled from the breadboard but the circuit still works.

Someone please explain this to me.

Thanks,

Ralph

March 31, 2012
by kle8309
kle8309's Avatar

Ralph,

Do you know if the powered-breadboard you got is internally grounded?

I'm guessing if the box is grounded and some of the wires are somehow shorted....???

I have shorted my circuit with the powered-breadboard in the past.

Kelvin

April 01, 2012
by Ralphxyz
Ralphxyz's Avatar

Damm, it was the USB ground!

I would think that they would be two isolated circuits but removing the USB cable broke the circuit.

The USB Red wire (power +) was not plugged in so it was not supplying power but the ground (black -) was completing the circuit?

Very strange, possible this is part of the reason I have blown so many mcus (12 at least) and a couple of LCDs.

The computer (mini Mac) and the power supply are on the same 110v circuit but how the USB ground functions as the circuit ground is beyond me.

I would assume everyone would be able to see thing happening on their circuit by removing the power ground with the USB ground plugged into the breadboard.

Well at least now I know. Guess I need to find a three pole double throw switch or finally do Noter's isolation circuit and this one.

Even with the isolation of the yellow and green wire I think I will still need a switch on the USB ground.

Ralph

April 01, 2012
by sask55
sask55's Avatar

Ralph

I have also blown several (3or 4) mcus in the past. In my case I am certain that most of them where damaged by static electric discharge originating from my fingers. Typically in the winter months static build up is very common in this very dry climate. If I touch circuit board (or anything else) after walking or rolling in an office chair across the carpeted floor I will often get a considerable snap of static electric discharge from my fingers. Occasionally I have neglected to ground myself before reaching for something on a circuit board and heard and felt that alarming static discharge as I touch some sensitive component on the board. I know for a fact that this simple oversight has cost me a number of components over the years.

I have the circuit board that I am currently using as a prototype for my CNC mill project completely eclectically isolated from the USB cable. It is working well for me with no common ground, power or signal connections between the circuit board and the computer. Although I suppose a high voltage static discharge above 7500 volts could still jump the protection provided by the H11L1VM-ND optocouplers. By using two optocouplers to isolate the USB there is no possibility of any low voltage problems like you and Noter have described and no need for any isolation switches that require switching to provide any protection.

Darryl

April 01, 2012
by Ralphxyz
Ralphxyz's Avatar

sask55, how is your USB isolation wired? You could goto Circuit Labs and quickly draw a schematic hint hint.

My double pole switch isolates the yellow and green wires but not the ground how do your optocouplers isolate both of them plus ground? Or are you just doing yellow and ground?

I sure want to know more and to see more of your CNC mill project I so want to do CNC milling (on the cheap).

Ralph

April 01, 2012
by sask55
sask55's Avatar

Ralph

I am using two optocoupler to completely isolate all the four electrical contacts (all four wires) between the Nerdkit board and the computer USB cable. I did post a schematic (done on eagle) a while back. I will post it hear again.

scymatic

My CNC milling project is progressing slowly as I have a number of other things on the go. Spring appears to be coming early this year. I will not likely get the time get it working on the mill until this fall. I have a number of issues that I am trying to work around. My mill control circuit board is very involved and large. It consists of four micos (a master and three slaves), three stepper motor control chips, the optocoupler isolation circuits, the circuit involved with power supply and signal conditioning for the four digital clippers and a number of supporting components. I am considering splitting the circuit into four separate printed circuit boards, one for the master control micro and one for each of the three axis of movement. In any even with three stepper motors, four digital callipers, six limit indication switches, the power supply, the USB connections, and the LCD connections there is a lot of external connections to the PC board. I have the schematic done on Eagle, but cannot do a layout for a PC board because it is far too large to fit on the very limited size available on the inexpensive version of eagle that I have.

As far as the CNC project is concerned I have my prototype board completed to the stage where I am reading the four digital callipers into the excel sheet. I can control the state of the individual input pins on the motor controller chips from the PC, as well as read the state of the individual output pins of the motor controller chips. I am running into some timing limitations using VBA and a excel sheet. It has works very well for most projects that I have done before. Reading the four digital callipers on my milling machine works well and the Excel based output is very powerful and I was able to display a lot of extensive and useful information in a timely manner. However, with my current design the PC is required to make very frequent changes to the clock input pins on the motor controller chips in order to mover the motor at a reasonable rate. I am having considerable trouble doing the processing and interpretation of incoming data and making appropriate output responses in a timely manner. I think there is just too much overhead with the VBA. I am considering doing some experiments using Python. I don’t know if there would be a speed advantage Python over VBA as it is also an interpreter language. I am also considering using PWM generated at the slave mcus to toggle the motor controller clock pins, but I am very uncertain how I could achieve the very fine level of control down to the individual pulse that I require.

It will next winter before I will get a chance to tackle some of these issues.

April 01, 2012
by Ralphxyz
Ralphxyz's Avatar

Wow sask55, that is great. Why is your image so fuzzy?

I can make it out only because I know what you are doing but some of the specifics I can not discern like R2 what is the value?

Also what is the opto-isolator you are using?

You might need to go to C# instead of VBA I would not be surprised if Python was faster than VBA I suppose one could do some simple big loops and see how long each one took to loop 20 million times to get some idea.

Ralph

April 01, 2012
by sask55
sask55's Avatar

I have done another image export from eagle with a higher resolution. I have also saved it on the image server in its original size. I think this should be more readable. I am using H11L1VM-ND optocouplers as they are fast enough to keep up with the serial data communication flow. They are Schmitt trigger type, in my very limited understanding are ideal for digital logic type of signals. They are working very well for me. I used a 7414 hex inverter chip because the optocoupler inverts the signals.

scematic 2 With regards to my CNC project

I was thinking of trying to do the coding on the PC in #C. I am very slow at C code, after years of tinkering around with a lot of VBA applications I seam to have trouble making the switch to C. At this point I would not even know how to make a PC executable C program let alone pull off all the serial input and output required and set up the kind of GUI that I would like. I was hoping for some option that was more object orientated then C seams to be, and still have as little overhead as possible. I am not in a hurry I should eventually come up with some solution that I can handle. I am hoping to eventually have the PC program read the Cam files generated by CAD and PC board software and direct the mill to do CNC type work, while at the same time verifying the moments of the mill table and spinal with the digital calliper readings. There will be a lot going on at the PC level, all in real time. I pretty much have the motor control and other mirco controller portions of the hardware and software working now, It’s the PC programming and how to get this thing onto a Printed Circuit board that are my current goals.

April 02, 2012
by Ralphxyz
Ralphxyz's Avatar

Thanks now that is readable. Isn't there open source CNC stuff for the PC?

I'd rather modify or enhance than start from scratch.

Ralph

April 02, 2012
by 6ofhalfdozen
6ofhalfdozen's Avatar

What about doing your computer side controls in VB.net instead of VBA or #C?? If you are decent at VBA, it shouldn't be too hard to do in VB.net. You can get the VB.net Express from microsoft for free, and that will be able to handle almost everything you could want to do on the PC side. Excel tends to be a pig of resources and such, so if you run in VB.net without Excel running you would be able to cut your processing times and have faster access to the serial ports.. Even if you made some quick programs in VB.net to get yourself going and then transition to C# or python when you are ready... just a thought..

April 02, 2012
by sask55
sask55's Avatar

Ralph
I kind of went from one extreme to the other with the image size, a little smaller would have been better.

I suspect that there is open source CNC control software available. I probably should have looked into that option before designing and building my micro based stepper motor control board. At this point I believe it would require me to start over and adapt my communication protocol to match what was required by the software. I have made absolutely no effort to design to match any a stranded or common set of serial data and instructions set between the master and the PC. Secondly; the information arriving at the PC that originated at the Digital callipers, as well as the control commands to reset the callipers would be totally unique to my set up. The amount of modification that would be involved by using pre-existing software would be very large. I have taken a look at the data files generated by the Cam processor in eagle. The file structures are quit readable and should be relatively simple to work with. The drill data file (extension .drd) in particular should be relatively straight forward to implement. Even the soldering mask files appear to be doable although not quite as simple in some respects. To put it another way I think it may be easier to adapt code that is communicating with my hardware to read Gerber data then the adapt code that is reading Gerber data to communicate with my hardware. I could be wrong.

6ofhalfdozen That is an interesting idea. I will be looking into Vb.net when I get some time to look at this again.

Thanks for the ideas. I have a lot to think about with less and less time to commit to it as spring arrives. Darryl

Post a Reply

Please log in to post a reply.

Did you know that NerdKits make a great gift? Learn more...