|
|
# Features according to schematics
|
|
|
|
|
|
## Mikrocontroller sheet
|
|
|

|
|
|
|
|
|
Here You can see the connection to the FRDM-KL25Z evalboard and the parallel breadboard breakout header.
|
|
|
|
|
|
The pin allocation is documented in this table:
|
|
|
|
|
|
| Functionality | Evalboard Pin | Mikrocontroller Pin | Configuration | Comment |
|
|
|
| ------ | ------ | ------ | ------ | ------ |
|
|
|
| Motors enable | J10, 3 | PTE21 | GPIO | OUTPUT |
|
|
|
| Motors fault | J10, 1 | PTE20 | GPIO | LOW active INPUT, pullup 10k, Jumper |
|
|
|
| Motor A PWM1 | J1, 5 | PTC3 | FTM0_CH2 | ~ 2-3 kHz |
|
|
|
| Motor A PWM2 | J1, 7 | PTC4 | FTM0_CH3 | ~ 2-3 kHz |
|
|
|
| Motor A current sense | J10, 5 | PTE22 | ADC0_SE3 | Jumper |
|
|
|
| Motor A back EMF | J1, 3 | PTC0 | ADC0_SE14 | Jumper |
|
|
|
| Motor B PWM1 | J10, 12 | PTC1 | FTM0_CH0 | ~ 2-3 kHz |
|
|
|
| Motor B PWM2 | J10, 10 | PTC2 | FTM0_CH1 | ~ 2-3 kHz |
|
|
|
| Motor B current sense | J10, 7 | PTE23 | ADC0_SE7a | - |
|
|
|
| Motor B back EMF | J10, 11 | PTE30 | ADC0_SE23 | - |
|
|
|
| Servo 0 | J10, 2 | PTB0 | FTM1_CH0 | ~ 50 Hz |
|
|
|
| Servo 1 | J10, 4 | PTB1 | FTM1_CH1 | ~ 50 Hz |
|
|
|
| SPI MISO | J2, 10 | PTD3 | SPI0_MISO | - |
|
|
|
| SPI MOSI | J2, 8 | PTD2 | SPI0_MOSI | - |
|
|
|
| SPI SCK | J2, 12 | PTD1 | SPI0_SCK | - |
|
|
|
| CS OLED | J2, 1 | PTC12 | GPIO | LOW active OUTPUT |
|
|
|
| CS SD card | J2, 6 | PTD0 | GPIO | LOW active OUTPUT |
|
|
|
| CAM 0 ADC | J2, 4 | PTD5 | ADC0_SE6b | - |
|
|
|
| CAM 1 ADC | J2, 17 | PTD6 | ADC0_SE7b | - |
|
|
|
| CAM Sync | J2, 19 | PTD7 | GPIO | OUTPUT |
|
|
|
| CAM Clock/ Bluetooth RX | J2, 20 | PTE1 | GPIO/ UART1_RX | not both functions at same time available (INPUT/ RX) |
|
|
|
| Bluetooth TX | J2, 18 | PTE0 | UART1_TX | - |
|
|
|
| VBAT Measuerement | J10, 9 | PTE29 | ADC0_SE4b | - |
|
|
|
| Switchbank 1 enable| J2, 11 | PTA17 | GPIO | Key matrix enable output 1 |
|
|
|
| Switchbank 2 enable | J2, 5 | PTC16 | GPIO | Key matrix enable output 2 |
|
|
|
| DIP Switch input 1 | J9, 9 | PTE2 | GPIO | INPUT, pulldown 10k|
|
|
|
| DIP Switch input 2 | J9, 11 | PTE3 | GPIO | INPUT, pulldown 10k|
|
|
|
| DIP Switch input 3 | J9, 13 | PTE4 | GPIO | INPUT, pulldown 10k|
|
|
|
| DIP Switch input 4 | J9, 15 | PTE5 | GPIO | INPUT, pulldown 10k|
|
|
|
| LED 1 | J9, 1 | PTB8 | GPIO | OUTPUT |
|
|
|
| LED 2 | J9, 3 | PTB9 | GPIO | OUTPUT |
|
|
|
| LED 3 | J9, 5 | PTB10 | GPIO | OUTPUT |
|
|
|
| LED 4 | J9, 7 | PTB11 | GPIO | OUTPUT |
|
|
|
| Pushbutton 1 | J2, 3 | PTC13 | GPIO | INPUT, pulldown 10k|
|
|
|
| Pushbutton 2 | J2, 7 | PTC17 | GPIO | INPUT, pulldown 10k|
|
|
|
| Poti 1 | J10, 6 | PTB2 | ADC0_SE12 | - |
|
|
|
| Poti 2 | J10, 8 | PTB3 | ADC0_SE13 | - |
|
|
|
| Sensor 0 | J1, 2 | PTA1 | FTM2_CH0 | e. g. HAL sensor, pullup 10k|
|
|
|
| Sensor 1 | J1, 4 | PTA2 | FTM2_CH0 | e. g. HAL sensor, pullup 10k|
|
|
|
| 6V | J2, 15 | - | - | 6V connection to breadboard header |
|
|
|
|
|
|
## Sensors sheet
|
|
|

