V Drive 2 for data logger

An area to discuss 8-bit PIC specific problems and examples

Moderator: Benj

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

V Drive 2 for data logger

Post by Steve001 »

Afternoon all

Just reading up on the V Drive do you have to install some sort of software with a terminal to program them or have i got this mixed up with another product ?

Is there a maximum size for the usb stick ? have read on here that some people have had problems

has anybody used this on spi or uart ?

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Hi Steve,
I can help you with that as I have currently got 2 Vdrives logging and they are working really well!
Steve001 wrote:Just reading up on the V Drive do you have to install some sort of software with a terminal to program them
It does not quite work like that.
The ROM of Vdrive in my opinion requires flashing as the defaults are a bit on the rubbish side.
For example instead of ASCII mode the defaults are set for binary mode.
I have attached two files required within a zip file.
The the VncFwMod.exe loads the file used for re-flashing ROM
Select Browse, change Files of type to Vinculum then load and modify the FTRFB.FTD file.
IMPORTANT!
For Vdrive to work with the minimum amount of connections, the connections must be as:
Vdrive2 wiring no hand shaking.png
(89.64 KiB) Downloaded 20301 times
Load the FTRFB.FTD file, select next a couple of times then it will allow you to modify Vdrive settings.
After selecting Baud rate ect make sure IPA and Extended command set mode are selected.
The File name must be FTRFB.FTD
Any other names will not work since the FTRFB.FTD has to be copied on to a flash drive then when flash drive is inserted, Vdrive will only recognize FTRFB.FTD for the ROM to be modified.
When Vdrive has successfully been modified (If remember correctly LED flashes) then FTRFB.FTD has to be deleted from flash drive.
Steve001 wrote:Is there a maximum size for the usb stick ? have read on here that some people have had problems
I have used Kingston 1 gig to 8 gig which works ok.
Probably the best way is to add any files to root of USB flash drive for testing purposes e.g some small text or pic files.
Re-flash Vdrive2 in extended mode, connect to a RS232 terminal program (set for same settings as Vdrive ), then use DIR command to read USB drive.
If the names of files appear, then good to go.
Steve001 wrote:has anybody used this on spi or uart ?
I use UART with Vdrive as it works really well.
Never used SPI.
The only issue I have found due to some type of issue is when updating flash drive with multiple files (For testing I was sending loads data every second and getting files to auto rename), only first 2046 files successfully saved the loads of files was skipped.
I emailed support team leader at http://www.ftdichip.com and made him fully aware of this.
The reply was
Suggestions would be to put fewer than 1022 files in a directory then make a new directory (maybe at 512 files make the new directory). Might even make them 2 layers deep, so you’d have

top level dirs: 1 to 512
second level dirs.: 512 directory of 1 to 512
third level files: 1 to 512 * 512 * 512 – is 671088640 seconds ~ 21 years worth of data at 5 second sampling, or 16087 years at 15 minute sampling.
Hope this helps

Martin
Attachments
Reflash ROM.zip
(170.62 KiB) Downloaded 576 times
Martin

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Format to used to send data to Vdrive (extended mode ) is to send :
Char(13)
"OPW FileName.txt"
Char(13)
"WRF TotalChars"
Char(13)
Data ......... then send spaces to make sure more that total data is sent.
Char(13)
"CLF FileName"

For example I want to send 20 ASCII characters to a file called Data1.text:
"OPW Data1.text"
Char(13)

"1,2,3,4,5,6,7,8,9,10"
Loop (20)
" " // 20 spaces sent
Char(13)
"CLF Data1" /closes file so can be viewed
Char(13)
Note you will need to send more data (extra spaces) than the specified since if you send less then file will not be created.

Martin
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Thanks for that martin, do you not need handshake then ?
Looking at a data logger with two analogue inputs to start with measuring every second is there a max sample rate before things start to get unreliable ?

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Hi Steve,
Steve001 wrote:Thanks for that martin,
you're welcome.
Steve001 wrote:do you not need handshake then ?
I never have and was sending about 50 chars in bursts of a second.
So should handle with what you intend on sending.
I use 2400 baud to ensure reliability.


Martin
Martin

EtsDriver
Posts: 444
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 345 times
Been thanked: 227 times
Contact:

Re: V Drive 2 for data logger

Post by EtsDriver »

Just as sidenote, can this VDrive2 device be used to connect to PCL supporting printer to get printouts (Sent to HP laserprinter) of data? I was scrolling down the datasheet and saw something about that "can connect to USB slave Peripherials" ? I have used this one before, but anything that can make your work cheaper is always on scope! :)
Ill just keep the good work up!

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Here is a link to the Vdrive2 firmware manual showing all the commands.
Since the file used for data logging can be opened and read, would have thought it could send ASCII directly to a printer.
But since the microcontroller creates a file on the flash drive then sends ASCII data (depending on the mode used) then I would of thought it would be better to send ASCII directly to both Vdrive for data storage and printer for print out.
If storage is not required then just bypass Vdrive and send directly to printer.

