My next project :frequency counter [SOLVED]

have this hardware : i just found this at core :
1: https://core-electronics.com.au/uno-r3.html

which has Arduino ATMEGA328P on it and i am looking for an l.c.d panel to build it with
.

this is the project circuit project details:page here of what i want to build …

I have a few Arduino books for the programming side of things but mot of all need the L.C.D…the local suppliers dont have a good match that i can find maybe core holds my answers…???

so i did remove the lcd from its original board… also the code that was explained in the text is the one i flashed into it… so the code and library are fine…i used arduino-ide to flash it with…

:: my next step to clean it up and make it neat
picking up one of these type boards this week it will simplify my project,and fit the uno much easier …the need for a new housing is increasing …now…looking around to nite just may order a new rpi-4 plus whatever i need … a nanosond case only 20 od will suit me fine i may only get a 2 gig board this time and stick an high speed thumb drive into it or a wd-black ssd nvme to sata bridge still throwing ideas around but want both a new board housing …but still get this meter finished etc…etc…etc…

ok so i need to buy some header pins to populate my prototype Arduino board that i found then mount and fit the lcd using some spacers and do some wiring,as you can see i have two pots one does the text brightness and the other does the back lighting. both pots are 10 k linear the back-light voltage i used was the spare 3.3 volt rail and i have to pick up an 7404 to make the filter cct… as well no biggy i will implement this into the bread board… clean it up mount an …B.N.C female socket on it an provide proper capacitive de-coupling if the need be…
also the readout only measures Hz ,if some body could pls help me modd that part of the code it would ber great … i have seen it up to 10 digits long well into Mhz range…
i put a 555 timer cct i had laying around onto it and just fed it with a square wave varied the pot for higher frequency and up it came 10 digits long… maybe it will go further not shore exactly… ::
i would like it to read Khz…and adjust for mhz when it changes frequency as the range differs … simply it does have a decimal point in the code but might need adjusting as well…i will add a drawn schem later…ok…but basically pin 15-16 16 is negative led and 15 is positive led…for the back light i just wired it via a 10 k pot did not use a divide cct just because i wanted to get it running…will prolly modd that before i draw a schem of what i have done…should have 10 turn 10 k pots around here somewhere…

:i will try modd the code my self … time permitting… but it does work and for now that is the main thing …
still work to do…

Hey Brian,

Looks like they’re using a DFRobot LCD - DFR0009. Here’s our product listing for that one:

1 Like

yes that is the replacement the one that they are using is much less complex …thx…looking into it though

maybe i could code the buttons to switch between fan tacho outputs.yellow wire i have 3 fans on my rpi-4

yes Oliver i like that one simple is best…

Here’s a simpler 16x2:

1 Like

Hey Brian,

Here’s another suitable display you could use in your project if you’d like to learn how to use I2C to communicate with various devices.

As for getting to know all the tricks and script styles I’d check out the workshop below. There are also some specific tutorials on the site if you want to know more about PWM, I2C, SPI, etc.

Please let us know if you need any help with it!

3 Likes

i like this case to go with it

1 Like

after thoughts i think i may go with this display having the switches coded into the sketch program
lots of options here … but simple steps first …code is not my specialty

2 Likes

Sounds good Brian!

Make sure to let us know if you have any questions. :+1:

thx most likely code i would say i have a sample sketch that was written for it
but i would like to be able to make use of the switches on the lcd panel .
to switch between the fans if i have several of them going… like often i do run at least 2 when i`m cpu o/clocking…etc

i went with the dfr0009 seems the one used is not a stocked product and the replacement from core but i cannot seem to match the correct cables to the lettering of the connectors to the l.c.d. the sketcth program verified and ran and uploaded ok but i just dont know how to wire it to the uno any help would be appreciated

ok i read the manuals for the said hardware…it sort of helped me …i think i need to get some jump wires as it does not seem to be easy 4 me …you just cannot plug the l.c.d into the Arduino board and expect it to function and just program the uno and expect it to work unless the code i flashed needs to be modified…it will take me quite some time to decipher and work the code out on my own …so i need some help below is the code i flashed into the Arduino the code size is approx 5000m from mem or 5 k…
so i do indeed need some help here…also in the notes if you read my project the code is there…so also it has a trimpot in one cct and this does what the onboard trim pot does so some wiring or should i say some reconfiguration of it needs to be done …a fair bit of work to modd not that it is a huge amount rather just the know how…maybe i may have to contact core via phone…ill hold back for a while and see if somebody has any suggestions for me.. i have some bread bords around i have to dig them out..ill mount the lcd onto it if the need be…thx

i think this part of the code needs modding …from what i have read but not exactly shore

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

Program:

//-----Program Developed by R.Girish-----//
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int X;
int Y;
float Time;
float frequency;
const int input = A0;
const int test = 9;
void setup()
{
pinMode(input,INPUT);
pinMode(test, OUTPUT);
lcd.begin(16, 2);
analogWrite(test,127);
}
void loop()
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Frequency Meter");
X=pulseIn(input,HIGH);
Y=pulseIn(input,LOW);
Time = X+Y;
frequency=1000000/Time;
if(frequency<=0)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Frequency Meter");
lcd.setCursor(0,1);
lcd.print("0.00 Hz");
}
else
{
lcd.setCursor(0,1);
lcd.print(frequency);
lcd.print(" Hz");
}
delay(1000);
}
//-----Program Developed by R.Girish-----//

Hi Brian,

Why do you think that this section of the code would need modification? The pinout should still be the same on that LCD module as when it was first designed, and the LCD library shouldn’t be causing any issues either. Do you get any error messages when attempting to upload this to your board?

no it seems to flash ok …no issues there,um the green and orange lights are solid on after the code is flashed
thinking next week i will just buy one of these…

Hm,

Can you please try running a different script (even just blink or a script that outputs to the terminal) to ensure that the board is running correctly.

i can run blink ok i flashed it to the onboard yellow led…

Okay that’s good,

I’m not sure what else we’re able to do here. The LCD should be running straight away with that script flashed properly and with the appropriate libraries installed. Other than adjusting the pot on the board to make the LCD more visible, there’s nothing else that should need to be done to that script. Let us know how you go with the other one, it’s quite unlikely that the LCD/Arduino that was originally received was faulty, but I’m not sure what’s causing the issue in this case.

i`m in a lot of pain today …i have a snapped L-5 so i dosed on meds today…going to start fresh 2 morrow
i tried the pot but it makes no difference only brightness on the display
but i do get a top row of blank squares…so i dont know …i tried just hooking the pins to the ardiono but that did not work either

i have done this before but without bread board.
it uses the spi bus basically …adusst the the pot and the display changes…it may not be the exact same flash as i used it was a few yeras ago …have toi pick up somr jump wires next week…will be pretty shure there is nothing wrong with my uno…as for the screen i brought with it i am un shure exactly as yet…

1 Like

Present findings i think the photo is self explanatory…

can you tell me about my next hurdle the l.c.d screen that came with my order…please…
i`ll try re-flashing the code and take a pic of it …sorry 4 the delay…

1 Like

i forgot to bookmark the pages i found that the l.c.d screen that i got from you guys or my project… and needs to be modded code wise…my notes i got told were sent to your r@d dept…i was chatting on your help pop up …i was told my code was not matching the lcd i brought

if somebody from core could pls post the web links i gave to i think Oliver or Owen not shore exactly whom i was chatting to…it contained test code links…
to web sites for the direct l.c.d its self
from mem i discovered that the lcd was an Hitachi i discovered…it was about last Friday or thursday thanks…sozz for this .interruption…i will attempt to modify the coding…