News:

Let's find out together what makes a PIC Tick!

Main Menu

My first 24F devlopment board

Started by m.kaviani, Jan 30, 2022, 02:07 PM

Previous topic - Next topic

tumbleweed

Sorry, it looks like we've all hijacked your thread!

I think you might get some more feedback on your design if you at least posted a schematic/description of what you're doing.

As far as what to include, put whatever YOU think is useful... it's your board after all.
Personally, I like the boards to be simple and generic, like the way you seem to have it now. That way you can use it for just about anything.

One comment... having pins in both x and y directions makes it breadboard unfriendly.

m.kaviani

I did make a board with PIC18f66K80 as my desk lab to create code for some industries applications and now decide to
make a better one and pass from 8 bit device to 16 bit, based on my last experience with 18f, I made a board that all
pins are free and the necessary circuit will make on the bread-board.
It is a challenge for me to design a board as small as possible and cheap in price, PCB, and component.
It's the reason why the pin header was installed in X Y directions.

of course, if there is a good proposal for something to add, I can extend the board.   

Yasin

@m.kaviani sorry for sabotage   ;D .

I apologize if my English is poor. As far as I can see from the schematic;
-The board is powered only via USB. It can be fed from the connector named "Header 3", but it is necessary to take precautions. Because the usb port will usually be connected to the computer, while feeding from "Header 3" causes the two sources to conflict. An undesirable situation may occur and the computer may be damaged. To prevent this, the +5V line on the usb should be switched with a transistor while there is power from "Header 3".
-Also there should be correction in mlcr. The RTS pin of the CH340 is not open collector as far as I know. It is not nice to use the reset button when this pin is high. To avoid this, r11 should be upgraded.
-There should also be a jumper that literally disables the mclr pin. When using "Header 5", that is, for the correct operation of the programmer. D1, C8 and U2 components may affect it negatively during loading.
-Since this board will be used in industrial environments, it may be advantageous to separate AVDD and AVSS digital feeders. It may be desirable to supply the ADC module with different voltages (different references). When not needed, it can be connected to the mcu supply with a jumper.
I would like to suggest you to use a diode in reverse direction from -mclr pin to vdd. In this way, c8 is discharged quickly in case of undesired voltage sags. So the mcu is reset successfully. Doesn't do any senseless behavior.
-They suggested 33pF in the datasheet for the -CH340 crystal.
http://www.wch-ic.com/downloads/file/79.html?time=2022-02-03%2004:59:28&code=hck8B0ijDLIpvnidz7G1z8VkzYr4OtuYILm3DjXL

There will certainly be suggestions from other friends as well.

Best regards.

m.kaviani

thanks for your comment. I am going to apply something like P-channel MOSFET for protection.

charliecoutas

Many thanks Tumbleweed for the reference to the FR stuff re timers. I can now get a bit further.

Charlie

top204

#25
Sorry for hi-jacking your thread m.kaviani. One last hi-jack then I'll open a new thread for timers etc, if required.

Your board looks excellent! Does it have an external Voltage input, and if so, how are you disabling the USB voltage to it, so they do not clash and destroy the USB tranceiver in a PC? I've had this happen on an HP machine in the past, when the voltage fed into the board clashed with the voltage coming out of the USB plug, and the over-current on USB is now, rather, defunct, so there is no protection with USB anymore, and it will take out a mother-board.

I'm with Charlie, and say thanks Tumbleweed.

Looking at the document makes the timer mechanism a bit clearer, but still a whole lot more cumbersome than the standard TMRx SFRs. Why would they remove the standard TMRx SFRs that have been around and working perfectly for two decades, and make them part of the CCP peripherals, when, in fact, the CCP peripherals are actually part of the timers when operating in some modes, not the reverse?

I'll miss using Timer0, Timer2 etc in a program. :-)

tumbleweed

I agree, it all does seem a bit backwards to me too.

I guess the one good thing is that now at least they're grouped together instead of the old method where you had things like CCP3 -> TMR1 and CCP5 -> TMR3. That made it hard to follow. Maybe they should have named the new ones "CCPT" since it's a Capture/Compare/PWM/Timer module

But, I think "Microchip" and "backwards" are synonyms these days!

m.kaviani

Hi Les,
I did put P-channel MOSFETs to protect output, fuse, and separate power and a power jack for supplying board.
finally finished.

m.kaviani

no more space ;D

Yasin

There is an error in the LM2576 connection. When pin 5 is low, the regulator works. It's the opposite in the schematic. I think there is no need for very high current in the 5 volt line. If an LDO type regulator is used instead of the LM2576, the space problem is eliminated. Peripherals disappear. E.g; LM1117MPX-50NOPB can be used. Q4 and Q5 I don't understand.

