K8055 and reading an rpm signal?

i want to write some software to read the pulses from a magnetic sensor

will the K8055 allow me to read directly from the sensor ? or will i have to convert it to an analogue voltage first ?

what is the speed at which the usb interface reads from the device ?

is there something else i should consider to be able to read an rpm using visual basic ?

If the pulse rate is low enough you may use the internal pulse counter of the K8055.

what is the maximum rate the pulse counter can go to ?

does the k8055 have a 20 ms delay on requesting data ?

[quote]what is the maximum rate the pulse counter can go to ?[/quote]Max frequency is about 2kHz if the duty cycle is 50%.

[quote]does the k8055 have a 20 ms delay on requesting data ?[/quote]According to my test it seems to be about 8ms. (Anyhow specified 20ms max.)

excellent

thank you for your assitance

i’m off to buy one now !

i went and bought one

connected the magnetic sensor to i1

however the switch is permanently triggered in the demo software

also the version of the demo is different to the version in ther manual - it has no counter

how do i get the device to recognise the output from the mag sensor

Hi,

You can download the software from the link below, it has the counters
http://www.vellemanusa.com/downloads/files/downloads/k8055_graphical_demo.zip

I hope this helps.

[quote]however the switch is permanently triggered in the demo software[/quote]This seems to indicate the input is all the time low when the mag sensor is connected there.

[quote]how do i get the device to recognise the output from the mag sensor [/quote]How high is the voltage swing at the output of the mag sensor? Should be about 3V to drive the digital input.
Please note that there are pull-up resistors at the digital inputs of the K8055.

[quote]also the version of the demo is different to the version in ther manual - it has no counter[/quote]In the programs on the CD there should be the counter.
Look into the CD folder: \K8055_VM110 USB board

Here a link to the page where you can download other examples, updated documentation and the latest DLL:
velleman.eu/distributor/supp … 8055&type=

In this package there are the examples and the DLL documentation:
Software DLL Rev 2
older DLL with examples and source code (source can also be used with DLL rev 3)

In this package there is the latest DLL:
Software DLL (Rev 3.0.2)
supports Windows Vista, VC++ version and executable examples

i have found a sensor that has a digital output

can i use the k8055 to power the sensor (operates from 4.5 to 24 V ?)

(the output of the k8055 is 4.6 v but drops to 1.8 when i use it to power the tach sensor)

There are 1K5 series resistors as short circuit protection at the analog voltage outputs.
The analog voltage outputs are too “weak” to power the sensor.

Do you know the current consumption of the sensor?
If the current is only less than 50mA you may power it from the USB +5V supply of your PC.
You’ll find this +5V from the “upper” pin of the headers SK2 and SK3.

Thanks for the advice - that worked perfectly !

time to start writing some software

thankyou for the excellent support :stuck_out_tongue:

i have been thinking about the pwm outputs that i now have

are they able to deliver much power ?

what is the max voltage and current they can supply ?

The PWM outputs are open collector (NPN) outputs.
max current 100mA
max voltage 40V

can i use them just like a switch ie to switch a 12v injector on and off

can they be used like a relay to switch a larger power circuit ?

Here a circuit diagram how to connect the relay and other devices to the digital outputs of the card:

In similar way you can use the PWM outputs of the card.

Thanks again for the reply

i am now having problems getting vb to talk to the card

for example if i try to connect to the card with this code


    Dim CardAddress As Long
    Dim h As Long

    CardAddress = 0
    CardAddress = 3 - (Check1.CheckState + Check2.CheckState * 2)
    h = OpenDevice(CardAddress)
    Select Case h
        Case 0, 1, 2, 3
            Label1.Text = "Card " + Str(h) + " connected"
        Case -1
            Label1.Text = "Card " + Str(CardAddress) + " not found"
    End Select

‘h’ ends up returning a very large number

however if i run the vellemandemo101 program it appears to be working

regards

It seems that you are using Visual Basic .NET (maybe 2008).
You have to change every “As Long” to “As Integer” in the whole source.

[quote]‘h’ ends up returning a very large number[/quote]Indeed, the “Long” is a 64 bit integer in VB .NET

Here you can download an example project written in Visual Basic 2008 Express: box.net/shared/euf9bd2rc4

Thanks again for the excellent support :smiley:

Regards

please can you explain how i can program the duty cycle of the analogue outputs

for example switch on an led and make it flash

regards

You can do this using a timer in your program.

  1. When timer event occurs, turn the analog output on.
  2. Change the timer interval. Restart timer.
  3. When timer event occurs again, turn the analog output off.
  4. Change the timer interval to the original value. Restart timer. - Go to step 1.
    etc…