Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

HT12D and HT12E encoder/decoder issues

Status
Not open for further replies.
Nice writeup. One thing that I found out over at the Swordfish forums is that if you use the interrupt that it is only a one way in and no way at least not yet?, out.
I wasn't using the interrupt (curious of its operation so just had to try it) but I had the pic "locking up"without bit 4 enabled probably due to the change on portB interrupt? but in my last post I cured the issue by only turning the HLVD on when the battery test button is closed. Seems to work well. No more pic "locking up."
Presently moving on to the main board and include an HLVD addition as well.
still curious about the brackets around the include statement
 
LOIS of items for battery selection

found this site https://www.batteryspace.com/howtochooseanimhbatterypack.aspx
which has lots of info on battery selection and battery chemistry etc.
Going with the Nimh type battery, just hope my calculations are correct
going with 4.8v for the transmitter(30ma -800mah battery) and 9.6 for the main board(60ma- 5000mah)
run time is calculated for 6hours+
Found cheaper tilt switch (can't justify $17 each or $5 but min of 25.
Working on enclosures for each board. LOTS of items for a simple project but making headway.
Need to implement the piezo sounder and external battery monitor using the HLVD
 
...just hope my calculations are correct...

...and 9.6 for the main board(60ma- 5000mah) - run time is calculated for 6hours+...

(Sorry, I shouldn't even say anything, but....)

Doesn't seem likely. If the 60mA is current draw and the 5000mAh is capacity, yes, the run time will be more than 6 hours....about 14 TIMES more. And this is based on a continuous 60mA current drain.

Does this even pass a sniff test? From the site you linked, here is a 9.6v 5000mAh pack:

9.6 V, 5000 mAh battery pack is made of

8 pcs Nimh C size battery flat top single cells

Dimension (LxWxH): 104mm(4.1") x 103mm(4.0") x 26mm(1.0")

Weight: 1.9lb (862kg)

From a plan to use 3 AAA batteries to using 8 C-size batteries? Two pounds of batteries? Something stinks here.


Are you really planning on trying to sell this abomination to the innocent public????
 
The 8 C cells go inside the main enclosure that mounts on the back of the bike. Still working out battery size but don't want the batteries to run to low.
The 5 x 7 LED matrix (for full brilliance) needs at least 5v. Been running proto type using a 9v battery but found anything below 5v and the LEDs go dim.
The transmitter battery I the one I feel could be improved on as the enclosure vers pcboard size enters the picture. This is the light weight unit.
I now have an inkling of what you and every other engineer has to accomplish. Like a big puzzle.
LOTS and LOTS of pieces
my target run time is 6 hours
 
Doesn't seem likely. If the 60mA is current draw and the 5000mAh is capacity, yes, the run time will be more than 6 hours....about 14 TIMES more. And this is based on a continuous 60mA current drain.

Did you even read my comments? If 60 mA is the load current, using this battery will result in an operating time in excess of 83 hours if the bloody thing is flashing continuously.

I tried.... I've done my duty.
 
I read you comments and yes I was concerned about battery weight etc. After doing more research I come up with a safe but convluted battery life caculations.
my revised battery life calculations
using this on line calculator https://easycalculation.com/physics/classical-physics/battery-life.php
Take the battery ah rating, divide by 2 enter in the online calculator. take the current draw, multiply by 1.5 (saw this recommendation in my research). enter into calculator.
the result calculates the estimated run time.
looking at battery 6247 as example 2200mah / 2 = 1100mah
60ma current draw X 1.5 = 90 (multiplying by 1.5 was suggested in my research online)
enter into caulator https://easycalculation.com/physics/classical-physics/battery-life.php
and we come up with 8.5 hours. This should allow for any errors etc?
This battery is 8.1 oz. but need to look at size vers enclosure space.
Only after 6-8 hours but more would be nice.
 
So you're adding a fudge factor of 2 by cutting the battery capacity in half.

And you're adding a fudge factor of 1.5 by multiplying the current draw.

And you're vastly over-estimating the current draw by assuming the illuminated current draw occurs 100% of the time.


That's going to give you a much larger and more importantly, a much more expensive battery pack than is needed. If I were designing this - which I am not - I would use standard size cells in a battery holder. If you do intend to sell this, you end-users will appreciate standard batteries as opposed to a custom, and possibly not-replaceable battery pack.

End of my comments. End of my free design service. If you learn from your mistakes, you should have the knowledge of the universe by now.
 
Last edited:
I realize the battery packs are not standard but its cheaper in the long term to use rechargeable batteries. Perhaps I have gone overboard on battery capacity and I should reconsider which I plan to do moe research. At present trying to fit enclosure to battery size.
More research later today as I have a poker game to attend tonight.
 
I first considered going with AA and AAA batteries but need 4.8V and at least 9v. Found enclosures with battery holders but can't get the equivellent batteries into them. Still researching.
As for charging, the #3005 smart charger on https://www.batteryspace.com/howtochooseanimhbatterypack.aspx.
One of the reasons I went to a higher voltage so I can get a charger to do both packs.
As for cost, the packs on the linked site seem reasonable in price. But yes I need a smaller pack size to keep the enclosure within reason.
 
Batteries vers enclosures

add in the charger.
Looking at numerous options. Was looking to go with Limh batteries but locating a charger to charge a 4.8v 800mah battery and using same charger, not at same time, a 9v 1200ah battery pack.
Now looking at using LiFePO4 Batteries. Both packs are 9.6 volt but different mah ratings.
LOTS to consider and getting frustrated.
using https://www.batteryspace.com/howtochooseanimhbatterypack.aspx
battery packs # 3021 and #3925. Charger # 3287. Thought about DIY??
 
LiPO batteries have a nasty habit of turning into a fireball when improperly used. Over-voltage when charging, under-voltage when discharging, too high of current flow in either case or mechanical damage can all lead to a fireball. Knowledgeable individuals recommend experimenting with charger design in a fire proof location with a small fire safe close at hand. If the battery starts to cook off, dump it in the safe, slam & lock the door and run! There's no stopping the chemical reaction once it starts.

Given your demonstrated ability to read and understand data sheets, to grasp critical details, and to follow instructions, designing a LiPO charger is a really, really bad idea.
 
I plan to purchase the charger. See post #192. I wanted to use limh batteries but space considerations are an issue as well. Located battery pack using Limh but a charger for 4.8v AND 9v with mah rating < 1000mah is another roadblock I ran into as well. Present design is a Hammond 1554B enclosure which the battery pack # 3021 would be a tight fit if at all. An alternative is build a battery pack with the protection module using a smaller battery. I need to recheck my figures but using the #5860 battery plus the protection module and fuse it is a smaller footprint than the #3021 battery pack. LOTS of issues I am dealing with. At present the prototype works well. Just need to connect the external HLVD on the main board and look at using a smaller footprint pic in the transmitter. Found an enclosure that is a better fit than the OKW sample I have so progress is slow but making some progress.
I looked at the Limh battery precautions as well as the LiFePO4 batteries. The issue is voltage. The transmitter needs at least 3v while the main board needs at least 5v but some headroom is desired as well. The charger then comes into play so 9.6v is the best choice IMO. I might be wrong but don't think I am.
 
add in the charger.
Looking at numerous options. Was looking to go with Limh batteries but locating a charger to charge a 4.8v 800mah battery and using same charger, not at same time, a 9v 1200ah battery pack.
Now looking at using LiFePO4 Batteries. Both packs are 9.6 volt but different mah ratings.
LOTS to consider and getting frustrated.
using https://www.batteryspace.com/howtochooseanimhbatterypack.aspx
battery packs # 3021 and #3925. Charger # 3287. Thought about DIY??

Do you mean NiMH or a lithium chemistry? Since the voltage you mention is 4.8, I assume you mean NiMH.

One question that needs to be answered is what voltage and current do you need? What are your size limitations?

In terms of general advice, lithium polymer batteries (i.e., the ones most susceptible to fire) should probably be reserved for those applications where their light weight, high capacity, and high discharge rates are all needed. I have the feeling that is not the situation here. So, I would not even consider them.

Of the safer lithium chemistries, LiFePO4 is common as are some other lithium ion versions. They are relatively safe, but but still subject to less spectacular loss.

NiMH are great batteries in my opinion. Their main disadvantage is limited discharge current compared to the lithium batteries. In exchange, you get safety. Some versions, such as Sanyo eneloop, give a very low self-discharge rate, which means good shelf life and less frequent charge cycles. That leads to longer life. For my model airplanes, I uses NiMH for everything (ignition and radios) except for propulsion. For propulsion, I use lithium polymer or the old NiCd's. LiFePO4 's are also being used by other modelers for propulsion.

Without full knowledge of your project, I would still recommend that you consider NiMH at 4.8V. If you need the higher voltage and current of lithium chemistry, then the LiFePO4 is a good choice.

John
 
I want to go with the NiMH batteries just for safety but the battery capacity keeps getting in the way as a charger to charge the the <1000mah 4.8v batteries and still do the 9v pack is no where to be found. A 2.? -7.2 is available but the LED matrix is brighter using the 9volts.
As an alternative I found a slightly larger enclosure, but still need to research enclosure size vers battery footprint. IF I can fit the >1000mah batteries(NiMH) then thats what I am going to do.
LOTS of little issues get in the way but will keep plugging along.
 
Oh as for current draw, the 4.8 battery pack unit is 30ma + 50% = 45ma
the matrix board draws 60ma + 50% = 90ma
expected run time is 4-6 hours
 
...At present the prototype works well. Just need to connect the external HLVD on the main board and look at using a smaller footprint pic in the transmitter....

You have more issues than you know. For example, have you considered that the HLVD module will only work if the micro is directly powered from the battery? As soon as you add a voltage regulator to the system, you loose the option of using the HLVD module to monitor battery voltage. As far as I know, none of the 18F-series of PICs can operate from greater than 5.5 volts.

Also, once again I seriously question your current draw assumptions. Yes, you might measure a 60 mA drain on your main board...while the LEDs are flashing but what's the duty cycle of flashing? What percentage of the time are you going to be turning right or left? Do you have to keep signaling while going around in circles as you seem to do.
 
I realize the external HLVD needs to be before the Vcc of the pic. In my schematic I have two 10k resistors configured as a voltage divider. This is connected between the 9v and ground with the mid point connected to the external HLVD. I need to double check if the 1220 or 1320 pic has an HLVD module,( on my TO DO LIST).
The flashing matrix current draw is measured at 59ma during the RIDE routine. The turning routines draw less. These measurements are taken before the voltage regulator on the matrix board at the 9v source.. The current draw before I reconfigured the flash rate (multiplexing of the matrix was 185ma) during the RIDE routine. Now its 59ma. Reconfiguring consisted of turning each LED segment on/off separately. I will check the code to see what I have for ON vers OFF time.
 
SOL on an HLVD in the 1220/1320 but could use ADC but footprint is not that critical as I have plenty of pcboard landscape to work with.
The matrix code has 4ms ON and 20us off between segments.
I initially set the ON time to verify that each segment comes on separately then gradually lowered ON time and OFF time to arrive at 4ms and 20us delays. This worked rather well.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top