Hi All,
Firstly, I apologise as I have used the search and there are other threads of a similar topic on here, I just cant find exactly what I am looking for.
This is my first Arduino build, I am attempting to build a data logging system for my racebike.
Some of the things I am trying to log are:
Front Wheel Speed
Rear Wheel Speed
Engine RPM
Lean Angle
Acceleration
GPS location
The first three of these are going to be done by counting pulses. I am using a Mega, but I would prefer to have these individual counting functions separate, counting away to themselves, with the arduino polling them on the timer interrupt.
Of the counting chips I have seen they have a set of output pins that you use to build the current value. This is no good to me as to get the number range I require I am going to have to have 32 pins per counter, I will quickly run out of space.
So, is there a chip that takes a pulse input, and can return a value down a serial port?
This is vastly reduce space taken on my arduino.
any help very much appreciated as I am quite new to all this!
You don't need to use any external counters. The Mega (assuming it's a mega2560 mcu) has 4 16-bit Timer/Counters. You can use three of these as Counters with an external trigger (rising/falling edge) clock. Then use the 4th as a Timer interrupt at regular intervals.
Using them as Counters is a hardware function so they don't require code except to read them.
You need to understand that a motorcycle is very slow in computer terms. At 6000 RPM, that is 100 cycles per second. The MCU can execute up to 160,000 instruction steps, or perhaps 10,000 lines of "C" in between each of these events.
You only need to sense once per revolution - or perhaps twice or three times.
Hi, thanks for the reply. The wheel speed sensors will have at least 6 pickup points per revolution. I need that resolution for it to react quick enough in a slip situation.
6 pickups seems to be the standard for aftermarket traction control systems.
Do you still think a mega will be capable of handling that on its own?