|
|
|
|
|
|
The board features 2 linescan camera headers with measurement connectors for clock and signal and 2 headers for sensors with CMOS level output.
|
|
|
|
|
|
## HMI sheet
|
|
|

|
|
|
|
|
|
The functionality of the left side is fully compatibly with the FRDM-TFC shield, but the debouncing of the push buttons was improved with RC filters and the dipswitches can optionally be connected to a mikrocontroller pin.
|
|
|
|
|
|
### Option 1 - second dip switch bank
|
|
|
The nxpboard is capable of utilizing a second dip switch bank via a keyboard matrix circuit. Therefore all matrix diodes need to be connected and both switch must be enabled by the mikrocontroller:
|
|
|
|
|
|
| SW1_EN | SW2_EN | Active switch bank |
|
|
|
| ------ | ------ | ------ |
|
|
|
| 1 | 0 | 1 |
|
|
|
| 0 | 1 | 2 |
|
|
|
|
|
|
For single use set the jumper for the first switch bank to 3V3 and the one for the second floating.
|
|
|
|
|
|
### Option 2 - additional reset
|
|
|
There is the opportunity of connecting an additional, easily reachable RESET button on the top of the board.
|
|
|
|
|
|
### OPTION 3 - OLED display
|
|
|
A OLED display can be connected via SPI 0. The connector footprint is typical for many types (e. g. displays produced by WAVESHARE)-.
|
|
|
|
|
|
## Power supply sheet
|
|
|

|
|
|
|
|
|
The power supply features a PTC fuse, which is designed for a current of 5A at 16V. To control bigger motors than the ones in the NXP cars, the PTC needs to be replaced/ bridged.
|
|
|
|
|
|
The battery voltage can be checked with an ADC Pin using a Voltage divider.
|
|
|
|
|
|
## Option 1 - reverse polarity protection circuit
|
|
|
The reverse protection is realized by a P-Channel FET and a Zener diode. If current is flowing throught the diode (polarity reversed), the gate of the FET will be triggered and so the board will be disconnected from the battery.
|
|
|
|
|
|
## Option 2 - Power control LEDs and testpoints
|
|
|
There is the possibility of testpoints and also control LEDs for the VBAT line, 6V line and 3V3 line.
|
|
|
|
|
|
## Option 3 - DC-DC converter
|
|
|
The servos need an operating voltage of 6V, which can be provided by the breadboard header (e. g. via linear regulator) or by the internal DC converter of the board with a current of up to 3A.
|
|
|
|
|
|
In option 3a a cutoff voltage can be adjusted with a voltage divider. By default there is no cutoff voltage.
|
|
|
|
|
|
Some servo types do need 5V. Therefore R47 can be changed from 15,4k to 19,1k.
|
|
|
|
|
|
## Powertrain sheet
|
|
|

