• Spring 2024 meetup in Calgary - tentative date Saturday, April 20/2024. Other regions are also discussing meet ups. If you want one in your area get going on organizing it! discussion
  • We are having email/registration problems again. Diagnosis is underway. New users sorry if you are having trouble getting registered. We are exploring different options to get registered. Contact the forum via another member or on facebook if you're stuck. Update -> we think it is fixed. Let us know if not.
  • Spring meet up in Ontario, April 6/2024. NEW LOCATION See Post #31 Discussion NEW LOCATION

Bridgeport Mill Tachometer

Susquatch

Ultra Member
Administrator
Moderator
Premium Member
Have a look at the function libraries, you might find they expose the info you desire. I compiled some of that timer code @whydontu linked to, so it all looks to be very CPPish to me.

No, my stuff hasn't arrived yet, it was snail mailed. Should see it this week I hope.

I had a good look and didn't see it.

Let me know if you run across a function called TCCR2A or TCCR2B in the documentation. I believe that those are the two 8 bit timers that are most commonly used.
 

Susquatch

Ultra Member
Administrator
Moderator
Premium Member
I think the info you are after is in what they call the microcontroller datasheet.

ATmega328P pdf, ATmega328P description, ATmega328P datasheets, ATmega328P view ::: ALLDATASHEET :::

Not exactly. The data sheets provide the machine language structure and codes and as such they describe the timers as well as the machine language instructions to use them.

However, it's unlikely that the C++ compiler for the Arduino uses the same terminology for them. That would be REALLY confusing.

At any rate, you are definitely poking around in the stuff I wanted to understand and use.

Let me expand a bit. Programs are written in languages. But microcontrollers don't understand all languages. They ONLY understand machine language. Machine language is the basic logic that operates the processor. On the other hand, people have a hard time programming in machine language. It takes too long and it is easy to make mistakes. So companies have developed higher level languages together with compilers that convert the higher level programs that people can use into the low level language that microcontrollers use. The Arduino is programmed in a custom version of c++. When a program written in C is compiled, it is basically converted into machine language. Best of all, the C language can be compiled into different versions of machine language for different processors.

Although it's entirely possible that a C instruction or target would work the same as the machine language version, it's unlikely. Typically, one line of C code compiles into dozens or even hundreds or thousands of lines of machine language code.
 

YYCHM

(Craig)
Premium Member
Oh Oh..... This stuff is teeny tiny:oops:

Arduino.JPG

I don't think there is a chance in hell of me ever soldering something this small LOL.
 
Last edited:

Susquatch

Ultra Member
Administrator
Moderator
Premium Member
Oh Oh..... This stuff is teeny tiny:oops:

View attachment 17661

I don't think there is a chance in hell of me ever soldering something this small LOL.

Wow...... Just wow......

Did you just assemble the pins without soldering?

And if you can do that, surely you can solder too...... If not, maybe SWMBO or a daughter could do it for you......

Anyway, I'm sure you can do it. Just need a big magnifying glass, a light, some small project clips to hold it together, and two nice square cushions to lay your arms on to steady the shakes.....

Very cool.
 

YYCHM

(Craig)
Premium Member
Wow...... Just wow......

Did you just assemble the pins without soldering?

And if you can do that, surely you can solder too...... If not, maybe SWMBO or a daughter could do it for you......

Anyway, I'm sure you can do it. Just need a big magnifying glass, a light, some small project clips to hold it together, and two nice square cushions to lay your arms on to steady the shakes.....

Very cool.

Give me $5 and the cost of postage and the solder yourself Nano, LCD and I2C interface are yours:p
 

whydontu

I Tried, It Broke
Premium Member
or send me the bits and I’ll solder them, make up the interconnect cables, load the software, and send it back to you. You can make up your own cabinet and cabinet-to-sensor wiring. I have all the gear and no objections to helping as long as you don’t want it done in a screaming panic.
 

YYCHM

(Craig)
Premium Member
or send me the bits and I’ll solder them, make up the interconnect cables, load the software, and send it back to you. You can make up your own cabinet and cabinet-to-sensor wiring. I have all the gear and no objections to helping as long as you don’t want it done in a screaming panic.

Thanks for the offer, I may take you up on it. I really don't think I could solder this stuff without messing it up big time. For now I ordered a Nano with pre-soldered pins and a USB cable (couldn't find anything around here that fit) and a pre-assembled 2x16 I2C LCD. If this Tach works out, I'm thinking a FPM meter for my shaper.

Craig
 
Last edited:

Susquatch

Ultra Member
Administrator
Moderator
Premium Member
Give me $5 and the cost of postage and the solder yourself Nano, LCD and I2C interface are yours:p

Same offer as @whydontu.

I'll just do yours next to mine and ship you back the best one.

But if you really don't want them, send me a PM with your email address and I'll take your offer and add a nice tip.

I'm really looking forward to all the learning and projects.

For example, I've always wanted to be able to turn off individual rows on my corn & bean planter on the fly. Seems like a great job for an Arduino or two, a few solenoids, and some parts I make on my new to me Hartfort mill!
 

Susquatch

