The PIC transmit the frequency in 5 bytes to the USB-UART adaptor, the Android device is connected to the USB-UART via OTG cable or adaptor.
The PIC16F628A generates an accurate 1 second time base for the
counter by timer1 and CCP. The counter measure the frequency for 0.1sec first, if the frequency is greater than 2MHz TMR0 prescaler divides by 4 to increase the input
frequency range to 20MHz with resolution of 4Hz, if the frequency below 2MHz TMR0 is set for no prescaling and the measurment is with resolution of 1Hz.
The app is in free program Basic for Android (B4A) https://www.b4x.com/.
OTG (On The Go) is the
cable that is used to connect USB devices (other than charger or PC)
to phones or tablets.
The app is an APK file, transfer to the
Android device and opening the file gives an option to install it.
The code is provided if you wish to modify the app, it is in a B4A
free program for PC.
USB-UART can be bought from eBay: https://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=p3519243.m570.l1311&_nkw=usb+to+uart
ANDROID TALKING FREQUENCY COUNTER
B4A using Text To Speech. Arduino or PIC connected to Android via OTG cable, app has an adjustable timer to set the talk intervals (5 to 105 sec) and a stop button. The app is for Arduino or PIC. App written in free B4X (Basic for Android) https://www.b4x.com/. Text To Speech is integral to Android. APK file is included to install the file to Android device. Arduino:
The Arduino generates an accurate 1 second time base for the
counter by cascading timer0 and timer2. The link between digital
inputs 3 and 4 connects the output of timer2, 250 Hz, to input of
timer0. The software waits Frequency counter for Android using
Arduino Nano or Uno.for the output of timer0 to go positive to start
the count of frequency input to timer1. Timer1 is a 16 bits timer,
it overflows at the count of 2 power of 16, that in turn advances
over-flow register. At the end of the 1 second the 16 bit register
is recorded. The Arduino sends via OTG cable or
adaptor 3 bytes that contain the measured frequency. The specs
recommend input up to 6 MHz. PIC18F2550:
USB CDC (Communication Device Class) software is a modified Microchip MLA from Nov 2017. Frequency can be up to 12MHz with 1Hz resolution. Timer2 is a 1 second time base and Timer1 is the 16 bit counter.
OTG (On The Go) is the
cable that is used to connect USB devices (other than charger or PC)
to phones or tablets.
Speech is in the default language of the device.
The app is an APK file, transfer to the
Android device and opening the file gives an option to install it.
The code is provided if you wish to modify the app, it is in a B4A
free program for PC.
ANDROID TALKING VOLTMETER
It's good to talk. Voltmeter app in B4A( https://www.b4x.com/) using Text To Speech. Arduino connected to Android via OTG cable.
Voltage input is at pin A0, max 5V. The talking voltmeter has an adjustable timer to set the talk intervals (5 to 105 sec) and a stop button.
Optional pushbutton at pin 2 of the Arduino triggers the talk.
OTG (On The Go) is the
cable that is used to connect USB devices (other than charger or PC)
to phones or tablets.
Speach is in the default language of the device.
The app is an APK file, transfer to the
Android device and opening the file gives an option to install it.
The code is provided if you wish to modify the app, it is in a B4A
free program for PC.
FREQUENCY COUNTER FOR ANDROID NIXIE DISPLAY
The Arduino generates an accurate 1 second time base for the
counter by cascading timer0 and timer2. The link between digital
inputs 3 and 4 connects the output of timer2, 250 Hz, to input of
timer0. The software waits Frequency counter for Android using
Arduino Nano or Uno.for the output of timer0 to go positive to start
the count of frequency input to timer1. Timer1 is a 16 bits timer,
it overflows at the count of 2 power of 16, that in turn advances
over-flow register. At the end of the 1 second the 16 bit register
is recorded. The Arduino sends via USB cable and OTG cable or
adaptor 3 bytes that contain the measured frequency. The specs
recommend input up to 6 MHz, I tested it at 2 MHz.The Android app
display 0 to 9 images of nixie tubes. OTG (On The Go) is the
cable that is used to connect USB devices (other than charger or PC)
to phones or tablets. The app is an APK file, transfer to the
Android device and opening the file gives an option to install it.
The library is needed if you wish to modify the app, it is in a B4A
free program for PC.
BLUETOOTH FREQUENCY COUNTER FOR ANDROID
The Android app is made using MIT App Inventor which is
an easy way to make Android apps.
http://appinventor.mit.edu/explore/ . The app has buttons to
connect and disconnect the Bluetooth to the phone and 2 displays of
voltage and frequency. The .apk file is the file that installs
manually the app to your phone. The .aia file can be imported after you
install the MIT App Inventor. ARDUINO
The Arduino generates an accurate 1 second time base
for the counter by cascading timer0 and timer2. The link between digital
inputs 3 and 4 connects the output of timer2, 250 Hz, to input of
timer0. The software waits for the output of timer0 to go positive to
start the count of frequency input to timer1. Timer1 is a 16 bits timer,
it overflows at the count of 32768, that in turn advances overFlow
register. At the end of the 1 second the 16 bit register is recorded.
The Arduino then sends to the Bluetooth 5 bytes of data in serial UART
protocol.
HC-05 is pre-set to code 1234 and name HC-05. The module UART
is pre-set to 9600,n,8,1. PIC16F690
This project is for the Android app and HC-05 as above.
The PIC counts the frequency over 1 second period generated by CCP1 and
Timer1. Input is counted by Timer0 that can count up to 4 MHz. After
each count period 2 bytes of ADC and 3 bytes of the counter are
transmitted to the HC-05 Bluetooth module.
1K resistor is for reducing 5V to 3.3V input of the
Bluetooth module.
HC-05 module can be any make that is powered by 5V, from ebay.
ANDROID PIC16F1459 OSCILLOSCOPE
The input is to pin 13, pin 14 is comperator input. This scope is
for low frequencies, up to 5KHz. The sampling is done by the PIC ADC in a
speed of about 60K sampling per sec. The software for Android is in B4A
basic for android. The pic takes 62 samples of input to create one screen.
For lower frequency a delay for each sample gives slower sweep. The Android
app set to USB CDC class. To install the app on Android device place the APK
file in the device and open the file. Load code to the pic and connect it
via OTG cable. OTG (On The Go) is the cable that is used to connect USB
devices (other than charger or PC) to phones or tablets. Input is DC or AC
not acceding 5V.The Analogue Comperator of the PIC detects zero crossing of
input signal, it triggers start of sampling a frame when signal is rising.
Software for PIC and app for Android, if you wish to change it download free IDE from: https://www.b4x.com/
ANDROID ARDUINO OSCILLOSCOPE
Low frequency oscilloscope for Android using
Arduino Uno or Nano. The input is to pin A0 of the Arduino which connected
to Android device via USB OTG cable.This scope is for low frequencies, up to
5KHz. The sampling is done by the Arduino ADC in a speed of about 20K
sampling per sec. The Arduino software is mostly in Atmel code in purpose to
get wider bandwidth. The software for Android is in B4A basic for
android. The Arduino takes 60 samples of input, 60 samples create one screen.
For lower frequency a slider gives slower sweep.To
install the app on Android device place the APK file in the device, when you
open the file it ask if you want it installed. Load code to the Arduino and
connect it via OTG cable. OTG (On The Go) is the cable that is used to
connect USB devices (other than charger or PC) to phones or tablets.Input is
DC or AC not acceding 5V.
The Analogue Comparator of the mc (pins 6, 7)
is used to detect zero crossing of input signal, it triggers start of
sampling a frame when signal is rising.
Software for Arduion and app for Android, if you wish to change it download free IDE from: https://www.b4x.com/
Android app in App-Inventor can be downloaded from GitHub. https://appinventor.mit.edu/
100K resistors set input to 2.5V to run signal at center of
screen.
Arduino pin A0 and PIC pin 13 are inputs for the signal.
Arduino pins 6, 7 are inputs of the analogue
comparator, the comparator detects zero crossing and triggers start of
frame.
ANDROID MICROPHONE OSCILLOSCOPE
Oscilloscope app for Android with input to the microphone socket. Low
frequency oscilloscope no need for external active components. Microphone
input is 0.5V max, AC signals only, the input is connected to the device ADC
via a capacitor. The bandwidth is about 30 to 5000 Hz, the cap coupling
causes the lower limit, the slow basic program and the device ADC define the
upper limit.
The sampling rate is 44.1Ksps Arduino takes 60 samples of input, 60 samples
create one screen, for Y x 10 every tenth sample is taken.
App is in B4A (basic for Android), To modify the app to your needs you
can download the free IDE from https://www.b4x.com/ To install the app download APK file
and open it in your device.
Input is to the microphone socket. Input voltage divider allows signals
of 5V P-P. Alternative way is to use an existing headset and connect the
input in place of the mic. When no input plugged in the scope shows the
signal from the internal mic. The 18 ohm resistors simulate speakers, it
lets the device switch to external mic.
100K, 10K resistors are voltage divider to set the input to
5 Vp-p
18 ohm resistors are to simulate speakers, it lets Android to
switch to external mic.
TALK TO ARDUINO
Android app is file APK to be installed manually. Control outputs of Arduino pins 2,3 with Android speech recognition. Type in the app 4 words of your choice and when you say them Arduino output changes. File AIA can be opened on MIT App Inventor. Arduino Uno or Nano is connected via OTG cable.
Android app in App-Inventor can be downloaded from GitHub. https://appinventor.mit.edu/