Sunday 24 March 2013

H-Bridge woes...

OK so I figured that the most fiddly bit would be the ringer circuit, especially the I have now blown up all three of my H-Bridges.

I think the problem is that they are only rated for a voltage of 36V and I am effectively feeding 57V in, it's low current so maybe it's OK, but for one reason or another I shorted or forgot to put a capacitor in to prevent feedback and whilst it worked briefly. I had to find a better solution.

There is another  H-Bridge (NJM2670) that handles up to 60V, which would be ideal, but I can only find them at RS and they're £7 each and you've got to buy at least 2. This seems a bit of a con as they are available from US suppliers for $3!!

Anyway I decided to build my own H-Bridge from some NPN and PNP transistors.

This has the advantage that I can use more robust components - the NPN - 2N5682 can handle 120V and the PNP 2N6042 can handle 100V - should be good enough.

I downloaded LTSpice circuit emulation software and designed the circuit based on a classic design. I simulated it but never really got the output I expected, not sure if the transistors were slightly wrong or the other values were wrong or whether I was using the software incorrectly.

I built it anyway along with the 4 massive Schottky diodes - which has legs too thick to push into my breadboard (I soldered thinner wire to them - LOL).



Along with the square wave generator I programmed onto my PIC, the whole setup works. Although one of the NPN transistors gets very hot - I'm not sure why this is - maybe the tuning capacitor is causing this somehow.


Work so far
All I've got to do now is solder this up making it small enough to fit inside the casing.

Sunday 17 March 2013

Getting a bit messy!!


Right I'm off to B&Q to find some sort of storage solution - this will make finding stuff a lot easier!

Sunday 10 March 2013

PIC Programming.....


Whilst I wait for my latest order from Farnell I decided to get a program onto the PIC, initially for test purposes. I read loads of info on the web relating to the K150 PIC programmer I bought from Ebay for £7.

It doesn't seem to be natively supported by MPLAB IDE, but it can accept a HEX file produced by MPLAB.

On the website below there are some example programs in assembler for testing the PIC. I have a 16F88.

http://files.winpicprog.co.uk/


I wrote a very simple program in C to send 2 5V square waves, 180deg apart for use in testing the ringer. One problem I encountered is that I could not get the __delay_ms() function working and in the end I wrote my own delay loop. The values for this were  a bit of a guess as I can set the on-board click speed to say 4MHz, but how many cycles to wait is a bit of a guess as I don't know how many instruction cycles each loop of the delay loop is taking - I guessed at 500, but I think this has given me a frequency of 10-15Hz - ideally I need 22Hz - what I need is an oscilloscope.

Saturday 9 March 2013

OK things didn't quite go to plan, I think I shorted it out somehow.

I have blown the H-Bridge.

Not to worry, ordered another one.

As for the oscillator with the 555 timer, I'm not sure I got 2 waves 180 deg appart. I think all I got was 2 square waves in phase which may have been the problem.

Anyway, I have ordered a 556 which should be capable of producing the 2 waves.

Useful calculators here:

http://pcbheaven.com/drcalculus/index.php?calc=555astable


Or using a 555 timer with an inverting amplifier using a transistor.


Another change I may make is to upgrade the H-Bridge. The SN744681 has a max voltage of 36, I am feeding in 57! The upgrade I have in mind is to one that takes 60V - NJM2670SMD - I've looked on Farnel and can't find it by this name.

Wednesday 6 March 2013

The High Voltage Ringer

Whilst on a 3 year stag-do, that is sometimes called "University", I picked up some knowledge of electronics. Apart from dabling with a Raspberry Pi recently I haven't relly done much in the way of practical electronics for 20 years!!
Never mind, I vaguely remember it being fairly simple, especially when someone has done some of the schematics for you - thanks again Port-a-rotary.
Luckily I also spend 2 years programming assembler for flight control systems - so hopefully this may come in useful.

So using this fantastic schematic from http://www.sparkfun.com/tutorials/50
I ordered the required bits from Farnell.
Plan is to build it up on a breadboard to get it running - the bell ringer I have looks slightly different from the one on the above link.
Ah but I hear you ask, where are you getting your power from for the beadboard, well I had this great idea (I actually stole it from http://www.wd5gnr.com/power.htm) and here it is:

Using a spare power connector from inside my PC and some screw-down posts from an old breadboard I now have this. To connect the wires to the connector I just put a blob of solder on each wire and, using carefully calculated parameters, stuffed them in hard enough so they didn't fall out.

The 10V is actually 12V, but not to worry, I'll only be using the 5V.

[EDIT: This power supply has turned out to be anything but smooth, it fails to drive the PIC correctly - I have resorted to 3 AA batteries in series giving 4.5 volts.]

The inverting switching regulator

Getting 57V from 5V (or 3.5V)

I built this bit first (M34063A) to make sure I could get the required voltage out, the only difference I made was not including the 0.25 Ohm resitor (or 4 x 1 Ohm in parallel). This is replaced by the red wire loop - which I measured at 0.1 Ohm - near enough for me.
When I'd got the required voltage out - 57V - (NOTE: I also got 57V with an input of 3.5V from 2 AA cells)  I connected it up to the H-bridge:

I then connected it up to the phone ringer solonoids to see if it would move.
I got one 'ding'!
At this point, and after re-reading the instructions on http://www.sparkfun.com/tutorials/50 I realised I needed an oscillator input signal into the H-Bridge - obvious really :)
I assume this will be representative of the output from the GSM unit (or the Nokia)
On the above website they mention using the PIC to create a 22Hz Oscillator, but as I hadn't got round to figuring out this bit yet, I scratched my head, and in the absence of a frequency generator I decided to use a 555 timer.



To get the required 22Hz I used the following ( from http://totusterra.com/555timercalc.html )

C1R1R2PeriodFrequencyDuty Cycle
0.1 µF1 KΩ330 KΩ0.0458 sec21.8306 Hz50.1 %

I will feed this signal into 1A and/or 2A of the H-bridge.

This is as far as I've got, I haven't tested the full ringer yet
More tomorrow...






















Retro Mobile Phone

Went to a car boot sale a few weekends ago and bought 2 1970's/80's rotary dial telephones for £10. My intention was to polish them up and sell them on e-bay, but they only make about £10 each and whilst 100% profit may sound good, after the 2 nights of cleaning and polishing I grew quite fond of them!

I had a quick look on the net to find out how to make them work with a modern telephone system - like what Sky provide me. I then thought that it would be really cool to have one of these phones as my mobile phone :) I then came accross this site:
http://www.sparkfun.com/tutorials/51
Awsome instructions on how to do it!!
Upon first reading this project sounded fairly straight forward - they certainly made it seem so on the web site...
My plan was to loosly follow their instructions, mainly because I didn't have a C compiler for MPLAB - more on this later.

Plan

  • Get the required components
  • Port-a-Rotary uses a GSM module - I plan to try and reuse an old Nikia 6010 - or whatever it is.
  • Create a high voltage ringer from a battery cell (3.7v) and test in isolation.
  • Check that I can control the Nokia from a Hyperterminal to simulatre the AT commands
  • Program the PIC 16F88 in assembler for the pulse dial to phone command
  • Solder it all up on Varoboard so it is small enough to fit inside the casing of the rotary phone.