Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 14
61  Using Arduino / Motors, Mechanics, and Power / Re: Have I stuffed my stepper driver? on: September 01, 2012, 07:51:40 pm
Quote
there was a bad smell and I shut it down pretty quickly


By the time you smell it, it is too late. Yeah you smoked something. probably the board. You might check it out with a multimeter, sounds like there is some functionality. See if it draws a lot of current when nothing is happening. That would mean you burned a new current path some where. The driver working a low amps and not at higher amps may mean you partially fried something and now you have a high resistance path to output that limits the current and unbalances the steps after a certain load. Either way, the easiest thing is to just get a new board unless you are into removing board components. 
62  Using Arduino / General Electronics / Re: Help with IR Phototransistors on: August 29, 2012, 07:05:40 pm
Is the total dark reading > 35? with this low reading the delta between the pulse high and low may be below the threshold of detection.
63  Using Arduino / General Electronics / Re: Resistor Color Code Finder App on: August 29, 2012, 06:55:10 pm
The only mnemonic I ever learned is unpublishable... anyone have a better one?  smiley-lol
64  Using Arduino / Motors, Mechanics, and Power / Re: Looking for relay that can power pool pump?? on: August 27, 2012, 08:02:12 pm
The pump relay that Jeffmans speced out looks like a solid state. I have had no trouble with high current solid states, but then I run only resistive loads that don't kick back. The trick I use to avoid lots of heat is to use a relay rated at twice the amps. That way I only need a good heat sink and a little ventilation. The cost isn't that much more. The old kiln relays were all duty cycle contacts and they were always needing replacement... but they were switching probably a lot more than most applications.
65  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino LM335 and visual basic 6 on: August 25, 2012, 10:12:51 am
Quote
if the second sensor shows a value less then 10 or more than 100 the strings get confused.
on which end the VB or Arduino?  

Quote
i beleive it is the threshold for mscomm1

The com port only sees characters coming through.You need to use the string functions to find the start and end of the value you are looking for. Then if it is a 10 or a 1000 will make no difference.

so if your input string is a10b or a1000b it makes no difference to the code below

Code:
strt = InStr(str, "a") +1  ' one char past the a
  fin = InStr(str, "b")
  If (fin - strt) <= 0 Then
   Exit Function
  Else
   SensorVal =  Mid(str, strt, (fin - strt))
66  Using Arduino / Sensors / Re: Best way to tell if a lid is open. on: August 24, 2012, 06:52:37 pm
I've used a simple contact micro switch. with the pin as input, make sure you add a 10K pull down to ground and make the logic to trigger on the switch going HIGH. That means having a switch that you can wire as normally open. works fine and uses a little  less current.
67  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino LM335 and visual basic 6 on: August 24, 2012, 11:25:23 am
Yes you can send a long string over from the Arduino like  @a13.98b200c0.079d346e122.7 and use the VB string functions to select out each sensor value. You might write a function to simplify this

function GetSensorVal(BeginingLetTer,EndingLetter)  returns float or whatever

then to get the first value you could just call Val1 = GetSensorVal("c","d") and it would give you 0.079

You really don't need the @. I just used it as the start of the string since I am looking at only one temperature value and it made a good character to use when I was trying to identify the correct com port.
68  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino LM335 and visual basic 6 on: August 23, 2012, 09:32:27 pm
you are pretty much there fenderrobban as far as I/O from the Arduino to the VB app.  You need to learn to use some of the string functions in VB. Look at my previous post with instr and mid and figure out what I am doing to pull the info out of the total string coming over from the Arduino.

The last Arduino code you sent had pretty much all commented out. you need a Serial.println() to terminate the string. look at what is coming out the Arduino side and compare it with what you have coded it to expect on the VB side

You can use VB to display the results in the form as a text box or label, or even drop them into a list box. You just need to take one step at a time and build your code on that.

I used the debug.print just because it was the easiest way to see if you were getting anything over the line.  Now you can use any of the widgets or functions in VB to manipulate it and get the output you want

Charting the output will require you to really know what you are doing in VB. Don't even think of it till you have a much better understanding of how to manipulate string and numeric values in VB. The chart widgets included in VB are not that good, and they are kind of hard to learn, unless you have a pretty good feel for what you are coding.



69  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino LM335 and visual basic 6 on: August 23, 2012, 11:28:18 am
Try this... start a new project in the VB IDE. Create a form and put a VB com control component on it. open the code window and paste the following code into it. be sure and change the com port to the one the Arduino is using. Make sure you have the Arduino IDE closed or the VB app will not connect.