top204

#30
I had assumed the board could also be powered from the USB, but it looks as though it can only be powered via an external voltage, so there will be no reversal up the USB's 5 Volt line.

I see you are using the P-Channel MOSFETS for reverse polarity protection. Have you tried them out in varying circumstances? I've tried it a few times and some voltage has leaked through, and one time it took out the MOSFET! I think it had something to do with a sudden surge on the MOSFET while a load was applied, with the surge being the voltage applied to it, and the load being the immediate operation of the microcontroller and the thihgs it was controlling.

Does anyone have a good, reliable, solution for reverse polarity protection using a MOSFET, and not a Schottky diode, which drops the voltage? I did use a single P-Channel MOSFET and a Schottky to switch over from battery to external voltage and that worked well as long as the external voltage was greater then the battery voltage, but the Schottky drops approx 0.3 to 0.4 of a Volt, so I had to make the circuit work at 4.5 Volts, instead of 5 Volts, so the drop was not a problem.

m.kaviani

Quote from: Yasin on Feb 03, 2022, 06:46 PMThere is an error in the LM2576 connection. When pin 5 is low, the regulator works. It's the opposite in the schematic. I think there is no need for very high current in the 5 volt line. If an LDO type regulator is used instead of the LM2576, the space problem is eliminated. Peripherals disappear. E.g; LM1117MPX-50NOPB can be used. Q4 and Q5 I don't understand.

thanks, for the notification Yasin. it is true. the pin 5 must connect to the ground.
the MOSFETs are for protection ( like a diode ) against if someone connects external voltage to the power pin.
i wil try to change lm2576 with other chip.
 

m.kaviani

Quote from: top204 on Feb 03, 2022, 06:49 PMI had assumed the board could also be powered from the USB, but it looks as though it can only be powered via an external voltage, so there will be no reversal up the USB's 5 Volt line.

I see you are using the P-Channel MOSFETS for reverse polarity protection. Have you tried them out in varying circumstances? I've tried it a few times and some voltage has leaked through, and one time it took out the MOSFET! I think it had something to do with a sudden surge on the MOSFET while a load was applied, with the surge being the voltage applied to it, and the load being the immediate operation of the microcontroller and the thihgs it was controlling.

Does anyone have a good, reliable, solution for reverse polarity protection using a MOSFET, and not a Schottky diode, which drops the voltage? I did use a single P-Channel MOSFET and a Schottky to switch over from battery to external voltage and that worked well as long as the external voltage was greater then the battery voltage, but the Schottky drops approx 0.3 to 0.4 of a Volt, so I had to make the circuit work at 4.5 Volts, instead of 5 Volts, so the drop was not a problem.

dear Les,
I have checked the MOSFET. it has a low voltage drop of less than a schottky diode. at 5 volts it gave me 4.88 volts.
I will consider a switch to powering up both from port and power jack.

Stephen Moss

Is the idea is to place pin headers on the board and to then be able to use them to plug some kind of daughter/development board on top in a similar way to the Arduino, or to use 90 degree connectors and plug other things in around it?

If the intention is to stack boards then the stacked board(s) when fitted would...
a) Prevents access to the ICSP pin and Header 7 and
b) Prevents access to the Reset switch
c) Would be too small to really do anything with, particularly if you connect through the ISCP and Header 7 pins which would then effectively cut it the board into 3 sections.

So you may want to consider making it wider so that you could bring the ISCP, Header 7 & Reset pins to the board edge to make them more accessible when boards are stacked, in addition that would also provide more space on any plug in board. Alternative consider sacrificing some other connections to bring the ISCP & Reset to the existing board edge pins.

Additionally, with some component mounted on the underside it would be logical for someone to want to put feet on the bottom, not only to protect the underside components from potential damage as a result of being in contact with whatever surface it is sitting on, but also to make it sit flat and level instead of sloping due to the underside components.
At the non connector end the may be room to put a couple of small feet but at the connector end, maybe get one in by C1& C2 but the other side looks like there is too much clutter to place a foot, again a wider board would provide more space to place any feet.

 

tumbleweed

Are you sure that's how you want your reset circuit connections?
Normally, C8 would be on the other side of your RESET switch, allowing MCLR to go to 0V.
Then you could change the MCLR signal to connect directly to U1-13, bypassing R27.

I doubt you need diode D1 since the ICSP should always be using LVP for the dsPIC33, so it should never raise MCLR above VDD.

Are the Q4 and Q5 mosfets really going to protect anything?

Also, you want the VDDCORE cap C15 as close to U1 as possible. The recommended value is 10uF... I'd switch to a MLCC 16V cap there instead of the 47uF.