Martin
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Having a bit of trouble flashing my v drive :(

When powered up i get a pattern of 4 (I think) red / green flashes what does this mean I cannot find it mentioned any where ?
The usb stick has no other files on it just the update file - my usb has a green led on it this flashes when read / write it just stays steady green
I have tried turning of flash leds on power up but this didn't work

Attached is the file I am trying to write to the drive and how I have it wired

White wire +5 V - connected to Red
Black wires 0V - connected to Black & Green

Steve
Attachments
Vdrive conections.JPG
(80.33 KiB) Downloaded 4899 times
FILE TO WRITE.zip
(25.23 KiB) Downloaded 536 times
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Hi Steve,
Steve001 wrote:When powered up i get a pattern of 4 (I think) red / green flashes what does this mean I cannot find it mentioned any where ?
That sounds like it's waiting for handshaking which is not required if green is connected to 0V ok.
Can you check continuity between green lead and 0V of psu as there could be a poor connection?
I can't confirm this is the case until I can get access to my Vdrive on Tuesday when next in work,
But I'm confident form memory that's the reason.

If Green lead is connected to 0V then the LED should be solid green, indicating 'ready to receive data'.

Also there is something wrong with FTRFB.FTD you have posted,
The idea is to reflash the Vdrive but the file has to be correct.
When I loaded my file up with VncFwMod.exe this Is what I got:
My Vdrive settings.png
(27.64 KiB) Downloaded 20155 times
When I loaded your file I got:
Steve Vdrive settings1.png
(24.32 KiB) Downloaded 20155 times
So If you have got the green wire connected ok you could have a Vdrive issue after flashing with corrupted/wrong data

Martin
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Hi Martin

Two things

don't know if it was my heavy handed ness or the crimp not in the housing correctly. The crimp came out of the back whilst I was checking connections,
Have managed to flash now but as you have pointed out above there may be something wrong with the config file I have just posted

that file is the one that comes with file zip file I haven't changed it only tick the box for led flash

I have managed to flash the vdrive with the above file (did all this before checking back on here ) the leds don't flash on power up is there a way to reflash the vdrive as it appears not to be working now

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

What I would suggest is try the attached file.
Rename extension to .FTD
I have downloaded zip file to check and files within are ok.

Data lead can bought to reflash Vdrive as well.
Attachments
FTRFB.txt
(64.5 KiB) Downloaded 490 times
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Hi Martin

Thank you for the file, unfortunately it did not work
have noticed now if I disconnect the green wire the leds don't flash either.
Is this due to the incorrect firmware as the original one flashed the led ?

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Sounds like it.
There is a RS232 to UART comms lead for re-flashing Vdrive:
Farnall link
Or RS Link
Data cable may or may not work
Odd how file is corrupt as sent file to a forum user who used it to successfully program their Vdrive2.

If you decide to get another Vdrive, then I can check file for you before using it to reflash vdrive.
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Hi Martin,

Thanks for that I have emailed FTDI and asked for advise see what, if any they come back with

Steve
Success always occurs in private and failure in full view.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Just a question ..

after doing the following instruction

Loop (20)
" " // 20 spaces sent
"CLF Data1" /closes file so can be viewed

can you remove the flash drive after this or do you have to unmount it in some way ?

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

You can remove and plug back in flash drive as soon as clf command has been accessed.
If removed before all chars has been wrote or clf command then you will not be able to see the file on the flash drive.
There is no unmount command required.
when you plug the flash drive back in, if the file has been kept then any new data will be added to it.
With reference to commands I have attached the datasheet (summary pages 26 & 27) with them on.
Also the reason for the 20 loops of spaces, is because after "WRF 63" for example then Vdrive is going to wait for at 63 chars to be sent at the very minimum
So after sending 60 chars, if you send the value of a variable to Vdrive and its value is less than 100 and then "CLF Filename.extension" is sent then since only 62 chars was sent then the Filename.extension file that should be created/updated will disappear.
You can always send more chars than required, then use "CLF Filename.extension".
Hence reason for sending spaces.
It makes sure the 63 or what ever number you use is always exceed.
It would be nice so you dont need to specify an amount then use "CLF Filename.extension" and will always generate file, but unfortunately Vdrive does not work that way.
In saying that Vdrive2 has been very reliable for me in data logging applications.

Main difference between Vdrive 2 and Vdrive3.
Although with Vdrive3 is newer and you can modify the source code, there is an issue with LED.
With Vdrive2 the LED flashes when it should be in data sending mode.
So as soon as "WRF NumberOfChars" is sent, led goes from solid to flashing so you know at that point next lot of data will be saved to flash drive, so you don't remove it..
It acts as a warning which is useful.
Unless since last tested Vdrive rom has been updated,the LED flashes all the time there is data being seen on the RX line, even if no correct commands are received so data is not being sent to flash drive.
So you don't know if its OK to remove Flash drive or not?

When the sales sheet states that Vdrive3 is a direct drop-in replacement for Vdrive2, I don't think that's totally correct.
Mini rant over.
Attachments
UM_VinculumFirmware_V205.pdf
(1.23 MiB) Downloaded 442 times
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Noticed today that cool components sell a "OEM" programming lead

https://www.coolcomponents.co.uk/usb-to ... cable.html

Little bit cheaper than RS and Farnell

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

What about
medelec35 wrote: "WRF TotalChars"
Char(13)
I have enabled the console and can't see it there:
Vdrive Console.1.png
(23.66 KiB) Downloaded 14163 times
Steve001 wrote:Just a question ..

after doing the following instruction

Loop (20)
" " // 20 spaces sent
"CLF Data1" /closes file so can be viewed

can you remove the flash drive after this or do you have to unmount it in some way ?

Steve
Yes Files should can be viewed ,but only if number of chars equal to or exceed the number stated directly after

Code: Select all

WRF
So if you have

Code: Select all

WRF 60
, but only 50 chars written to Vdrive then after CLF you would not be abler to view file as it won't have been created fully.

Martin
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

cheers martin i will have another go and get back to you

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Hi Steve.
I have created the most basic Vdrive flowchart that generates a file with just rows of 1 to 10.
It can be made more sophisticated.
E.g I have Used a RTC to send a time stamp so not only was the sample time and voltage of ADC shown within a text file, but the time and date stamp also set the file date and time rather than the default 19/12/2004 23:00
You can also get the File generated to have a name then a number that's automatically incremented.

The data on the generated file should look like this:

Code: Select all

1,2,3,4,5,6,7,8,9,10,       
1,2,3,4,5,6,7,8,9,10,       
1,2,3,4,5,6,7,8,9,10,       
1,2,3,4,5,6,7,8,9,10,       
1,2,3,4,5,6,7,8,9,10,       
1,2,3,4,5,6,7,8,9,10,       
1,2,3,4,5,6,7,8,9,10,       
1,2,3,4,5,6,7,8,9,10,       
1,2,3,4,5,6,7,8,9,10,       
1,2,3,4,5,6,7,8,9,10,       
1,2,3,4,5,6,7,8,9,10,       
1,2,3,4,5,6,7,8,9,10,       
1,2,3,4,5,6,7,8,9,10,       
1,2,3,4,5,6,7,8,9,10,
etc.
Of course you need to change flowchart for your set-up.
Flowchart was created with FC7, but should work with FC6.

Martin
Attachments
Basic Vdrive test1.fcfx
(12.8 KiB) Downloaded 292 times
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

cheers martin

I will have a go with this tonight

Steve
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

You're welcome Steve.
To wet your appetite even more.
The attached flowchart uses a timer interrupt and MOD function with variables to send the number of seconds elapsed along with the voltage of an ADC channel:

Code: Select all

10 Voltage: 4.995361        
20 Voltage: 4.995361        
30 Voltage: 4.980712        
40 Voltage: 4.995361        
50 Voltage: 4.995361        
60 Voltage: 4.995361        
70 Voltage: 4.995361        
80 Voltage: 4.995361        
90 Voltage: 4.995361        
100 Voltage: 4.995361       
110 Voltage: 4.980712       
120 Voltage: 4.995361       
130 Voltage: 4.995361       
140 Voltage: 4.961181       
150 Voltage: 4.995361       
160 Voltage: 4.995361       
170 Voltage: 4.995361 
Attachments
Basic Vdrive Test2.fcfx
(17.5 KiB) Downloaded 285 times
Martin

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Yep you wet my appetite now :D

Once again thank you

Steve
Success always occurs in private and failure in full view.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: V Drive 2 for data logger

Post by Steve001 »

Evening all

using test program 1 above, on an ECIO40P
Changed device and removed oscon command

connected as follows

black - 0 volts
red - +5 volts
green - 0 volts
orange - C6

when power first applied the "Traffic indicator LED " flashes red / green a few times

then flashes green a few times along with the led on my usb stick. I waited for a few seconds turned off the power put the usb stick into my pcb - nothing empty

tried again but removed usb stick without turning off power - nothing empty

tried another usb stick in case that one faulty

when power first applied the "Traffic indicator LED " flashes red / green a few times

then stays red

any ideas

Steve
Attachments
Basic Vdrive test1 - ecio40p.fcfx
(12.59 KiB) Downloaded 272 times
Success always occurs in private and failure in full view.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: V Drive 2 for data logger

Post by medelec35 »

Hi Steve,
I will replicate your set up tomorrow, and let you know my findings.

Martin
Martin

Post Reply