open the immediate window in the VB IDE

This is the simplest possible case. If should work if you are sending a string with a @ in it .


Code:
Private Sub Form_Load()
With MSComm1
        If .PortOpen Then .PortOpen = False
        ' change this to the com port shown by the arduino
        .CommPort = 3
        .Settings = "9600,N,8,1"
        .DTREnable = True
        .RTSEnable = True
        .RThreshold = 4
        .SThreshold = 3
        .PortOpen = True
  End With

End Sub

Private Sub MSComm1_OnComm()
Dim strData As String
Static strBuffer As String
Dim strWords() As String
Dim intPos As Integer
Dim boComplete As Boolean
Dim mystr As String


 

        mystr = "" ' set the string to nothing
        mystr = MSComm1.Input
     
 
            intPos = InStr(mystr, "@")
            If intPos > 0 Then
            Debug.Print mystr
           End If
             
End Sub


70  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino LM335 and visual basic 6 on: August 22, 2012, 07:44:38 pm
Quote
Re: Arduino LM335 and visual basic 6

Yes it is written for VB6... isn't that what you are using?
71  Community / Bar Sport / Re: Not TRYING to start a flame war honest. on: August 21, 2012, 10:29:12 am
Quote
Re: Not TRYING to start a flame war honest.

How we doing so far?
72  Using Arduino / Sensors / Re: voltage divider with max31855 vs level shifter on: August 20, 2012, 05:23:12 pm
Thanks CrossRoads. I am sampling with a 20 ms delay . I have not trapped any anomalous reading in a five hour run so this will probably be OK.
73  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino LM335 and visual basic 6 on: August 20, 2012, 03:57:32 pm
the Arduino code is ok. I ran it and it showed the correct values in my VB program, so it's coming across the USB ok
Here is the code I use to find the correct com port. It cycles through until it finds a com port sending out the correct string
you will have to declare some of the variables to get it running, but it
stick some debug.print statements in the code and step through it. You should be getting values comming over if the baud rate is set correctly
also, you need to put the VB side read insome kind of loop also so it will keep reading the input

Code:
For n = 1 To 16 ' com ports
  ' close any open ports
  If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
   On Error Resume Next
   MSComm1.CommPort = n
   On Error Resume Next
   MSComm1.InputLen = 0
   MSComm1.PortOpen = True
   If MSComm1.CommID > 0 Then
     For i = 1 To 100 ' keep looking
      str = ""
      str = MSComm1.Input
      ' finds the port sending out the correct string.
      If InStr(str, "Tmp") > 0 And InStr(str, "@") > 0 Then GoTo jump:
      Sleep 50
     Next i
  End If
Next n
jump:

74  Using Arduino / Interfacing w/ Software on the Computer / Re: Arduino LM335 and visual basic 6 on: August 20, 2012, 02:12:26 pm
This works for me. You should be able to modify it to get what you want.
Code:
Function TempNow() As Single
Dim str As String
Dim strt, fin, ct As Integer
Dim tempstr As String
Dim u As Single
Dim i, B  As Integer
u = 0
str = ""
For i = 1 To 5
Sleep 10
 str = MSComm1.Input
' I use "Tmp and "@" instead of "<" and ">"
 If InStr(str, "Tmp") > 0 And InStr(str, "@") > 0 Then
   GoTo J1
 End If
Next i

J1:
ct = 0
u = 0
 
  strt = InStr(str, "@-") + 2
  fin = InStr(str, "-Tmp")
  If (fin - strt) <= 0 Then
   Exit Function
  Else
   ct = ct + 1
   u = u + Mid(str, strt, (fin - strt))
 End If
 TempNow = u / ct
 If Option1.Value = True Then
    TempNow = TempNow * (9 / 5) + 32
 End If
End Function
75  Using Arduino / Sensors / voltage divider with max31855 vs level shifter on: August 20, 2012, 01:47:47 pm
In many of the articles on how to interface the max31855 chip with the Arduino, it recommends using a level shifter to get the right voltage.
I created a voltage divider with series 10K and 22K resistors between the Arduino input pins and ground and pulled the signal off at the junction.

This seems to work just fine so far. Am I missing something here? Why use an expensive IC if two 1/8 watt resistors seem to work just as well?
Pages: 1 ... 3 4 [5] 6 7 ... 14