Subject: Atmel and ZBasic Rotary engine Compression tester is working.
From: Rotary Engine
Date: 5/16/2010, 8:21 PM
To: AAA Put this in the To box


   I suggest if you are interested in this system you make
   a folder and drag over all the many future messages on this
   subject otherwise delete it.


 ------------------------------------------------------

 I am just getting mine talking to my XP computer.

 If you plan to use the USB rather than the RS232 port for communicating
 you must do this.

 You will need to download USB drivers from the FTDI site and install
 them manually.  The FT232R drivers are available directly from FTDI at
 http://www.ftdichip.com/Drivers/VCP.htm.  Note that the CDM driver
 (whatever
 that is) is not  available for all operating systems.  Be sure to download
 the drivers for the FT232R device that match your OS.

 snips...............

 Paul Lamar


 ------------------------------------------------------------------------------
 "The jumpers and switches are set at the factory assuming
 that the Dev Board will be powered via the on-board
 regulator and that a standard serial port will be used for
 communication with the ZX-1280N. If this is how you
 intend to operate it, simply connect an external supply to
 J27, connect your serial cable to J25 and activate the
 power switch. You should then see the output from the
 default ?Hello, world? program, confirming that the ZX-
 1280N is operating correctly and ready to accept your
 program."

 "If you intend to use the USB interface, several additional
 steps will be required. Firstly, change the switch SW3
 to the ?USB? position. If you also intend to power the Dev
 Board from your USB hub, move jumper J19 to the
 ?USB? position as well. Otherwise, connect an external
 power supply to J27. Connect a standard USB A-B
 cable between J28 of the Dev Board and your USB hub. When
 the power switch is activated, you should see
 several flashes on the Red/Green LED (D4, near the J28
 connector). "


 I got it working with the USB and an external power supply.
 There is a blinking LED near the USB connector on the board when
 it is communicating with the PC. This is what the screen
 in the Windows XP computer looks like.

 The next test will be the rotary engine compression tester
 program. If you have the board and you want to follow along
 and you run into a problem I'll try to help.

 ---------------------------------------------------

 The compression tester is working. It took 5 minutes
 to write the software and get it working.
 I had no pressure sensor connected to the A to D pin so it was
 reading max high or 254 and 255.

 One minor problem.

 I need to convert the extended ASCII output characters
 to a decimal number character so they can be loaded into
 a spread sheet for plotting.

 Anybody know how to do this in debug?
 A Windows problem.

 Paul Lamar
 -------------------------------------------------

 SNIP!

 Paul, I saw some ascii to block text, crc, and a few other code
 samples on the Basic X example code section. But I'm not sure
 if any are exactly what you are looking for. Maybe you could give it a
 peek.
 C. Smith

 ---------------------------------------------------

 I got it figured out. That subroutine is flawed IMHO
 so I used GetADC(). "Perform an analog to digital conversion
 on an input pin."

 The comments are largely self explanatory.
 The BasicX documentation is mandatory and can be downloaded
 for free. Here is the critical part in pdf form.

 This is all the software you need to measure and record the compression
 on a rotary engine.

 snips...........


 -----------------------------------------------------------

 The ZBasic IDE was sending the compression pressure sensor  info
 in limited length ASCII character lines to the PC using the USB
 port.

 That is not what a spread sheet wants or needs to chart.
 So I wrote a short QB program to convert that file to
 a .csv file of a single line up to 32,000 characters long.
 Worked like a charm. I'll give that program to anybody that wants it.

 That file then loaded directly into my Open Office spread sheet
 and this is what the chart looked like.

 Here is the procedure. Cut and past the output data
 into a WordPad text file. Give it a name and save it.
 RUN the QB program and you will get a long.csv file.
 Load that into a spread sheet and chart it.

 Your done. Here is what it looks like.
 Basically this is what the compression sensor output will
 look like.

 This is not scaled data. I did it as test of the A to D.
 I was feeding the 10 bit A to D with a triangular
 wave between zero and five volts using a signal generator.

 Five volts is 1024 from the A to D  so that
 is what you are seeing. In the final version the sensor will
 be calibrated and scaled  in the Atmel program and the output
 will be in psi.

 http://www.zbasic.net/

 So simple a caveman like me can do it.


 Paul Lamar

Paul,
That looks real cool.  Something that you can print and save for future
reference.

I ordered my board and pressure sensor on Friday... should be here this
week.  I would appreciate a copy of your program.  Warning: I may have
questions.  ;-)

Thanks,
Mark
(Pre-caveman)

I had help from Bob. He operated the scope while I was programming.

Paul Lamar
-- 
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site. http://www.rotaryeng.net
Youtube key word PaulLamar2
Copyright 1998-2010 All world wide rights reserved.