Maker Pro
Maker Pro

GPS NMEA, Failover Circuit upgrade attempt.

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
I wonder if i should add an 1n4148 diode across c.3 and +5V. because the manual says that it is the only pin not protected by internal diode.
I know that the max232 sould not have an output larger than 5 volts but just to make sure. Wouldn't hurt right ?

What do you think ?
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I'm happy to see that you guys seem to be working out the bugs but it really has me scratching my head. 4800 baud isn't exactly the Double A Fuel Dragster of baud rates so I can't quite grasp why the default 14M2 clock rate of 4MHz is causing a problem. Keep in mind that if the default clock frequency in increased it changes the value of any time specific command. This includes Wait, Pause, PauseUs and any serial rate and Timeout commands.

Earlier I said that I haven't ran any of the code posted because I wanted to use VB6 to transmit the GPS data to my 14M2 but 4800 baud isn't supported. At least I thought it wasn't. Sifting back through my VB6 folder I found a host of Serial programs I wrote well over 10 years ago. Surprisingly I also found that I used 4800 baud with no problems. My guess is that when Microsoft listed valid baud rates for VB6's MSComm they were dealing with real Serial Ports and UART's, not virtual ones like USB/RS323, where drivers can totally change the ballgame. So, if I find the time I just might run some tests at my end to see why doubling the clock rate is necessary. I still remain a skeptic.

Regarding your last posted schematic that includes the MAX232: You need a dot where the three 10K resistors converge to GND. This is the third time that I'm reiterating the importance of assigning component identifiers.

On a second note and I've mentioned this before too: Pause 1 is not pause for 1uS as repeatedly commented in the code.

Chris
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
4800 baud isn't exactly the Double A Fuel Dragster of baud rates so I can't quite grasp why the default 14M2 clock rate of 4MHz is causing a problem.

I beleave that it is not the baud rate that causes the problem. Most likely this code in in conjunction with the baud rate, need a more powerfull chip to work as expected. for example not all PC's can run all software, right ?

Keep in mind that if the default clock frequency in increased it changes the value of any time specific command. This includes Wait, Pause, PauseUs and any serial rate and Timeout commands.

Yes i am well aware of that. Also i know that at the end of the code the pause 5000 in real life will be pause 2500 at 8Mhz but that really does not affect the system, It would only allow the relay to change state faster but again not too fast to cause trouble.

On a second note and I've mentioned this before too: Pause 1 is not pause for 1uS as repeatedly commented in the code.

I am also aware of that. it is just a typographical error. Also the purpose of this delay is to allow some time for the cpu to start converting data after receiving them. It is not a big deal if we make it a 1ms or 2ms (I think i will change it to 2ms because of the doubled cpu speed will actually be 1ms)

Earlier I said that I haven't ran any of the code posted because I wanted to use VB6 to transmit the GPS data to my 14M2 but 4800 baud isn't supported.

I have no idea what a VB6 is :)

My guess is that when Microsoft listed valid baud rates for VB6's MSComm they were dealing with real Serial Ports and UART's, not virtual ones like USB/RS323,

Also no idea what you mean here.
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Sir Chris please dont take my comments wrong, i do appreciate your advices on all you say.
It is just that some times i am too lazy to change things that i take as intuitive, like the component identifiers or the Dots where lines should be connected.
*the software i use (pcbexpress), for i dont know what reason, will only add a tiny dot where lines are connected and it is almost impossible to see. So i have to use MS paint to make the dots visible.

I just need to find some better circuit design software (free) and all the above will be corrected.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Many of the members here at EP use LT Spice. You can download it here..
http://www.linear.com/designtools/software/

Though I have a copy of LT Spice I use Tina by Designsoft. There is a free version of Tina called Tina TI which can be downloaded from the Texas Instruments website.
http://www.ti.com/tool/tina-ti
Here's some help data and screen shots of it..
http://www.ti.com/analog/docs/gencontent.tsp?familyId=02&genContentId=33361#g4

Picaxe also provides a nifty third party Schematic Capture / Spice Simulator specifically designed for Picaxe. It's inexpensive but not free.
http://www.picaxe.com/Software/PICAXE/PICAXE-VSM/

Chris
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Constantine, I forgot to mention that I didn't see anything obviously wrong with your last schematic.

Chris
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I beleave that it is not the baud rate that causes the problem. Most likely this code in in conjunction with the baud rate, need a more powerfull chip to work as expected. for example not all PC's can run all software, right ?
More powerful? Nah, I don't think so. I stumbled upon this during a Google search. It takes you to a Picaxe docs section. It's worth reading.
http://www.picaxe.com/docs/baudratetolerance.pdf

Chris
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
The Picaxe document you linked makes sense. I can not understand though how changeing the frequency could affect the above and make the picaxe work as expected.

I may be able to measure Tbit with the Oscope.

again if the issue was Tbit being wrong from the GPS then would it not work with the input from the PC ?
Where they both wrongly timed ?
 

Sadlercomfort

Ash
Feb 9, 2013
424
Joined
Feb 9, 2013
Messages
424
Perhaps the Picaxe was the device at fault here, and changing the frequency changed the timing slightly?

The datasheet does not state the 'actual' value of the Picaxe's internal resonator.. so it may create an error as the frequency is prescaled to the chosen frequency.
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
There is no way to know that for sure, right ?

As soon as i get the 20M2 chips i will download the program and run it on 4Mhz and see what happens.
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
I received the 20M2 chips today and i have tested the code on them

Clocked at 4Mhz didnt work.
Clocked at 8Mhz worked.
Clocked at 16Mhz didnt work.

exactly the same as the 14M2

it really has me scratching my head. 4800 baud isn't exactly the Double A Fuel Dragster of baud rates so I can't quite grasp why the default 14M2 clock rate of 4MHz is causing a problem.

I dont know what to say. Is it that we just got lucky and it happend to work at 8Mhz ?
 

Sadlercomfort

Ash
Feb 9, 2013
424
Joined
Feb 9, 2013
Messages
424
I received the 20M2 chips today and i have tested the code on them

Clocked at 4Mhz didnt work.
Clocked at 8Mhz worked.
Clocked at 16Mhz didnt work.

exactly the same as the 14M2



I dont know what to say. Is it that we just got lucky and it happend to work at 8Mhz ?

I'm baffled by this, I'd love to know what default value there internal resonator is before being prescaled.. but can't find this anywhere.
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
On the diagram in post #197

Should C.5 decoupling capacitor be a 1uf or 10uf ?
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
One other feature i would like to add is battery support.
Some sort of internal "UPS" with a rechargeable battery that will be charging when mains 12V is present and discharging to power the circuit when mains is gone.

Something like a simple 9V rechargeable battery with a simple charger.

I am really open to suggestions about batteries and charge circuits.
 
Top