Recent Posts

Pages: [1] 2 3 4 5 6 ... 10 Next
1
Renewable Energy / Re: When Will Electric Cars Become Mainstream?
« Last post by nctnico on Today at 05:42:22 pm »
Have you ever noticed that the people nay-saying BEV or even PHEV don't have one?

My BEV gets about 14kWh/100km, which is about $1.20 worth of electricity, and when I do need to travel more than 200km, I plan accordingly.
Indeed and besides the financial part (much higher purchase price) which doesn't make sense the when I do need to travel more than 200km, I plan accordingly seals the NO-deal. Why pay more for something which does less?
2
General Chat / Re: Wish to bring electric toy cars to market
« Last post by Hero999 on Today at 05:42:11 pm »
Quote
Honestly Treez?
Using the deaths of 72 people to attempt to justify your tawdry little scam?
Beneath contempt.
Sorry but i believe we must talk of such things in order to have it not happen again.
We would not  allow cars that could catch fire.
I was just pointing out that the elec regs have often been used by the large corporations to make it more difficult for smaller competitors to get into the market....which is horrendous when you consider that this is really adding to causing tragedys like Grenfell.
I can see your point. The worst thing is lots of standards aren't free and have to be purchased for silly money, which makes it more costly for smaller businesses and individuals to comply. I think standards are quite often revised, just to sell more and make money. All safety standards should be freely available and paid for by taxes, gathered from those who can afford them.
3
I am trying to interface multiple PCF8591 (around 5) to a single Raspberry Pi using I2C protocol. Since a Rpi has only one set of SDA and SCL pins, I am trying to bit-bang to make the other GPIO pins work as SDA and SCL. I am trying to use RPi.GPIO library for making the bit banging code in python.

I don't understand how to communicate with PCF8591 even after referring to the manual plenty of times. I could not figure out how to receive data from a specific pin from PCF8591 since there are 4 pins available (AIN0, AIN1, AIN2, AIN3). I also want the input voltage as the differential voltage between two pins. It would be very helpful if anyone could tell me the steps to change and access different pins of PCF8591.

I am attaching the code I am using. I get a reading of '255' throughout whenever I run it. It is working more or less as I could see the SCA and SDA waveforms in an oscilloscope.

Code: [Select]
import RPi.GPIO as GPIO
import time
import matplotlib.pyplot as plt

pin_SCL = 0
pin_SDA = 0
signal = []

def plot_graph(time, data, graph_no, label_):
    fig = plt.figure(graph_no)
    axes = fig.add_subplot(111)
    axes.patch.set_facecolor('black')
    plt.plot(time, data, label = label_)
    plt.ylabel('Voltage')
    plt.xlabel('Time')
    plt.legend(loc='upper right')

def set_pin(SCL, SDA):
    global pin_SCL
    global pin_SDA
    pin_SCL = SCL
    pin_SDA = SDA
    GPIO.setup(pin_SCL, GPIO.OUT)

def start():
    GPIO.setup(pin_SDA, GPIO.OUT)
   
    GPIO.output(pin_SCL, GPIO.HIGH)
    GPIO.output(pin_SDA, GPIO.HIGH)
   
    time.sleep(10)
   
    GPIO.output(pin_SDA, GPIO.LOW)
    GPIO.output(pin_SCL, GPIO.LOW)
   
def send_byte(byte):
    GPIO.setup(pin_SDA,GPIO.OUT)
   
    for i in range(8):
        GPIO.output(pin_SDA,byte & 0b10000000)
        GPIO.output(pin_SCL,GPIO.HIGH)
        GPIO.output(pin_SCL,GPIO.LOW)
        byte = byte << 1

def acknowledge_from_slave():
    GPIO.setup(pin_SDA,GPIO.IN)
   
    GPIO.output(pin_SCL,GPIO.HIGH)
    status = GPIO.input(pin_SDA)
    GPIO.output(pin_SCL,GPIO.LOW)
   
    if(status == GPIO.HIGH):
        print("BYTE NOT RECEIVED")
           
def acknowledge_from_master():
    GPIO.setup(pin_SDA,GPIO.OUT)
   
    GPIO.output(pin_SCL,GPIO.HIGH)
    GPIO.output(pin_SDA,GPIO.LOW)
    GPIO.output(pin_SCL,GPIO.LOW)

