This my very first attempt at designing and soldering a PCB. I'm using EasyEDA and the nano v3.2 schematic as a baseline. I've done about a month of reading and researching. My goal is to replace the circuit board in an RC car transmitter with an a328p microcontroller and nrf24l01 radio to control a custom toy car I'm building. I'm hoping to get advice from the community on my design. So far I've only designed for the logic, radio and power. For now, I've omitted all the sensors, external lights and connectors that will follow (see attachment)
My main concerns are:
I've bypassed FT232RL 3.3V power with HT7333-A power for optimal nRF24L01 operation. Is this a good approach? I've read these radios can be finicky and designed based on readings.
3.3V regulator input selector from usb/battery and 2 schottky diodes - is this done right? My goal is to either power the project with batteries or usb power when developing the sketch.
Resistor packs vs singles. I'm new to soldering, but planning to practice prior. Which is a better application for my project. I feel likes singles will make design easier but maybe soldering harder?
Am I missing any capacitors or resistors that would be best practice to avoid issues? I've tried to read spec sheets... I suppose simulating the circuit is the only way to know prior?
I've assumed ~3mA for all my status LEDs and figured out R impedance values needed based on spec sheet I/V graph and supply voltage to LED. Do my R values look reasonable? (1K 5V red, green, yellow and 220 for 3.3V blue) (Lite-On C193 5A 0603 LED)
Nice Drawing, I assume it is complete. I will start with a bottoms up approach. U4 your regulator can give you some problems, You should put a bulk capacitor (25uf Min if aluminum on VIN and a small bypass for high frequency bypass. These should be as close to the regulator as possible. You also need a high frequency bypass on the output. This is a conservative approach. Many parts contain the same part number and are interchangeable but not always unless the circuit is designed for them. Regulators can be a big problem and without the proper tools you will never see them oscillate but your circuit will. On the 3.3 add the high frequency bypass capacitors both in and out. Overall the circuit looks great and it shows a lot of work on your part. I probably missed the bypass capacitors on each VLSI chip and the radio. I have a heavy background electronics from the design end where millions are made and reliability is very important. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil
gilshultz:
U4 your regulator can give you some problems, You should put a bulk capacitor (25uf Min if aluminum on VIN and a small bypass for high frequency bypass. These should be as close to the regulator as possible. You also need a high frequency bypass on the output.
I will add a 47uF capacitor to the +5V regulator Vin. What qualifies as a small bypass capacitor? 1uF, 0.1uF? please specify if you could? I understand there is no perfect answer and that I would have to build this all up and verify under the oscilloscope to quantify noise if there was an issue.
For the +5V output, there is a 1uF right there and by the microcontroller +5V there is 1uF+4.7uF+1uF in parallel. Just checking these are not adequate because it's as is from the arduino nano v3.2 schematic.
gilshultz:
On the 3.3 add the high frequency bypass capacitors both in and out.
For the 3.3V, again what qualifies as a high frequency capacitor for input and output?
groundFungus:
It looks like you are missing the caps (22pF) on the crystal on the mega328?
Thanks groundFungus. I am not sure. the Arduino nano v3.2 schematics on this site don't specify one but the symbol looks like it's included in the part? Arduino_Nano-Rev3.2-SCH.pdf
I'm specifying a Murata Electronics CSTCE16M0V53-R0 which has a spec capacitance of 17pF. I really have no experience in this. If you could specify a part that you know would work and whether or not it needs a capacitor that would be very helpful.
In case it is of any interest this is a photo of my Attiny84, nRF24 and Rohm BD6212 H-bridge for controlling an 00 gauge model train - there is no space for a PCB. And the final version also has a 10µF capacitor (that photo is poor).
Robin2:
I presume you are running your Atmega 328 with its internal 8MHz oscillator as that reduces the external circuitry to 3 capacitors and a resistor.
No I'm planning on a 16MHz resonator. I plan on using all inputs and outputs and running some libraries on there for NRF24, 5050 RGB led control and shift in registers to gain more digital inputs.
Curious what you recommend.... btw thanks for your NRF24 tutorial it really helped early on for prototyping my project.
Hi,
Is there a reason why you don't just make a PCB that has the facility to plug a Nano or ProMini PCB into it, rather than reinvent the wheel.
It looks like you are doing that with the NRF24.
TomGeorge:
Is there a reason why you don't just make a PCB that has the facility to plug a Nano or ProMini PCB into it, rather than reinvent the wheel.
TG Good point. That’s how I started out but then realized the packaging prevented it and I’d be stuck relocating the usb to the existing usb micro b hole in the case so I can program on the fly (DumboRC-X6 transmitter). Also doing this to learn circuit design and making toys for my kid and cool stuff around the house. If it was easy it wouldn’t be fun right?
Robin2:
What part of my Reply is "curious"? The fact that I use the 8MHz internal oscillator? It makes the whole thing very much simpler.
...R
I’m glad you asked!
How will it simplify circuit design? Guess I can take a dive into the data sheet. I’m using the nano schematic as a baseline so I don’t know which component need removing for 8MHz operation.
How will 8 vs 16MHz pan out for NRF24 response time when sending 32byte packets to a car with a paired NRF24? Will it slow down the response of the controls at all? I don’t want my throttle or steering to lag basically.
The response of rf 24 will be the same at 8MHz. I use the MinCore core for my 8MHz mega328 projects. Just leave off the resonator to run at 8MHz and choose 8MHz internal in the board menu. And the pins (20 and 21) that the resonator connected to are available as GPIO with MiniCore.
How will it simplify circuit design? Guess I can take a dive into the data sheet. I’m using the nano schematic as a baseline so I don’t know which component need removing for 8MHz operation
How will 8 vs 16MHz pan out for NRF24 response time when sending 32byte packets to a car with a paired NRF24? Will it slow down the response of the controls at all? I don’t want my throttle or steering to lag basically.
Mine all work fine. Unless you have a very busy program you won't notice the difference. Make one up on a breadboard and do some tests. Note that the lower frequency means a big reduction in the current required by the Atmega chip and longer battery life.
Robin2:
Mine all work fine... Note that the lower frequency means a big reduction in the current required by the Atmega chip and longer battery life.
Thx Robin I found some articles where power consumption was drastically lower 6-7x for 8MHz.
I plan on powering with 2s LiPo battery which can run ~8hr @ .25A which is fine by me. Am I doing the wrong thing using 5V and 3.3V linear regulators that burn off power rather than a couple of boost converters? I’ve just read that for RF circuits noise can be introduced with switching and it’s maybe preferable to take the hit on efficiency. What’s your take on that?
bigbangus:
Thx Robin I found some articles where power consumption was drastically lower 6-7x for 8MHz.
I don't think that is correct. The Atmega 328 datasheet shows a linear relationship between current and speed - which makes sense if each clock cycle needs a specific amount of energy. In other words 8Mhz uses about half as much current as 16MHz.