Datalogging with uALFAT-TF and Hi2c

BCJKiwi

Senior Member
The Pullup on uAlfat pin8 is to 3.3V on my circuit. Doubt it would make any difference as the pins are 5V tolerant but seems better to use 3.3v to me.

Other connections appear OK.
 
Last edited:

Gwillo

New Member
Thanks

Many thanks, my new uAlfat should be arriving in the next few days, im going to use a brand new ds1307, 40x1 and new regulators just to be on the safe side (i have them so i might as well use them).
 

Gwillo

New Member
Revisions

Iv made the changes to the circuit as suggested on here, here is the revised circuit diagram, if anyone can see a problems then do please say.

http://i647.photobucket.com/albums/uu196/garethgwilliam/revisedcircuit.jpg

Changes:

I have sorted out the problem with the voltage regulators not being connected up correctly (i missunderstood the 1, 2 and 3 on the block image as being representative of the actual pins on the real regulator, sorry for any confusion)

I have removed the resistors which were not required and installed the ones which were missing on the diagram for the LEDs on the previous diagram.

I have indicated appropriate capacitors across the pins of the voltage regulators as specified in the spec sheet for the regulators, do i need to put aditional smoothing capacitors near the power pins of the picaxe, ualfat and ds1307?

As suggested i have ran the input voltage for the 3.3v regulator from the 5v regulator.

Any further suggestions are very much apreciated

Thanks
 

Gwillo

New Member
Oh, darn it, your right. Thanks for that.

EDIT: Before anyone else spots it there is a connection error on the 5v regulator
 
Last edited:

Gwillo

New Member
getting somewhere

Hi, iv now built the circuit and im ploughing through the code.

currently iv got the square wave output on the ds1307 flashing at 1Hz, and the two leds are off usually but when the logging switch is connected high the leds flash alternatly, also with the switch on when the memory card is in the alternating flashes seems to stay on the green led longer.

I still cant get the system to initialise a file on the uAlfat, im currently using the same (unaltered) code from post 8. with no other inputs connected (just the connections required in the circuit and the logging switch).

am i right in thinking that the LEDS are connected to output 1 and 2, the reason i ask this is the comment regarding pwm it is output 1 and 2 and not pwm1 and 2?, i assume iv got this right at the moment as the leds are giving outputs.
uALFAT:
readoutputs b0 'see if Led turned On (output low as sinks from pwm)
If uAStartLog = 1 Then 'Want to turn logging on / off
If bit2 = 0 then 'On so turn off
High 1 'record error Red LED Off Supply from pwm - sink to port
High 2 'recording Green LED Off Supply from pwm - sink to port
else 'Off so turn on
High 1 'record error Red LED Off Supply from pwm - sink to port
Low 2 'recording Green LED On Supply from pwm - sink to port
pause 1000
gosub uA_InitFilesys
EndIf
EndIf
If bit2 = 0 then 'File Initialised, start logging
gosub uA_StartLog
Endif
Also what is bit2?

many thanks.

EDIT,
after hours of looking for problems iv finnaly found it in an unexpected place. The two memory cards i had been testing with were a new 2GB card and a 4GB HC card, the device doesnt seem to like the hc card and the 2gb card appears to have been faulty, iv put another standard micro sd card in and it is initialising a file.

Many thanks for the support guys but it would still be useful to know what bit2 is incase i need it later.

Thanks for the support, as a thankyou once iv got the circuit finalised (and tested) ill upload a pcb design that im doing for my project in the hope that it will help others, like everyone has helped me.
 
Last edited:

BCJKiwi

Senior Member
The original post was some time ago so am having to refresh my mind on circuit and code.

The two LEDs 'recording' green and 'recording error' red are on output 2 and 1 respectively (leg23 and 22) of a 28X1.

The remarks about led power from pwm is not very clear.
The circuit as built uses output4 (leg25) to drive a Pchannel Mosfet as a high side switch to provide ample pwmed current for brightness control of multiple LEDs in various parts of the circuit (this example code is a small part of the full project). Thus to get these LEDS to turn on, the corresponding pin needs to be taken low (sink).

You may wish to drive the LEDS directly (with an R of course) in which case they will be sourcing and the high/low on the ports would need to be reversed.

The readoutputs b0 places the status of the enter output port into b0 as a bit pattern indicating which pins are high and which are low.
Testing bit2 tells us if the error pin is high or low.

Hope this helps.
 
Top