Ultra Member
Administrator
Moderator
Premium Member
easy peasy. Not exactly the same, but I use an Arduino to trigger drum sounds in my music synthesizer. Reads a MIDI digital data stream, and outputs seven individual 5v pulses in response to specific musical notes.

There‘s a more robust version of the Arduino that has a more industrial layout, includes integral relays, RTC, etc.

https://www.universal-solder.ca/pro...lectronics-diy-kit-for-arduino-nano-included/

Oh my! That is a beauty!

No soldering @YYCHM!

It's on backorder, but that might save a ton of extra hardware. I'd have to get two of them and twin them for each half of my eleven row planter. But no biggie. At $35 its still WAY cheaper than making a multiplexed set of drivers!

My son dropped off I an engine position sensor this morning.

20211013_121829.jpg

This particular one is way too big to use directly because it would weaken the flange too much. I might grind a bit off to find out how thick the plastic casing is though. If it's really thick, I might be able to turn it down on my lathe to fit inside the flange.

I'm not concerned about durability or strength. The environment on the mill head is like heaven compared to the hell such sensors must endure mounted onto a car or truck engine. I can even hear angels singing in the background.... Oh, sorry - I think that's my VFD rated motor singing!
 

Susquatch

Ultra Member
Administrator
Moderator
Premium Member
According to the description https://www.universal-solder.ca/pro...lectronics-diy-kit-for-arduino-nano-included/ is a DIY soldering kit, a bunch of pieces you have to solder together.

Crap! As we have both learned the hard way....... Gotta read the details!

Oh well, that doesn't really upset me. Soldering is not my favorite thing to do, but Lord knows I have done a crap load.

In my early days, it was all transistors and components. Later it was chips and components. Still later it was processors, chips, and components. I have built several computers from the ground up making my own circuit boards and soldering every single joint. What a huge job!

But I was young then with rock solid hands and incredible eyes. Now I need a magnifying glass, arm rests, and part holders to see what I'm doing and stop the shaking. Crap.
 

YYCHM

(Craig)
Premium Member
What do they call the plug type/style that would connect to the 3 pins on this sensor?

1634147911727.png
 
Last edited:

Susquatch

Ultra Member
Administrator
Moderator
Premium Member
What do they call the plug type/style that would connect to the 3 pins on this sensor?

View attachment 17681

Generally, they are called PCB connectors (short for printed circuit board). But they go by other names depending on the pin size and spacing. The two, three, and 4 way connectors we discussed earlier have 1/10th inch spacing and are called terminal blocks because they take a wire on the other end with a screw clamp. The size stuff is all over the map. I wish all suppliers would provide connector names and dimensions.

What is that thing?
 

whydontu

I Tried, It Broke
Premium Member
IR LED and IR phototransistor, plus level translator and bias circuitry. Three wires: ground, +5V, TTL 5v digital output. Output goes high when IR is reflected from LED to transistor. Bulletproof.

Connectors are standard 2.54mm / 0.1” pins. Dupont is the generic term. Amazon has a kit with all the bits. I make most of my interconnects with these, no soldering. If there’s vibration I just put on a glob of glue gun snot.

https://www.amazon.ca/Hautton-Crimp...uPWNsaWNrUmVkaXJlY3QmZG9Ob3RMb2dDbGljaz10cnVl
 

Susquatch

Ultra Member
Administrator
Moderator
Premium Member
Hey @YYCHM & @whydontu

I'm not vouching for this outfit but thought it was interesting. Visuino is a drag and drop visual programming environment for various microcontrollers including Arduino.

There is a free limited version. Full versions require a license.

I can't seem to get past the home page on my phone. So I tried other ways of getting in. This works better but you do get the price first. Just hit the menu button up top to explore. I watched the intro video and was impressed.

https://visuino.com/orders
 

YYCHM

(Craig)
Premium Member
IR LED and IR phototransistor, plus level translator and bias circuitry. Three wires: ground, +5V, TTL 5v digital output. Output goes high when IR is reflected from LED to transistor. Bulletproof.

Connectors are standard 2.54mm / 0.1” pins. Dupont is the generic term. Amazon has a kit with all the bits. I make most of my interconnects with these, no soldering. If there’s vibration I just put on a glob of glue gun snot.

https://www.amazon.ca/Hautton-Crimping-Terminal-Ratcheting-Connectors/dp/B083DRCFRY/ref=sr_1_49_sspa?dchild=1&keywords=crimp+2.54mm&qid=1634170929&refinements=p_85:5690392011&rnid=5690384011&rps=1&sr=8-49-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUFBUVpVTlJLQVFGNVAmZW5jcnlwdGVkSWQ9QTAwODU5OTRFUllWM1FJM09RUFkmZW5jcnlwdGVkQWRJZD1BMTA0MjQ4MjFCWlpXVVJXSkRaWjcmd2lkZ2V0TmFtZT1zcF9idGYmYWN0aW9uPWNsaWNrUmVkaXJlY3QmZG9Ob3RMb2dDbGljaz10cnVl

This should work for me.

Flexible Jumper Wires - M-F, 100/200mm, 80 Pcs | Active Tech Electronics Distributor (active123.com)

These guys seem a little pricy though.
 
Last edited:
Top