|
|
|
|
|
|
Each DC motor is controlled by two half bridges, which can handle a current of up to 50A. On the board more than 20A are not recommended, therefore also the PTC input fuse needs to be changed. With the default configuration, 2 motors with a current consumption of ~2A ( 5A peak ) are fine.
|
|
|
|
|
|
For both motors there is one high active enable input, which can be configured by a jumper (see mikrocontroller sheet). If the jumper is floating, the motors will be disabled by default.
|
|
|
|
|
|
Each motor has a current sensing input, which needs to be connected to the mikrocontroller via solder jumpers (see mikrocontroller sheet) and can be controlled by 2 PWM Signals:
|
|
|
|
|
|
| Enable | PWM1 | PWM2 | Motor |
|
|
|
| ------ | ------ | ------ | ------ |
|
|
|
| 0 | x | x | freewheeling/ disabled |
|
|
|
| 1 | 0 | x | spin first direction |
|
|
|
| 1 | 0 | x | spin in second direction |
|
|
|
| 1 | 1 | 1 | break |
|
|
|
|
|
|
### Option 1 - Back EMF measurement for speed regulation
|
|
|

|
|
|
|
|
|
If the motor is turning in freewheeling mode, it inducts voltage.
|
|
|
This voltage is called back EMF and can be used for controlling the RPM of the motors or even motion tracking.
|
|
|
|
|
|
Therefore the nxpboard features a seperate opamp circuit for every motor. In example for motor A, unit A of the opamp is generating a decoupled reference voltage of ~1,65V. The back EMF voltage for the mikrocontroller's ADC pin is created by the differential amplifier around unit B and will be `VADC = 1,65V+-g*VBEMF`.
|
|
|
|
|
|
The amplification gain `g` can be calculated with following formula: `g=(R20+R11)/R11*R19/(R19+R18)` which can be simplified to `g=R20/R11` if `R20=19, R11=R18`. The default gain is 0.39 and is suited for a back EMF of up to 5V. Alternatively the gain can be adjusted by a 22k potentiometer, but it won't be linear then.
|
|
|
|
|
|
Here You can see an example measurement, but gain and sampling time are not adjusted correctly, a better example with usable configuration data will follow soon:
|
|
|
|
|
|

|
|
|
|
|
|
### Option 2 - Fault condition flag
|
|
|
To be compatible with the FRDM-TFC shield, a Low active motor fault indicator flag is needed. If the halfbridges on the nxpboard go in fault condition, there will be a flag current of ~5mA on the sense pins. This current is used to trigger a N-Channel mosfet (1 for each motor) and the outputs are connected together as wired and gate. If You omit this function, be careful as the resistors an capacitors at the gates of the mosfets also form RC filters for current sense.
|
|
|
|
|
|
### Option 3 - Buffer capacitators
|
|
|
If bigger motors with higher peak currents need to be controlled, 4 buffer capacitators (e.g. 47uF, 50V) can be aditionally soldered to the bottom layer of the pcb.
|
|
|
|
|
|
## Servo sheet
|
|
|
|
|
|
The 2 dc servos can be protected by an adjustable current limiting circuit, which is seperate for each moter and based on a standard current source circuit around a comparator opamp, shunt and mosfet. The reference current can be adjusted by 1 poti and is about 10 - 100mV.
|
|
|
|
|
|
## Breakout sheet
|
|
|

|
|
|
|
|
|
All mounting holes on the board are gronded. There is also a 2mm x 2mm ground soldering area.
|
|
|
|
|
|
## Bluetooth sheet
|
|
|

|
|
|
|
|
|
There is a connector for a HC-SR05/06 serial bluetooth module.
|
|
|
|
|
|
### Option 1 - RX functionality
|
|
|
To use the RX functionality, the solder jumper must be connected. Then the camera clock may not work correctly, handle with care!
|
|
|
|
|
|
## SD card sheet
|
|
|

|
|
|
|
|
|
The micro SD card slot can be connected via SPI 0. |
|
|
\ No newline at end of file |