def receive_byte():
    global signal
    byte = ''
   
    GPIO.setup(pin_SDA,GPIO.IN)
   
    for i in range(8):
            GPIO.output(pin_SCL,GPIO.HIGH)
            byte = byte + str(GPIO.input(pin_SDA))
            GPIO.output(pin_SCL,GPIO.LOW)
   
    byte = int(byte,2)
    signal.append(byte)
           
if __name__ == "__main__":
    global signal
   
    GPIO.setmode(GPIO.BOARD)
    set_pin(38,40)
    start()
    send_byte(0b10010001)
    acknowledge_from_slave()
   
    send_byte(0b00110000)#control byte to tell pcf8591 work as differential input
   
    acknowledge_from_master()

    try:
        while True:
            receive_byte()
            acknowledge_from_master()
           
    except KeyboardInterrupt:
        plot_graph(range(len(signal)),signal,1,'Detected Signal')

    plt.show()
    GPIO.cleanup()
4
Test Equipment / Re: Recommendation on a decent LCR meter?
« Last post by CJay on Today at 05:39:10 pm »
I picked up an Agilent U1731B recently on eBay from n2cbu, none left right now but it'd be worth keeping an eye on their sales as it was an absolute bargain at about $50 plus shipping
$50 = You SUCK! :-+

The replacement, U1731C, goes for $330 (seems MSRP & street are the same in this case  ::)).
It was too good to miss, I've used it in anger precisely once but it's in almost factory condition, the only problem is that it's missing the tilt stand on the back and although Agilent sell them for a reasonable price they want a ridiculous amount of money to meet minimum order fees, shipping etc. so I am keeping an eye out for someone who can tag one onto a larger Agilent order.
5

Edit to add: The plate says the motor is Y-wound, and there is no Neutral. Any one know if this is a problem for variable frequency drives?

That's pretty normal and shall work with an VFD. But I won't recommend doing so: The high dU/dt at the VFD's output might kill these old windings, the isolation material isn't made to cope with that and may break down over time. If you want to use a VFD with such an old motor, I'd recommend a sine filter (placed between VFD and motor).
6
Seems a bit expensive from the Aussie distrubtor Mektronics, at their price not sure why you wouldn't just buy the JBC?

Pace ADS200 Station 230 VAC with Instant SetBack Tool Stand 8007-0581
$542.86ex

JBC CD-B Solder Station with Standard Handpiece PLUS ROLL OF MULTICORE SOLDER MC334
SKU: JBC-CD-2BE
$547.00ex
7
Software can cost a lot more than the hardware design does.

The DZ1054Z software is ok. It’s a compromise. After a few weeks it is committed to muscle memory so it’s not an issue.

As for coupling on the DS1054Z, press the channel then the coupling button a couple of times. You don’t need to use the encoder. The menu is informational only. The only thing that I consider annoying is that the channel select and enable/disable is on the same keys so periodically if I’ve forgotten which channel is selected (which is half way across the scope on the screen) I’ll end up turning it off rather than select it.
8
sometimes i get 0x3FE0 and it's usually two things
- the firmware in the PK3 is corrupted, or i'm using a very old version like when the PK3 was used by someone else with MPLAB and i have to use it with X/IPE so i have to force a new PK3 firmware download.
- problems in connections, the PGC/PGD pins are shared with something else or are swapped or whatever
9


That’s a good description. It’s basically a handheld bench meter.

Honestly I haven’t actually touched my U1241C since I got it.

Interestingly, I think Joe even tests 867 against U1241C and it remains his personal go to meter.
10
General Chat / Re: What did you buy today? Post your latest purchase!
« Last post by CJay on Today at 05:35:59 pm »
These are for disassembling the big old 3-phase motor that came with my recently bought large lathe. I can't start on refurbishing the lathe yet, but I do have space to do the motor. It was made in the early 1950s, and looks like something out of a 1920s Amazing Stories (early SciFi) magazine illustration.

Wow, that motor...

The company Lancashire Dynamo and Crypto were only about 8 miles from where I live now, my first job was through GEC who took them over and eventually closed therm down but there's still a subsidiary of theirs doing business, Crypton, the automotive diagnostics people.

A bit of history here:

https://www.gracesguide.co.uk/Lancashire_Dynamo_and_Crypto
Pages: [1] 2 3 4 5 6 ... 10 Next